Commit graph

739 commits

Author SHA1 Message Date
7421f41e58 Move HTML5Badge to zones area 2021-02-12 17:46:33 -08:00
2d58627bdd Fix species faces container sizes 2021-02-12 17:33:34 -08:00
e0e85b2add Mention zone info on home page updates section 2021-02-12 16:11:30 -08:00
614bad72d2 Show real zone data on item page
And some Cypress specs to test the basic cases!
2021-02-12 16:09:11 -08:00
20f9573e50 [wip] Zone info UI for item page, with fake data 2021-02-12 15:18:54 -08:00
048fb29c14 Refactor item page preview to grid layout
because I wanna add zones to the area below the faces!
2021-02-12 14:35:14 -08:00
67784bd5e3 Add prev/next pagination to item search page 2021-02-10 14:23:25 -08:00
86de09b285 Add pet status to wardrobe page HTML5Badge 2021-02-10 14:02:18 -08:00
ab21f3a8a5 Remove unused imports 2021-02-10 13:52:20 -08:00
d2c672667d Fix performance problem with defaulting to [] 2021-02-10 13:51:59 -08:00
bbb752fa65 Extract out layerUsesHTML5 function 2021-02-10 13:50:42 -08:00
10e47115bd List non-HTML5 items in wardrobe page 2021-02-10 13:47:02 -08:00
0c80491f99 Add HTML5Badge to outfit page 2021-02-10 13:35:34 -08:00
bf85cef922 Fix HTML5Badge tooltip on mobile 2021-02-10 13:20:21 -08:00
2403bd813a Refactor into WardrobePreviewAndControls component
I'm moving the preview and controls stuff closer together in the code, to clear the way to change `OutfitPreview` into a `useOutfitPreview` hook here!
2021-02-10 12:52:00 -08:00
d2240cc5c5 Increase item preview loading UI delay back to 500ms
I don't remember why we set it to 200ms before, but it feels too aggressive now. Idk!
2021-02-09 23:10:22 -08:00
a03ae98468 Keyboard accessibility for "item needs models" warning 2021-02-09 22:58:00 -08:00
27f441df36 Don't show "item needs models" for invalid pets 2021-02-09 22:56:31 -08:00
4aade5782f Don't flicker the HTML5 badge while loading 2021-02-09 22:55:19 -08:00
f11fbbb831 Don't show error pet preview for invalid pet state
We could also afford to figure out how to not request appearance data in this situation… but not showing the error message is a good first step lol!
2021-02-09 22:38:40 -08:00
9e49b6ae3e Fix text color for OutfitPreview
Oops, I never actually saw the practically invisible text in light mode! Let's make it actually dark in light mode item pages, and still dark in all wardrobe pages!
2021-02-09 22:36:50 -08:00
b0eeb84d63 Disable "Customize more" for invalid pet
Oops, before disabling, we'd build a link with `pose=null`, and that would cause downstream issues on the wardrobe page.
2021-02-09 22:31:50 -08:00
1eb00ba6ca Fix crash when choosing invalid appearance
Oops, I messed up in my `useOutfitPreview` refactor just now! Fixing fixing!
2021-02-09 22:27:22 -08:00
c0e1c78d75 Fix SpeciesFacePicker desktop alignment
Oops, I fixed mobile alignment by centering this, but didn't realize I broke desktop alignment! Now we do different alignment on different sizes 😅
2021-02-09 21:48:18 -08:00
f29a269b94 Use prettier focus outline for HTML5Badge 2021-02-09 21:47:12 -08:00
828fb65cf4 Refactor HTML5Badge
let's de-dupe that stuff, baby!
2021-02-09 21:45:29 -08:00
3599c78a85 Add to home page updates section 2021-02-09 21:41:08 -08:00
b8744037d1 Add HTML5 indicator to item preview page 2021-02-09 21:39:29 -08:00
193273f00f Share appearance data via useOutfitPreview
Here, we offer a second syntax for `<OutfitPreview />`: a hook that offers the same UI as `preview`, but _also_ shares the `appearance` data.

This makes it easier to have UI that depends on the outfit appearance, without having to commit to all the `useOutfitAppearance` stuff in the parent. Same easy syntax! :3

