Commit graph

53 commits

Author SHA1 Message Date
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
Matt Dunn-Rankin
ade563ddcd server can read outfit data 2020-06-24 19:05:07 -07:00
Matt Dunn-Rankin
03cde98eae fix bug querying depth on restricted zones 2020-05-31 16:08:17 -07:00
Matt Dunn-Rankin
caefc6610c fix bug loading species/color translation on pet 2020-05-31 16:00:59 -07:00
Matt Dunn-Rankin
75a0fe2e8c refactor e/gp pairs to pose enum 2020-05-23 12:47:06 -07:00
Matt Dunn-Rankin
d9b447bbb4 omit glitched pet states, add IDs 2020-05-02 20:48:32 -07:00
Matt Dunn-Rankin
7dc01a6feb get multiple pet poses, gender/emotion data 2020-05-02 16:49:57 -07:00
Matt Dunn-Rankin
17e78c5699 fix bug with duplicate search results 2020-04-25 20:16:24 -07:00
Matt Dunn-Rankin
bed3cf7227 prefer nicer pet states 2020-04-25 04:43:54 -07:00
Matt Dunn-Rankin
564cdef0ce species/color picker! 2020-04-25 04:33:05 -07:00
Matt Dunn-Rankin
d13420256c add species/color GQL queries 2020-04-25 03:42:05 -07:00
Matt Dunn-Rankin
5e3071db4f search infinite scroll! 2020-04-25 01:55:48 -07:00
Matt Dunn-Rankin
8b8d67e5b1 restrict search results to items that fit! 2020-04-25 00:43:01 -07:00
Matt Dunn-Rankin
eac6b308cd Item search frontend + backend! 2020-04-24 21:18:44 -07:00
Matt Dunn-Rankin
dd5a7f9242 added pet appearance queries, using in frontend 2020-04-23 14:23:46 -07:00
Matt Dunn-Rankin
881be0c910 oops, add support for all-body item layers! 2020-04-23 13:10:42 -07:00