Commit graph

68 commits

Author SHA1 Message Date
b39914976b Add an /items/search page, and search box on Home
Woo, it's looking pretty good, I think!

I didn't bother with pagination yet, since I feel like that'll be a bit of a design and eng lift unto itself... but I figured people would appreciate the ability to look up individual items, even if the rest isn't ready yet 😅
2021-01-18 15:56:24 -08:00
334d89c101 Add Latest Items section to homepage 2021-01-18 06:31:27 -08:00
cdf2c66686 Oops, remove extra console.log statement! 2021-01-05 23:36:54 -08:00
5865157a1b Fix crash when there are too many trade matches
Oops, the GROUP_CONCAT string was getting cut off! This caused an error trying to look up the name of an item ID that didn't exist, because the ID got truncated partway through.
2021-01-05 23:35:02 -08:00
b8d919b247 basic outfit data from GQL 2021-01-04 07:36:00 +00:00
def46b0d9c add matches to the trades list page when logged in 2020-11-25 01:53:42 -08:00
9af6fd2d82 add comment explaining db index for trade activity
This query was very slow! I added an index, and now it's fast!

This code change doesn't actually affect anything, but the comment helps explain what happened, since the index isn't stored in code. (Todo: should I start defining some indexes in our setup files?)
2020-11-24 21:56:29 -08:00
c23243fcb7 add real timestamp to trades page 2020-11-24 14:43:43 -08:00
54abd1ac80 real trade data on the page! 2020-11-24 14:24:34 -08:00
3b4d2ac390 fix user items page crash for item w/o zone data 2020-11-18 10:35:25 -08:00
d219750ea1 support can look up users by email, not just name 2020-11-18 10:32:49 -08:00
6a43f92438 can search for user by name from items page 2020-11-18 06:45:33 -08:00
f1a8277c22 simplify offering/seeking count query 2020-11-09 06:30:20 -08:00
68e6e9e243 add real offering/seeking counts to item page 2020-11-09 06:26:29 -08:00
02e173d7de nc/np/pb search filters 2020-11-08 15:04:17 -08:00
f6723bb67a fix edge case bugs in itemByName and itemsByName
not-found case was erroring instead of returning a simple null, and string trimming wasn't working right, oops!
2020-11-08 00:20:21 -08:00
f621391446 add itemByName and itemsByName GQL 2020-11-08 00:06:51 -08:00
274a4f716f add zones to user items page
idk the labels section was feeling empty, and I didn't see a way to streamline it more, so I figured, add info that might be useful! lol
2020-10-23 23:29:54 -07:00
53d399f46b add neomail username to user GQL 2020-10-23 22:55:13 -07:00
e57af14625 refactor Outfit.js to split Pet to a separate type
yeah, I had unified Pet into Outfit, but now I think that was overly clever… 😅

Here, I define a new Pet type, and it has some of the fields of Outfit and the deprecated fields still.

I did this because I want petAppearance to work, for UC testing!
2020-09-27 03:18:46 -07:00
41e70ba8d0 finish modeling full pet appearance 2020-09-25 03:29:02 -07:00
71f491ce65 modeling saves pet state 2020-09-25 03:29:01 -07:00
9111dfddd3 save item swf assets during modeling 2020-09-25 03:29:01 -07:00
1b59b9631b GQL for canonical appearance for body
gonna use this for item page! I walked back my supported species idea 😅
2020-09-21 02:56:48 -07:00
bcf6e6d8a7 add GQL to know what species can wear an item
gonna use this on the item page to seed the species choice!
2020-09-20 21:33:45 -07:00
c3c8d924b5 add other colors to modeling GQL 2020-09-15 03:06:17 -07:00
32822b250d add colors to modeling query, no change to gql yet
This updates the MySQL procedure to get the important special colors, but keeps the GQL behavior the same by only filtering to Blue. Just an incremental step before changing the behavior, to make sure I've gotten it right so far!

Snapshots significantly updated, but, from scanning it, I think that's expected changes from actual modeling progress. Hooray!
2020-09-15 02:38:23 -07:00
45ffa92f1d add itemsTheyWant to user GQL 2020-09-11 21:34:28 -07:00
c0f0e5688c include item lists in itemsTheyOwn
This adds the owned items to the user items page, and also means that owned items in lists will be tagged for the modeling page
2020-09-11 21:23:14 -07:00
5a91dd2f2a in-memory cache for modeling query
I'm using my first ever MySQL Store Procedure for clever cleverness in caching the modeling query!

I realized that checking for the latest contribution timestamp is a pretty reliable way of deciding when modeling data was last updated at all. If that timestamp hasn't changed, we can reuse the results!