I've refactored the item page to use this for compatibility testing, instead of using the Apollo cache (which was also cute and same perf impact, but more overhead!)
2021-02-09 20:28:03 -08:00
8694729b38 Fix placeholder URLs in safeImageUrl
Oops, I got distracted partway through typing the domain, lol! They point to a real place now, lol! (not a very helpful place, but at least the real one I intended! :p)
2021-02-09 16:16:46 -08:00
10aa4f9905 Also log the non-HTTPS URL case in safeImageUrl
When I added this new error case in the last change, I made it log to Sentry, because I don't think this should be possible under our data set, so if it happens I want to hear about it. Same is true for this error case, so let's log it too!
2021-02-09 16:13:18 -08:00
330e4ee12e Fix URL parsing for Jetsam Lunch Lady items
A crasher, fixed! :) I made Jetsam Lunch Lady Gloves no longer crash the page, lol - its thumbnail URL is "/items/clo_jetsam_lunchladygloves.gif", with no host specified. The shoes are the same!

I also added a fallback, to return a placeholder error URL instead of just letting the URL through as-is—and I updated the other error case to behave the same. I'd rather have a specific isolated feature get crashy, than have the mixed content warning pop up, or let through some mystery unparseable URL that, idk, might be part of an attack?? Seems better to fail hard-but-small than easy-but-potentially-leakily.
2021-02-09 16:11:32 -08:00
fe5eab5763 Fix stray null error in SearchToolbar
Oops, we don't provide this in the item search page, so check for that!
2021-02-09 16:05:21 -08:00
e6200df49d Speed up dev server by skipping persisted queries 2021-02-07 00:18:01 -08:00
2115bd64a7 Add ?offset parameter to item search page
No links to it yet, but it's respected as a way to request other pages!
2021-02-06 22:02:32 -08:00
2d0601cfeb Add total item count to search results
This will help us set up pagination!
2021-02-06 21:50:52 -08:00
6738f07e64 Add expand-on-hover effect to "Customize more" 2021-02-06 15:52:47 -08:00
7620d3f315 Fix alignment bug on ItemPage 2021-02-06 15:21:57 -08:00
922e150020 Extend itemSearch, deprecate itemSearchToFit
I'm gonna extend `itemSearch` to also look up the total number of results, and the fragmentation between `itemSearch` and `itemSearchToFit` finally caught up with me :p

I've deprecated `itemSearchToFit`, and moved the fit parameters into a new optional `fitsPet` parameter for `itemSearch`.

I'm going to keep `itemSearchToFit` around for now, because old JS builds still use it, and I'd like to avoid disrupting folks. But I'm not going to add the new total results field to the results object it returns, and that's gonna be okay!
2021-02-04 23:34:43 -08:00
b9aac7d8d2 Add "Search all items" placeholder to item search
I was starting to write a Cypress test, and noticed there was no placeholder to use for searching, and I don't know how that escaped my notice for so long! I guess I commented it out for some reason, but I forget why, and this seems fine now! (Looks like we removed it when we added zone suggestions? Idk!)
2021-02-04 22:23:34 -08:00
927d783a96 Delete GQL query tests
I haven't been keeping these up to date, so at this point they're more overhead than they're worth.

Helpful in the early days when we were iterating fast and making more mistakes, but now we're more solid (and I learned how to just resend queries from devtools :p)
2021-02-04 21:24:53 -08:00
580fd79b8c Fix loading state after each species face click 2021-02-03 16:14:08 -08:00
c3cb923b58 Increase preview size on item page 2021-02-03 16:08:02 -08:00
f3e19158d0 Fix crash when using old tab to load item page
Oops, the new `canonicalAppearance` arguments couldn't handle being omitted rather than being null, due to a low-level SQL call site that cares about the difference.

This meant that loading an item page in an old tab, with an old copy of our JS, could cause a crash.

Now, the backend will be okay with queries from old pages, and respond the same as before!

This isn't a huge deal, because once everyone is on the new JS we won't send queries without this parameter anyway… but I like my optional arguments to actually BE optional, without surprises lurking >.>
2021-02-03 15:51:49 -08:00
8970b6af26 Remove stray console lines 2021-02-03 15:45:19 -08:00
958d9c16b8 Change "Not modeled yet" -> "Item needs models" 2021-02-03 15:44:53 -08:00
be151ab400 Save user's preferred color for item previews 2021-02-03 15:33:23 -08:00
787dc7da87 Save user's preferred species for item previews 2021-02-03 14:27:02 -08:00
13a5a0a7aa Update "New updates" section on home page 2021-02-03 02:20:03 -08:00
75fccf1adf Load best available pose in SpeciesFacesPicker
Oh right, I left in a hack to just always pick HAPPY_MASC or HAPPY_FEM, back when it was just the basic colors. Now that we're all the colors, we need to be able to handle fallbacks for missing or unlabeled poses, too!!
2021-02-03 02:10:52 -08:00