I figured that, because query roundtrips are a bottleneck in this environment, I didn't want to make that query separately. So, I built a MySQL procedure to do the check on the database side!
2020-09-06 15:49:08 -07:00
f73211a50e add GQL endpoint for items that need models 2020-09-06 02:50:04 -07:00
Matchu
e2b5486168 GraphQL for user's itemsTheyOwn 2020-09-04 05:57:21 -07:00
f3013c2956 add basic user data to GraphQL API 2020-09-02 16:09:11 -07:00
a11ff1326b actual zone search support? owo 2020-09-01 20:06:54 -07:00
bf465d802e item searches by word, not phrase
Been bothered by this for a while!

My hope is that this isn't a notable marginal performance hit—we were already walking the table and doing string ops anyway, I can't imagine adding to that is actually that much of a marginal lift, when the main bottleneck was probably reads. And the perf should be identical for simple single-word queries anyway. But we'll see how it feels!
2020-09-01 17:35:41 -07:00
b7c958c39b don't restrict zones if the item is not compatible
Previously, if you switched species/color such that one of your items was no longer compatible, we _would_ still apply its zone restrictions to the visible layer set.

In this change, we fix that server-side, since I think it makes the most sense for an empty appearance to be truly empty!
2020-09-01 17:00:27 -07:00
3a6e3fac8e add isCommonlyUsedByItems to Zone
This is in preparation for hiding bio zone restrictions but showing item zone restrictions!

I also refactor the build-cached-data script substantially, to run GraphQL against the server instead of a custom query.
2020-09-01 01:16:30 -07:00
856d8586e4 cache item data when switching standard colors
Previously, when changing a pet's color, we would refresh the items panel and send a new network request for the item appearances, even though they're all the same. This is because item appearance data is queried by species/color, for ease of specification.

But! Item appearances are //cached// by body ID. So, if this is a standard color, it's not hard to look in the cache for the standard color's body ID!

Now, most color changes are faster and don't flicker the item panel anymore. We do still refresh the panel and send the requests for color changes that _do_ matter though, like standard <-> mutant!
2020-08-31 18:25:42 -07:00
2929c3373e serve glitched appearances, only if no others
Previously, I was filtering out glitched appearances from the canonical ones.

But now, I'm thinking it's better to serve glitched ones than no data for a pose at all.

I'm inspired by the case of the Candy Acara, which has _only_ glitched appearances in our db, and I'd like to mark them for reference—but then the site would treat it as no data at all.
2020-08-31 00:37:12 -07:00
1ef05adce4 Support can label pet poses!
it's good shit, y'all
2020-08-31 00:32:17 -07:00
5f3b627187 sort Unknown appearances to the bottom of support 2020-08-29 14:33:00 -07:00
1e30e7c8b0 add Support mode to PosePicker
Still just read-only stuff, but now you can look at all the different poses we have for a species/color!

Soon I'll make the pose/glitched stuff editable :3

Some sizable refactors here to add the ability to specify appearance ID as well as pose… most of the app still doesn't use it, it's mostly just lil extra logic to make it win if it's available!

(The rationale for making it an override, rather than always tracking appearance ID, is that it gets really inconvenient in practice to //wait// on looking up the appearance ID in order to start loading various queries. Species/color/pose is a more intuitive key, and works better and faster when the canonical appearance is what you want!)
2020-08-28 22:58:59 -07:00
10a6eff299 WIP pose picker support 2020-08-28 21:06:33 -07:00
4977f1ee54 Revert "cache zone data"
This reverts commit 0f7ab9d10e.

The Production Vercel deploys don't seem to like how I did this build trick, even though the Preview deploys seem fine with it 🤔 Reverting for now, sent a message to Vercel support.
2020-08-17 18:49:37 -07:00
0f7ab9d10e cache zone data
I noticed that, while looking up zone data from the db is near instant when you're on the same box, it's like 300ms here!

In this change, we start downloading zone data into the build process. That way, we can have a very fast and practically-up-to-date cache (I'm not sure I've changed it in many years), while being confident that it's in sync with the database source of truth (for things like join queries).
2020-08-17 15:28:05 -07:00
b300718b4a itemSearchLoaders should prime item loader cache
Another perf issue I noticed in Honeycomb for the SearchPanel operation! We re-load the items again by ID, even though we already got them by name. Let's stop that!
https://ui.honeycomb.io/openneo/datasets/dress-to-impress--2020-/trace/aMuhsTjQFZY
2020-08-17 01:41:38 -07:00
d621b4c1a7 fix caching for petTypeLoader
Oops, of course, we weren't actually taking proper advantage of the dataloader here! The queries got over-complicated, but more importantly, subsequent requests to the same loader would re-submit the query!

I noticed it in the SearchPanel operation, in this Honeycomb trace:
https://ui.honeycomb.io/openneo/datasets/dress-to-impress--2020-/trace/aMuhsTjQFZY
2020-08-17 01:33:34 -07:00
8fdc986ee9 can submit the actual body ID Support mutation!
it seems to actually be changing the things correctly aaaa
2020-08-01 15:30:26 -07:00
f747bfb004 load special colors into support UI 2020-07-31 23:33:12 -07:00
4c78abee96 fix bug resolving item fields under pet outfit 2020-07-02 14:33:47 -07:00