Commit graph

1191 commits

Author SHA1 Message Date
9ea8245208 Serve pet name as id too in GQL 2021-05-12 22:52:58 -07:00
92a4fd4808 Use Fastly to cache our PNG assets from S3
We've been serving images directly from `impress-asset-images.s3.amazonaws.com` for a long time. While they serve with long-lasting HTTP cache headers, and the app requests them with the `updated_at` timestamp in the query string; each GET request still executes a full S3 ReadObject operation to get the latest version.

In the past, this was only relevant to users on Image Mode, not Flash Mode. But now that everyone's on Image Mode, this matters a lot more!

Now, we've configured a Fastly host at `impress-asset-images.openneo.net`, to sit in front of our S3 bucket. This should dramatically reduce the GET requests to S3 itself, as our cache warms up and gains copies of the most common asset PNGs.

That said, I'm not sure how much actual cost impact this change will have. Our AWS console isn't configured to differentiate cost by bucket yet—I've started this process, but it might take a few days to propagate. All I know is that our current costs are $35/mo data transfer + $20/mo storage, and that outfit images are responsible for most of the storage cost. I hypothesize that `impress-asset-images` is responsible for most of the reads and data transfers, but I'm not sure!

In the future, I think we'll be able to bring our AWS costs to near-zero, by:
- Obsolete `impress-asset-images`, by using the official Neopets PNGs instead, after the HTML5 conversion completes.
- Obsolete `impress-outfit-images`, by using a Node endpoint to generate the images, fronted by a CDN cache. (Transfer the actual data to a long-term storage backup, and replace the S3 objects with redirects, so that old S3 URLs will still work.)

I hope this will be a big slice of the costs though! 🤞

(Note: I'll be deploying this on a bit of a delay, because I want to see the DNS propagate across the globe before flipping to a new domain!)
2021-05-12 22:49:59 -07:00
7ec4bfcf64 Announce outfit saving on homepage 2021-05-05 00:23:41 -07:00
65af7ef64c Add general error message for wardrobe crashes
Boom, pulled some stuff out into util! Now we also have error boundaries in both panels of the wardrobe page.

You can test this one by visiting `/outfits/new?send-test-error-for-sentry`, just like on the home page! Util component for fake errors owo
2021-05-05 00:22:28 -07:00
6dc6ad2578 Add general error message when page crashes
Previously, we would tear down to a blank white page. Now, for errors within most page content, we show a cute error message with a grundo programmer!

To test, visit `/?send-test-error-for-sentry`, which will trigger an intentional render error on the home page.

Note that this does _not_ cover pages that don't use PageLayout, namely the wardrobe page! I'll want to add other boundaries there…
2021-05-05 00:09:09 -07:00
aa0a66fe6d Oops, fix a crasher on item search page
Crashes on clearing the search box. I really thought I fixed this when I refactored `forceReset` to be a function, but I guess I missed it when I went back-and-forth deciding whether to actually do the refactor!
2021-05-04 18:56:00 -07:00
e63c4ea68f Stop adding extras to Your Outfits after save 2021-05-04 18:38:14 -07:00
e7ad4dc39e Avoid extra rename action logs 2021-05-04 16:32:01 -07:00
76aca48b43 Warn user of unsaved outfit changes 2021-05-04 16:31:48 -07:00
8e18262db0 Fix making changes while outfit is saving
Before this, if you made a change while the outfit was auto-saving, it would reset your changes back and forth in an infinite loop, oops!

This was because the response from the save would reset the outfit state to match, but the _debounced_ outfit state would still show the user's changes, so we'd trigger another save. And then the same thing would happen in reverse, and back and forth again!
2021-05-04 13:43:32 -07:00
3088b97ad2 Enable auto-saving while searching for items
This means hoisting `useOutfitSaving` up to the top of the page! We had it down lower for iteration convenience to start :)
2021-05-04 13:28:29 -07:00
b6274193d5 Hide outfit thumbnail in wardrobe after loading
Oops, it was possible after saving an outfit to get into a state where we would show the `<OutfitThumbnailIfCached />` behind the outfit even after it was saved, and then removing items would look weird until auto-saving caught up.

We had used the `backdrop` property because we wanted smoother partial load-ins, but for now I'm just fixing this by switching it to `placeholder`, which already has the right loading-only behavior.

This was also the only call site for `backdrop`, so I've removed it!
2021-05-04 12:33:13 -07:00
995a2b8a3a Fix infinite loop bug on initial outfit save
Oops, the sequence here was:
1) Save a new outfit
2) The debounced outfit state still contains id=null, which doesn't match the saved outfit, which triggers an auto-save
3) And now again, the debounced outfit state contains the _previous_ saved outfit ID, but the saved outfit has a _new_ ID, so we save the _previous_ outfit again

and back and forth forever.

Right, ok, simple change: if the saved outfit ID changes, reset the debounced state immediately, so it can't even be out of sync in the first place! (I also considered checking it in the condition, but I didn't really understand what the timing properties of being out of sync due to debouncing would be, and it seemed to not represent the reality I want.)
2021-05-04 12:33:13 -07:00
1d97988383 Finish outfit auto-saving!
Hope it actually work-works lol

Did some refactors in useOutfitState to support the new reset action we do after auto-saving, in case the server tweaked things like the name.
2021-05-04 12:33:13 -07:00
217aa8dcc1 [WIP] Outfit-saving UI
The auto-saving frontend! It seems to trigger saves at the right times, but they fail, because the backend doesn't support updates yet!
2021-05-04 12:33:13 -07:00
56e1ce595c Fix misc lint errors
I ran `yarn eslint src`, and fixed everything I saw!
2021-05-03 15:06:07 -07:00
ec3aa1747d Lint against console.log
and replace `console.log` instances in the codebase with better alternatives!
2021-05-03 15:01:49 -07:00
71a6dbdad7 Oh right, stop leaving console.log lying around 2021-05-03 14:57:10 -07:00
c508d49272 Add glitch message for Faerie Uni
Note that we implemented the actual horn behavior described in the message, simply by marking the yellow horn appearance glitched for Fem, but not for Masc! Also, we don't have a yellow-horn Sick Masc model, so it's blue too.
2021-05-03 14:52:50 -07:00
f3e9df2d91 Fix PosePicker support modal
It wouldn't open, because I'd set `isLazy` on the popover, so opening the modal would close and UNMOUNT the popover, which unmounted the modal!

Now, we use the new `lazyBehavior` prop to keep it mounted _after_ the first time it opens. This is why I needed to upgrade Chakra!
2021-04-30 12:48:49 -07:00
e735b9b0f6 Disambiguate some UC conflict glitch message cases 2021-04-29 12:59:33 -07:00
cb104954af More aggressive zone filtering for UCs 2021-04-29 12:38:31 -07:00
d373a7a54f Add restricted zones to pet appearance support UI 2021-04-29 11:52:25 -07:00
cb2a5bc912 Don't add ?state until opening Support pose picker
Oops, I made a recent change to automatically add `appearanceId` to the outfit state when you open the Support pose picker, to avoid navigation issues.

But I didn't realize this happened _silently_ when you open the page as a Support user, because the Popover preloads!

Now, the Popover doesn't preload its content. This is probably better for normal users too, the PosePicker UI is a bit heavier with 6 previews than I really want!
2021-04-28 15:00:34 -07:00
f3173db7b3 Fix bug unwearing/removing search results
Oops, our "items to reconsider" feature was preventing unwearing/removing items you're already wearing!

This feature helps you try stuff in Search, without disrupting your outfit. e.g. if you try on a new Background, then change your mind and unwear it, then we reapply whatever old Background you had on the outfit before.

But this made it impossible to remove your _current_ background from the search page if you went back and searched for it again, because we would remove it and then reconsider and reapply it 😅

Now we, um, stop that!
2021-04-26 07:21:47 -07:00
6517087568 Improve search result click performance
Huh, dunno when I regressed this! Or maybe I never did it for search results, just the main items page? But we're needlessly re-rendering the entire search results list when you wear/unwear something, because `onRemove` always changes, and that breaks the `React.useMemo` on `Item`.

Now, we cache the `onRemove` callback with `React.useCallback`, so perf is much happier!
2021-04-26 07:14:29 -07:00
571b064fb5 Oops, fix crash for empty manifests!
Lol whoops I goofed up what happens when there's no manifest! Ooops
2021-04-26 06:48:33 -07:00
d98a533dce Update asset manifests after 3 days of staleness 2021-04-26 06:40:05 -07:00
6918b3cefa Fix bulk-add layers tool
Oops, we extracted Support fields out from the default `appearanceLayerFragment`!

This was causing the page to silently fail to show any changes, because `layer.remoteId` was evaluating to `undefined` rather than one of the ID numbers in the range.

Here, I've added both `remoteId` explictly because we use it directly, and also the support fields because that's what the layer support UI needs!
2021-04-26 06:07:52 -07:00
3a4e5d7e13 Whoops, fix lint 2021-04-26 05:52:43 -07:00
de27c4297d Stop reverting PosePickerSupport with cache data
Oops, making changes in PosePickerSupport would sometimes trigger a re-fetch in PosePicker.

Specifically, PosePicker needs some fields that PosePickerSupport doesn't, so changing the canonical poses causes PosePicker to ask for stuff again—which will probably serve a SWR'd cached version that doesn't reflect the Support changes!

Here, we update the PosePickerSupport query to prefetch all the fields the PosePicker _would_ want for any of these poses. That way, if we swap in a new one as the canonical appearance for a pose, there's no refetch needed, and therefore no risk of hitting a stale cache.
2021-04-23 16:05:52 -07:00
e955817acf Don't navigate away after updating a pose 2021-04-23 15:58:47 -07:00
f223424cfa Add total count to /support/petAppearances 2021-04-23 15:37:52 -07:00
61636a0067 Better focus/hover UI on /support/petAppearances 2021-04-23 15:34:16 -07:00
72e4fa0ad0 More precise data for /support/petAppearances
We move to an actual GQL query, instead of approximating with /api/validPetPoses.

Notable changes are omitting glitched states from UNKNOWN, so we don't prompt Support users to fill in missing states with bad states; and omitting glitched states from standard, so that we _do_ prompt Support users to check UNKNOWN states for new _non-glitched_ versions we can start to use.
2021-04-23 15:31:10 -07:00
a0107aaf7b Add createdAt and updatedAt to Outfit GQL
Not used in-app yet, but Dice wanted it for the Discord Neobot!
2021-04-23 13:02:18 -07:00
14ec4585d7 Oops, fix stale-while-revalidate for modeling data
Huh, I used max-age=1, which suggests to me that I _meant_ to put SWR in here too but just forgot! Oh well lol, fixed now!
2021-04-23 12:12:15 -07:00
a14bddb39e Separate modeling queries into public vs user data
This will enable better caching! Though it looks like the stale-while-revalidate isn't coming through on modeling public data, I wonder why?
2021-04-23 12:10:16 -07:00
2f7b6571f2 Fix loop in useFetch
Oops, my recent change made it so `useFetch` started re-requesting stuff in an infinite loop 😅 right, this is how effects work, lol!
2021-04-23 11:48:38 -07:00
0fe83419f7 Navigate Support directly to unknown pose 2021-04-23 11:44:55 -07:00
a16765b27e Fix lint errors 2021-04-23 11:40:49 -07:00
cc0833f7ac Add explainer info to /support/petAppearances 2021-04-23 11:38:52 -07:00
aa28ee8b39 Add /support/petAppearances page 2021-04-23 11:31:25 -07:00
8b5ba60ea8 Check for new outfit saved indicator in Cypress 2021-04-22 02:44:45 -07:00
99e0fdbf59 Add indicator for whether changes are saved
Now, when viewing a saved outfit that you own, you'll see a "Saved" indicator if it matches the version on the server, or a temporary UI of "Not saved" and a tooltip if not.

Auto-save coming next!
2021-04-22 02:35:59 -07:00
dc6d5b5851 Minor variable name change 2021-04-22 01:59:49 -07:00
34b69a5e2b Oops, show the 600x600 image in pet layer support
Previously, the PNG link for a pet layer would show the 150x150 version. This was both an inconvenient size, but also not reflective of how the layer actually behaved, because we only use Neopets's official PNG for the 600x600 version!
2021-04-21 22:08:15 -07:00
b9b6667414 Add support tools for pet layers 2021-04-21 22:06:07 -07:00
e8a2b8ba28 Rename {Item -> Appearance}LayerSupportModal
In preparation for extending it to non-item layers? 👀
2021-04-21 21:29:10 -07:00
2617052da0 Oops, fix lint errors 2021-04-21 21:27:10 -07:00
c64f542829 Reload Your Outfits after saving an outfit 2021-04-20 02:26:46 -07:00
6640a2d8ca Can save outfits with items 2021-04-20 02:12:07 -07:00
f504808e12 Oops, fix crash saving untitled outfits 2021-04-20 01:53:30 -07:00
5ac758cc72 Oops, don't allow saving existing outfits
Ah, oops, the `id` field from `useOutfitState` went missing and I didn't notice, so `useOutfitSaving` didn't correctly detect that this was an existing outfit!

This made saves on existing outfits create new copies, which isn't a bad behavior exactly, but I don't want to go there; saving a copy is just gonna pollute people's outfit lists rn, worse than no option imo.
2021-04-20 01:50:42 -07:00
f9b07dad24 Can save new outfits w/o items
Just a basic e2e starting point! Simple logic, with simple gates to prevent saving outfits we're not ready for. Safe to ship, despite being very incomplete!
2021-04-19 03:56:51 -07:00
531ca3c22f Create Cypress command to log in
I'll use this to test outfit saving!
2021-04-19 02:22:45 -07:00
9f2629ae61 Fix crash when editing saved outfit
Oops, something I didn't test in the recent refactor! Right, these need to be Sets.
2021-04-16 23:49:10 -07:00
71215fe599 LRU caches to speed up outfit layer preload
The layer preloader already takes advantage of, and primes, the HTTP cache.

But we still do duplicate work, on every OutfitPreview render, to re-execute movie clip libraries, and create a movie clip to test for animations. The former is nontrivial cost, and the latter is often large cost. This can make even basic outfit changes slow, when there's no change to the movie clip layers and the player is paused!

Here, we add an LRU cache for movie clip libraries, and for the question of "is it animated?". This should speed up a number of places where we would reload the movie (including between toggling the item), and various changes that were triggering full movie clip rebuilds unnecessarily.

We _aren't_ solving here for the fact that toggling an animated item requires rebuilding the movie clip, which could conceivably be cached—but with some state management trickiness, because ideally it should be a separate clip for each context where it's being shown. Imo not yet worth the effort! (esp because I think users understand that toggling an animated item can be slow, whereas this was affecting _other_ actions way too much)
2021-04-16 20:16:56 -07:00
6f03a13516 Serve null outfit names for anon outfits
Oopsie!
2021-04-16 19:26:07 -07:00
e3ac9d06e5 Handle non-existant outfits better
Gotta remember to check the validity of IDs earlier than that lol!
2021-04-16 19:18:28 -07:00
9e2f9eab16 Better support for colorId=0
This is a glitchy state that pets can get into! `spankaroonie` is an example, at time of writing.

Before, we would crash on loading downstream fields for the pet's color. Now, we don't! We also fix an oversight in the pet's `petAppearance` field, to trigger the "not yet modeled" error when the pet type doesn't exist.
2021-04-16 18:47:21 -07:00
ddd224c8d1 Handle null outfit creator, oops! 2021-04-16 18:41:26 -07:00
fd931c064e Merge branch 'outfit-saving' into main 2021-04-16 04:32:45 -07:00
405e35a546 Basic outfit state Cypress tests 2021-04-16 04:27:19 -07:00
e1f9f87695 Add ?loadPet param to support custom search engine 2021-04-16 03:15:24 -07:00
8d18bc06b7 Refactor outfit state selection
Here, we consolidate useOutfitState to get its base `outfitState` from a few different places: parsing the URL, and processing the saved outfit data, return an object of the same shape as the state stored in the reducer.

This enables us to just pick one of the three, instead of our kinda awkward individual-field fallbacks.

This will also help us with some upcoming work to make Back/Forward navigation work better.
2021-04-15 17:17:53 -07:00
4bc4e98a0a DISPLAYS_INCORRECTLY_BUT_CAUSE_UNKNOWN pet layers
Now we show a message for pet layers with the DISPLAYS_INCORRECTLY_BUT_CAUSE_UNKNOWN glitch applied! Previously, there would just be no message, because we only had UI logic for when it was applied to an _item_ layer.
2021-04-13 17:17:42 -07:00
3e3188786c Add glitch OFFICIAL_MOVIE_IS_INCORRECT
Some of the "MiniMME11-S1: Approaching Eventide Skirt" visuals are pretty clearly glitched on TNT's end, like the Jubjub, which just has a single flat version of the dress floating in the corner of the screen.

This is a message to make that case even clearer!
2021-04-12 19:51:19 -07:00
1e4063f0d9 Add glitch DISPLAYS_INCORRECTLY_BUT_CAUSE_UNKNOWN
I'm applying this to the "MiniMME11-S1: Approaching Eventide Skirt" on the Acara, which seems to load all 1000 images from the manifest, but then show no animation and no errors. Not sure what's up, and not inclined to deep-debug until we have a check on whether it works on-site!
2021-04-12 19:36:08 -07:00
5212375c34 Handle very large asset manifests
Huh, so apparently the "MiniMME11-S1: Approaching Eventide Skirt" on the Acara has 1000 layer images lol.

This caused the manifest string to overflow the MySQL `TEXT` field, and fail to parse as valid JSON when loading it back for the client.

I've updated the database to use `MEDIUMTEXT` instead, and added a warning message & skip behavior when the manifest size would exceed the database limit, and added graceful error handling for the invalid JSON scenario. Now, we don't crash, and the data self-repairs, and keeps in a better state in the first place!

But I'm also worried about this asset, it doesn't play correctly anyway, and I'm not sure if that's an overload on our end, or just a flat problem in the JS. (There's no error message on the client, it just… loads all the layers, then shows no play button, seemingly self-satisfied.)
2021-04-12 18:58:28 -07:00
020ac572e4 Use asset IDs when looking up pet's PetAppearance
This was causing a bug where unlabeled poses would cause pet lookups to fail!

Now, we return the actual pet appearance for the pet, if we have it, by matching against asset IDs first.
2021-04-12 18:30:41 -07:00
4cb47f3c7c Don't crash if auth0 credentials are missing
I'm setting up the app in a fresh box, and I noticed that the Auth0 credentials are an immediate crasher if not present. That doesn't seem ideal to me for something only used in support actions! I'd rather just have that support mutation crash, if we happen to call it.
2021-04-12 18:05:00 -07:00
b80149440d Merge branch 'waka-ui' into main 2021-04-08 18:32:46 -07:00
b92b5696b4 Remove unused import 2021-04-07 22:12:03 -07:00
089654e092 Use VERCEL_URL for waka loader if given
Oh right, our preview deploy was loading the prod allWakaValues data! Now it uses the VERCEL_URL env variable to request from the current deployment instead.
2021-04-07 22:02:10 -07:00
a32bc34171 Tweak Waka tooltip copy 2021-04-07 21:46:03 -07:00
ce57f9a67a Fix crash on pressing Escape in item search 2021-04-07 20:24:45 -07:00
2b93e5cca7 Waka tooltip copy edits 2021-04-07 17:37:38 -07:00
be816d89c9 Waka item page UI! 2021-04-07 16:48:41 -07:00
d918162a2f Minor bugfix in wakaValueText
This is the same user-facing behavior, but stops logging errors for items that are _expected_ to not have Waka data
2021-04-03 14:32:12 -07:00
a73427af1e Add 1-hour caching to wakaValueText
One day is too long! I'd prefer 1min for just the value itself, but I don't want to bog down all the other metadata with it, it's not _essential_ for it to be faster.
2021-04-03 14:29:37 -07:00
df71a16354 Add wakaValueText GQL field to items
Again, I think I'm getting a bit ahead of myself :p Mostly I wanted to see if this architecture would work out!
2021-04-03 14:26:41 -07:00
5cd6fac052 Apr 1 "New Updates" 2021-04-01 20:10:06 -07:00
6f6fc264af Add NC/NP tags to homepage & search result items 2021-04-01 20:08:35 -07:00
e0c7a4d82c Add OFFICIAL_BODY_ID_IS_INCORRECT glitch
Applied to
- Colourful Female Kiko Dancer Tambourine
- Magma Usul Bow
- Stealthy Elephante Mask
- Wocky Gadgeteer Air Balloon
2021-03-30 22:27:34 -07:00
8487d9674a Only show Save if logged in 2021-03-29 19:50:34 -07:00
06ec0b0b52 Add disabled save UI 2021-03-29 19:46:21 -07:00
7a7c166148 Move Rename into outfit menu
More stuff will be there later, mostly I'm just creating the new home, and making room for the new save UI
2021-03-29 19:25:00 -07:00
9f5b8a7e6e Remove stray import 2021-03-28 16:24:12 -07:00
bfd2d78d76 Fix extra horn bug for Wraith Unis 2021-03-23 18:59:06 -07:00
7c9f4828f9 Add toggle to show/hide older trades 2021-03-23 18:52:01 -07:00
3984f9c9ba Filter trade counts to the last 6 months 2021-03-23 18:32:22 -07:00
62952b80dd Can edit closet list text, incl as Support
I wanted the ability to clear out closet list text for Support users, and figured I should just build the UI for end users too, and grant Support users the same access!
2021-03-23 17:48:11 -07:00
790c231b5d Add "Send email" button for Support users 2021-03-23 16:50:09 -07:00
0e8e50b054 Simpler, faster modeling query
I narrowed down the problem to the fact that we were joining in pet types against assets, and *then* running GROUP and DISTINCT and everything. Assets x compatible species/color pairs is a LOT of rows!

Here, we instead get all the relevant body IDs first, and *then* match them against pet types—which we fetch in one batch to match body to canonical species/color.

I'm also trashing the weird caching mechanism we did here, because in practice it doesn't seem reliable anyway. If anything, I'd want to look at stronger CDN caching. (I made a small improvement to the caching annotation, but ultimately it still doesn't matter, because this query uses logged-in stuff and always comes out max-age=0 anyway.)
2021-03-18 13:02:06 -07:00
1f103989a3 Add blanket warning for invisible pets 2021-03-18 09:02:40 -07:00
85c17a177c add comment about pet appearance glitch message 2021-03-18 08:58:40 -07:00
0b16278703 Add message for glitched pet appearance
Seeing this right now with a lot of Invisibles, who have faces but we don't have the correct faceless ones in the db yet
2021-03-18 08:31:12 -07:00
a848533c7c Add OFFICIAL_SWF_IS_BROKEN glitch
Snug Hissi and Old School Draik outfits are gonna be labeled with this!
2021-03-18 06:59:21 -07:00
6638ff409e Extract OutfitKnownGlitchesBadge to new file 2021-03-18 06:40:52 -07:00
db8e7848d7 Glitch info for pets w/ OFFICIAL_SVG_IS_INCORRECT 2021-03-17 05:54:34 -07:00
a66fa02f15 HomePage updates Mar 16 2021-03-16 09:10:02 -07:00
17d75ee97f Add color and step-value support for bulk add
This is enough to start fixing items like Baby in a Pumpkin! Hooray! 😁
2021-03-15 13:28:16 -07:00
92db11b995 Add REQUIRES_OTHER_BODY_SPECIFIC_ASSETS glitch
This helps with items like "Living in Watermelon Foreground and Background", which has a species-specific foreground and bodyId=0 background.

With this flag set on the background, it won't appear for pets that don't _also_ have something else that fits. In this case, it hides it from Standard Vandas, and all non-standard colors.

There's some hacky limitations here: the item page still highlights the Vanda, even though clicking gives nothing; and the zone info for it is messy too, with the Background claiming to fit all species, and the LFI claiming to fit 54 specific species. But those don't seem important enough to code for!
2021-03-15 12:44:40 -07:00
4e9805af60 Bulk-add tool actually saves stuff!
I fixed Dug Up Dirt foreground, hooray! Hope it sticks
2021-03-15 09:13:25 -07:00
5f32d80022 Oops, fix backend syntax error
Right, I keep forgetting that my local env isn't picky about this, but prod is
2021-03-15 08:29:26 -07:00
1dce12e792 Oops, fix item previews with bodyId=0!
The other day, I deleted what was apparently a load-bearing glitch row, lol 😂

We had a row in pet_types that somehow had `body_id = 0`. And I guess that was causing this query to return some species, even though that body has no species.

Here, I'm adding support for the special `representsAllBodies` body's species to be null. The client seems chill with it, we weren't using that property in that situation anyway!
2021-03-15 08:22:17 -07:00
c0e70b4c62 Preview + save UI for bulk-add tool
still not wired up tho!
2021-03-15 08:11:10 -07:00
67245d6f70 Add support for no-Vanda items to bulk-add tool 2021-03-15 07:58:44 -07:00
e4c8031c3b Show previews for bulk-add layer tool 2021-03-15 07:50:13 -07:00
9eb0906a69 Copy tweak for item support drawer 2021-03-14 08:13:17 -07:00
b1ca7c6bab Tweak zone labels in support UI
I like making these more concise and consistent across the dropdown and the cards, I'm still not 100% sold on the design but it seems ok for now!

At first I had it in the dropdown as "Background (3)", but realized that conflicts with the usual pattern of like, saying how many items match a certain filter…
2021-03-14 08:07:41 -07:00
f3f8f6748f [WIP] A better TODO message for the bulk add tool 2021-03-14 07:57:56 -07:00
d2eb941c24 [WIP] Add bulk-add form to "Layers on all pets"
It doesn't work yet though! Just form UI!
2021-03-14 07:50:21 -07:00
2dcfc7524a Add Neopets ID to support layer UI
Using this to get an at-a-glance check on how Neopets IDs are typically assigned for body-specific items… looks like it's increasing, and alphabetical by species? (not by species ID?)
2021-03-14 07:18:36 -07:00
7c5e7ab21a Add Support view for all appearances of an item
I think this will be generally useful to minimize switching around for common operations, but also I'm thinking of building a bulk assign tool for things with broken body IDs, and this will be the place for it to live, I think
2021-03-14 07:16:01 -07:00
535abec228 Oops, fix manually NC condition!
Oops, we weren't doing a good job encapsulating the different conditions in item search. The `OR` in the NC condition was causing a precedence problem!

Now, we wrap all the conditions in parens at the interpolation site, to make it really clear that they all need to be made safe like that!

Now, there's not a bunch of "??????" entries in NC search, oops 😅
2021-03-14 05:28:57 -07:00
927401fc92 The NEW UC rule is that non-body-specific is okay! 2021-03-13 07:21:40 -08:00
36b0cb75e5 Add Twitter link to homepage updates 2021-03-13 03:18:32 -08:00
df225dc1ae Add Twitter button to footer 2021-03-13 03:14:35 -08:00
841c96d56a Fix crash when knownGlitches is undefined
Not sure exactly when in the flow this happens! But spooky! Don't crash!
2021-03-13 02:21:32 -08:00
1f7ef43e8b Add glitch message for unconverted Dyeworks items 2021-03-13 02:18:44 -08:00
65f74897da Fix alignment for outfit badges
Woof, I haven't done a big screen in a while, centering them is yikes!
2021-03-13 02:06:34 -08:00
99e887105c Copy tweak for OutfitKnownGlitchesBadge 2021-03-13 02:02:34 -08:00
da2b8813c2 Oops, fix HTML5 badge for Flying in an Airplane
Oops, the HTML5Badge was using the presence of an `svgUrl` to decide if the item is converted!

Here, we add an extra condition that if the OFFICIAL_SVG_IS_INCORRECT glitch is applied, then *that* indicates HTML5 conversion, too.
2021-03-13 02:00:32 -08:00
5a74b9df8f Add glitch message for OFFICIAL_SVG_IS_INCORRECT 2021-03-13 01:58:06 -08:00
6ebbc4af02 Explain Static UC conflict in a new glitch UI 2021-03-13 01:48:12 -08:00
d7fe05c42c Refactor: Extract OutfitHTML5Badge
I'm gonna add glitch stuff too, and I want all this better encapsulated!
2021-03-13 01:33:00 -08:00
d44315de2c Oops, actually Static hides UCs! 2021-03-13 01:08:48 -08:00
56dd2bbdd7 Hide Static zone for UCs, just like restricteds 2021-03-13 00:51:13 -08:00
e423affa6d Homepage updates Mar 12 2021-03-12 07:58:33 -08:00
56e9df719a Stop encoding punctuation in item search bar
Typing "foo:bar" would re-encode to "foo%3Abar"!
2021-03-12 07:44:59 -08:00
bdc4cdf46b Use official PNG when available, instead of ours
This was one more bit that needed fixing for "Flying in an Airplane": it wasn't just the official SVG that was incorrect, but also the official SWF. So our converted PNG was also incorrect!

Here, we now try to use the official Neopets PNG when the manifest provides it, instead of our own.
2021-03-12 04:28:57 -08:00
0aaf1adb29 Add Support tool for OFFICIAL_SVG_IS_INCORRECT
Inspired by the "Flying in an Airplane" bug (item 82287), where the official SVG (and I think SWF) were visually glitched and included both zones in the image, but the official PNG was correct.

This flag lets us use the PNG, like the official player does—but only for this item, while still keeping SVGs for everyone else!
2021-03-12 04:01:35 -08:00
15d4a27657 Link to both new and old manifests in item support 2021-03-11 08:52:46 -08:00
78354a35d0 Support ?v= for SVG URLs, too 2021-03-11 08:46:08 -08:00
f6f8d3200a Handle ?v= at the end of canvas library URL 2021-03-11 06:38:03 -08:00
dc3008a675 Okay, not _everything_ is on the new manifest URLs
Gonna have to start guessing stuff now!
2021-03-11 02:57:44 -08:00
e220b4e5e1 Whoops, biology still uses old manifest URLs
Huh. Okay! 🤷‍♀️
2021-03-11 02:35:13 -08:00
46066807ad Update to the new manifest URL format
I guess they dropped the hashes! Well, we're very behind on conversion now lol!
2021-03-11 02:16:42 -08:00
d5336cafc4 Add manifest & movie buttons to item support modal
Helpful for debugging HTML5 conversion and making sure we're up to date!
2021-03-11 02:04:04 -08:00
9f61250f05 Ignore unknown body IDs in item compatibility data 2021-02-22 20:00:38 -08:00
7ca548bae0 Wire up the NC support tool for real! 2021-02-22 19:37:24 -08:00
9b16cb8f91 [WIP] Add PB field to NC support tool
Just for clarity!
2021-02-22 19:24:33 -08:00
0ae26a6633 [WIP] UI for isManuallyNc support tool 2021-02-22 19:11:03 -08:00
281fdccb89 Upgrade Chakra, remove tooltip flicker workaround 2021-02-22 19:00:47 -08:00
c539471afa Add is_manually_nc flag
for items that are NC, but aren't marked with r500 on Neopets.com!
2021-02-22 18:05:44 -08:00
614dc0795a Switch to bottom tooltips for zone/html5 info
I've decided that covering up the species faces with other species info is too weird! It feels like it's removing some ability to cross-reference.

A cool UI affordance would be to have this and the faces interact with each other, like you can hover to highlight the relevant species faces, or even vice-versa, to show the relevant zones for this species. But that's probably way overkill for this relatively niche feature.
2021-02-12 18:35:16 -08:00
b276714fc1 Oops, fix layout bug in restricted zones
Too much nowrap! Looked very bad on "Ceremonial Shenkuu Warrior Armour", lol
2021-02-12 18:33:14 -08:00
8e806d178d Visually de-emphasize species counts for zones 2021-02-12 18:31:12 -08:00
09cc2e6a2b Don't allow line breaks in zone list items
Some looked really bad in the new design, like Jewelled Staff, which was breaking between the words "2 species", making a real bad tooltip target too.

Now, there's no line breaks allowed inside a list item at all! We force it to break between items, instead. (Could have also maybe implemented this with flex wrapping? This seemed like a straighter path, but…)
2021-02-12 18:25:08 -08:00
7183f0725c Add zone restrict to item page, too
I knew I was forgetting something! lol
2021-02-12 18:15:45 -08:00
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
082af11b5b Don't say "(Can't be this color)" while loading 2021-02-03 01:53:09 -08:00
4431c43663 Enable free color/species input on ItemPage
Previously, I kept this constrained to valid species/color pairs only, because we didn't have a great error state. But at this point, it feels worse to throw people out of the color they're looking at, and to make it harder for them to pick the color in the first place!
2021-02-03 01:51:51 -08:00
6a4be0390a Show a fallback face for valid face options
Sometimes we just don't have the image! Don't let that stop people from clicking it tho!
2021-02-03 01:47:39 -08:00
a293dc56b5 Disable faces that can't be the chosen color 2021-02-03 01:41:03 -08:00
8de85fbc63 Pulse effect while SpeciesFacesPicker is loading
like the Skeleton elements!
2021-02-03 01:27:16 -08:00
27d4bed172 Cross-fade images in SpeciesFacesPicker
Wowie, this was hard to get right, but I'm very pleased with where it ended up!! React `key` stuff was a total brainwave, and even though it depends on kinda obscure knowledge, it made this whole thing WAAAY easier, omg
2021-02-03 01:24:13 -08:00
a42e696955 Show selected color faces for SpeciesFacesPicker 2021-02-02 23:29:06 -08:00
19482be2b8 Use ES module syntax in backend instead of require
Ok cool, so apparently another win we get from using `ts-node` is that I can finally easily use some non-native-Node features like ES module import syntax, for consistency with what I'm doing in the main app source! That was getting on my nerves tbh. Ooh I bet I can finally use `?.` too, I've had to rewrite that a bunch…
2021-02-02 22:26:55 -08:00
4483df2040 Run Prettier on my TS file
VS Code wasn't running it automatically; now we've got it set up!
2021-02-02 21:40:43 -08:00
b58db4a629 Finally finish TS setup, build works!
`yarn build` was crashing on my `build-cached-data` script, because we were trying to run the Typescript file uncompiled!

Now, we run it with `ts-node`, which transparently compiles Typescript files before execution. Phew!

`react-scripts build` made some automated changes to `tsconfig.json` for compatibility with `create-react-app`, and I also added a `ts-node` section to override one of them so we can compile to CommonJS for `ts-node` script execution!
2021-02-02 21:38:57 -08:00
d7028bc2cc One more TS fix, adding a tsconfig.json 2021-02-02 19:29:58 -08:00
cb87fd8a9a more TS fixes 2021-02-02 19:22:47 -08:00
cee5e128cb fix TypeScript build errors
That's what I get for forking a TS file, not knowing TS, and ignoring the errors lol :p
2021-02-02 19:20:02 -08:00
d3b9f72e67 Add stale-while-revalidate cache headers
Oh yay, I'm pleased with this! I hope it works out well!

stale-while-revalidate is an HTTP caching feature that gives us the ability to still serve relatively static content like item pages ASAP, while also making sure users generally see updates quickly.

The trick is that we declare a period of time where, you can still serve the data from the cache, but you should _then_ go re-fetch the latest data in the background for next time. This works on end users and on the CDN!

I've scanned the basic wardrobe and homepage stuff and brought them up-to-date, and gave particular attention to the item page, which I hope can be very very snappy now! :3

Note to self: Vercel says we can manually clear out a stale-while-revalidate resource by requesting it with `Pragma: no-cache`. I'm not sure it will listen to us for _fresh_ resources, though, so I'm not sure we can actually use that to flush things out in the way I had been hoping until writing this sentence lol :p
2021-02-02 19:07:48 -08:00
c00df62bdc More cache hint tags for Item etc
Trying to get that Item page fast!

I don't really want to ship this as-is, because I'd really like to get stale-while-revalidate working before shipping a 1-week cache timer… will be tricky though!
2021-02-02 17:51:54 -08:00
f0b3047112 Defer tooltip renders in SpeciesFacesPicker 2021-02-02 17:08:39 -08:00
bccb36dda2 Improve SpeciesFacesPicker render performance
The Tooltip elements seem to still be taking a bit, I don't really know a great workaround for that… could maybe split it out into a separate box and defer the rendering on it, so it doesn't block the first pageload?
2021-02-02 16:56:26 -08:00
6549bba756 Remove stray console.log 2021-02-02 16:48:08 -08:00
6d05fb8680 Fix bug in SpeciesColorPicker loading state
Oops, I made a fix to the color picker, but not the species picker! Updated them both to match.
2021-02-02 16:46:07 -08:00
f699d867e5 Disable species picker for species-specific items 2021-02-02 16:45:28 -08:00
6c84baca03 Hide alt text while species faces are loading
and some nicer typography when it fails!
2021-02-02 16:35:54 -08:00
adecb4167b Remove extra focus outline for SpeciesFacesPicker
Before the tooltips, I thought the focus state wasn't clear enough at a glance, so I added an extra focus outline to the species faces picker area. Now, I think it's clear enough with the species name tooltip popping up!
2021-02-02 16:31:55 -08:00
e788040315 Guess when item is species-specific, for UI hints 2021-02-02 16:29:20 -08:00
6f19ef8c88 Fade out incompatible pets, too 2021-02-02 16:06:33 -08:00
382c1c9da3 Fix tooltip hover flicker in SpeciesFacesPicker 2021-02-02 16:01:46 -08:00
28f457e21f Always show species face tooltip in keyboard nav 2021-02-02 15:43:36 -08:00
cdff51dfef Hook up compatibility data for SpeciesFacesPicker
It looks really nice!! :3
2021-02-02 15:22:08 -08:00
93c00c5e79 [WIP] Species face compatibility UI
Now, when a species isn't compatible with an item, we gray out and sadden the pet, like on Classic DTI!

For now, I've hardcoded only the Zafara body ID to match. Let's do server connection next!
2021-02-02 14:47:17 -08:00
b0a8b41c80 Add focus state to species faces picker 2021-02-02 14:19:11 -08:00
d16bfd9781 Use higher-res pet faces on higher-res devices
Didn't realize there was a convenient 150x150 face thumbnail we could use, so hey! Nice!

At one point I was considering generating our own thumbnails, but this is making me increasingly interested in just scraping the Rainbow Pool or something :p
2021-02-02 13:15:42 -08:00
33353e5328 Fix uncaught promise error in search results
Sentry issue IMPRESS-2020-20 doesn't have a clear backtrace, but it looks like the usual thing where we trigger an Apollo query directly, and forget to catch a potential error in the returned promise. I noticed that the last thing the user did was type in the search bar, and got a _caught_ error for the initial search!

Scanning the SearchPanel file, I think it's likely that this was a failure in `fetchMore` for the infinite pagination.

I'm a bit worried as to _why_ we were doing infinite scrolling stuff when there were no results? I wasn't able to repro a scroll event on the empty results list, but it's plausible that it could happen. I've added a gate to not send this request when there's an error!
2021-02-01 19:08:20 -08:00
05282f4b7b Handle memory issues in OutfitMovieLayer
I think what's happening in Sentry error IMPRESS-2020-1F is that mobile devices are running out of memory, so `canvas.getContext("2d")` returns null.

Now, we have a UI affordance to let you know when this is probably what's happening!

Also, when researching this, I learned about a Safari bug where you need to manually garbage-collect your own canvas data. It's possible that Safari users have been having particular trouble with memory leaks over long sessions? I'm not sure, but it seems like a good idea to add this small garbage-collection code!
2021-02-01 18:55:05 -08:00
5d827bc78d Disable species/color picker while item page loads
Ok I think I've finally narrowed this bug down! We had one more loading case: the items page needs time to figure out which species/color to default the fields to, and passes null into the component while this loads. Now, we wait for that!
2021-02-01 18:05:29 -08:00
be7401d62a Recover from missing pose data
Previously, if you typed a pet name on the homepage, but its pose wasn't labeled in our database, you'd get a black empty screen. Now, we redirect to the UNKNOWN pose, or whatever exists for us to use!
2021-01-28 10:37:04 -08:00
71ec5ddc58 Group poses by emotion first, in PosePickerSupport
I think it's confusing that the poses in the dropdown start with the emotion word, but are grouped by the gender presentation word! It's also different than the precedence order! I've reordered them.
2021-01-28 10:34:09 -08:00
0d14fde318 Add "Customize more" button to item page preview 2021-01-26 15:09:41 -08:00
10e09e266c Add debug logging for species/color picker bug
We're occasionally getting errors on the homepage, of the new message I added: `Error loading valid poses for species=, color=108: byteOffset cannot be negative`.

So ok, now we know it's a species undefined bug, coming from `onChangeSpecies`! That suggests we're not finding by ID correctly?

So I'm adding some new logging to help me understand the sequence of actions leading up to this point, and the species data state when the error itself happens!
2021-01-26 14:08:09 -08:00
f74fc05112 Fix remaining chunk error noise
I've been getting more Sentry errors about JS chunk errors after deploys, and finally looked into it!

Turns out that, our try/catch handling was working great, and the page was reloading correctly for users as expected. But in these scenarios we would _also_ throw and log two uncaught errors!

The first is that, because we're a single-page app, unrecognized routes fall back to the index.html by default (to power our custom client-side routes, like /outfits/123 etc). So this meant that missing JS files, which _should_ be returning a 404, were instead returning 200 OK and an HTML file, which failed to parse. (And running the script isn't included in the catchable part of the `import` promise!)

Now, in our `vercel.json` config, we catch those paths specifically and 404 them. (The exact choice of path is important: on dev, all these routes run _before_ the dev server, which is responsible for serving the static files - but dev doesn't include hashes in the JS file names, so this 404 route only matches built prod JS files, not local dev JS files.)

The second is that we failed to return anything to `@loadable/component` in the error case, so it would try to render `undefined` as if it were a component class. Now, we return a trivial component class that returns null!
2021-01-26 11:43:27 -08:00
03a3f7ede4 oops, remove unused import 2021-01-25 10:59:10 -08:00
f50de9b11e Add species-face picker to item page previews
Note that it doesn't do any compatibility checking, graying out, hiding unneeded faces, etc. They just exist now is all!
2021-01-25 10:24:39 -08:00
7092d86b76 Better error logging for movie clip errors
I'm getting some vague errors in Sentry about `canvas.getContext` returning null? Weird. (IMPRESS-2020-1F)

I'm not sure what that's about, so I don't want to stop sending it to Sentry. But I do want to make sure we handle this kind of error gracefully! (I'm thinking about how, while I don't think this one was, in the future this _could_ be caused by errors in Neopets movie clip JS, and I don't want our app to start messing up because of it!)

Here, we make sure to log the error to the console with more detail (the library URL), and show feedback to the user, and only log the error once per clip (so that animated ones don't like, send a bunch).
2021-01-23 12:43:17 -08:00
7ac9571ce4 Add error wrapper for potential title bug source 2021-01-22 14:47:18 -08:00
8f8c60d91b Fix crash when user items page not found
Huh, I'm not sure why Apollo is returning `data: undefined`, when the server is definitely returning the correct no-user-found data in the shape I expect... suspicious :/ well, let's at least stop crashing!
2021-01-22 14:38:37 -08:00
38969e8658 Use loading state while loading /api/validPetPoses
Oops, we were getting errors when people tried to change the species/color picker before the valid pose data was ready!

This was only happening on the homepage and item page, because on the wardrobe page we wait for the valids to load before showing the picker at all (`showPlaceholders` is false).

To fix this, we add the valid poses loading state to our existing `isLoading` state on the selects, which disables the element and adds a loading spinner cursor. This prevents interactions we're not ready for!
2021-01-22 14:27:23 -08:00
88fd4698d0 Better handling for getPairByte errors
I'm not sure why, but people are seeing errors when reading from the /api/validPetPoses binary blob. I think it's the picker not handling loading states well?

In this change, we start by just giving it graceful handling, and improving the logging. I'll also try to fix the cause in the next change!
2021-01-22 14:23:05 -08:00
fca3ccf0a0 Don't remove word from query in Advanced Search
Oops, we were removing the last word of the search query if you picked a suggestion from Advanced Search! That behavior is meant for the case where you're _typing_ a filter name 😅
2021-01-22 14:14:31 -08:00
a527d44e12 Handle removing last word of empty text
Sooo, I added this more graceful regex and error logging… then realized that this shouldn't be happening in the first place, because we should only be removing the last word of the query if you picked the filter via typing, not advanced search!

I'm glad to have the assertion error and the new handler, but I'll fix the cause too in the next change :p
2021-01-22 14:12:07 -08:00
4c0afae38e Fix bug that caused filter text "NC you own" 2021-01-21 17:35:03 -08:00
539a6bd740 Oops, fix bug where suggestion didn't remove word 2021-01-21 17:32:37 -08:00
2a08aa5ce9 Mention "items you own" filter on homepage 2021-01-21 17:28:06 -08:00
add7fc0cb6 Add Advanced Search toggle button
It shows all of the suggestion options!

I feel like the state stuff on this isn't super robust, I hope it works okay!
2021-01-21 17:23:34 -08:00
5799c725ff Use plural zone names and "Zone:" prefix in search
We were getting away with singular stuff like "Hat" in the filter text for a while, but once it became "Hat you own" it got too weird imo!

Now, we say "Hats" and "Hats you own" in the filter text. We keep the singular in the search suggestion, but with the "Zone:" prefix, which is something I've been wanting anyway. (It should help with the show all suggestions UI coming soon, too.)
2021-01-21 16:46:23 -08:00
82c1eefb13 Add a no results message to the item search page 2021-01-21 16:39:43 -08:00
d0f133acda Stop showing clear on item search page when empty
Oops, the old condition depending on `queryFilterText` to implicitly check for filter presence. But now that we always show "Items" as prefix text for the filters on this page, the reset button was always showing!

Use our new util function instead.
2021-01-21 16:38:08 -08:00
11fae604be Fix flash of content when emptying search field
1. Search for something
2. Clear the search bar
3. Quickly start typing something new

Before this change, the results would clear on #2, but then the old results would show up again during #3, before the loading state for the new query.

This matches the logic, right? We hid the results when both the current and debounced query were empty, and, during that time, neither is empty.

Instead, here we update the `useDebounce` hook to have a `forceReset` option, to immediately clear out the value instead of waiting.
2021-01-21 16:03:14 -08:00
701eb33391 Add "Items you own" and "Items you want" filters 2021-01-21 15:58:24 -08:00
2164f06021 Add --resync-existing to cache-asset-manifests
Wowie, looks like all the SVG asset manifests changed format lol! Running this now to update them all. There's a lot of them!
2021-01-21 15:14:23 -08:00
81117218a3 Only wait for auth on queries that need it
I switched from my `_NoAuthRequired` opname hack, to a more robust `context` argument, and it's opt-in!

This should make queries without user data faster by default. We'll need to remember to specify this in order to get user data, but it shouldn't be something we'd like, ship without remembering—the feature just won't work until we do!
2021-01-21 14:57:21 -08:00
7f777ed5b3 Add page-reload recovery to *all* code splitting
Still getting some chunk load errors in my Sentry reporting! My hunch is these are the culprit. I hooope that after this the errors are pretty much gone! If not, then I'm missing something about what causes these failures…
2021-01-21 14:34:55 -08:00
ffc697b241 Move our loadable wrapper into util
I wanna use it for other loadables, too!
2021-01-21 14:27:05 -08:00
353f90dcac Fix /conversion styles on mobile 2021-01-20 10:56:09 -08:00
f40ccf0b21 Fix bug where we weren't recognizing new SVGs
So, we've been behind the latest conversion data for a while anyway, because I don't run the sync very often. But I ran the sync today and noticed that the newly converted SVGs weren't showing up in DTI!

This is because TNT changed the asset manifest structure they use for SVG-only assets. Now, we support both!

To test, I checked the Blue Acara (old-style SVG manifest), the Blue Chia (new-style SVG manifest), and the Floating Negg Faerie Doll (animated clip).
2021-01-20 10:44:32 -08:00
275d1d62ab Add secret HTML5 conversion page at /conversion
A lil page for us to keep track of Neopets's HTML5 conversion progress!
2021-01-20 10:44:29 -08:00
ccd4885aad Add "New updates" / "Coming soon" to homepage
Not really sure how to scale these over time, I feel like some amount of history + blog cuteness could be fun? And like, the ability to catch up if you come back after a couple weeks could be nice. But this seems like a really useful at-a-glancer for folks!
2021-01-19 15:46:21 -08:00
61d60170f3 Fix console error in SearchToolbar on add filter 2021-01-19 14:34:30 -08:00
0333b47c05 Leave search suggestions open on blur
Someone wrote in how, when your search query ends with a string that creates Advanced Search suggestions, clicking on items in the list requires two clicks: one to blur and dismiss the suggestions, and one to actually click the item.

Here, I'm experimenting with just leaving the suggestions open. It doesn't feel _great_, but it definitely feels _better_ than before on this edge case, and I thiiink this only affects this edge case in practice? We'll see if it feels goofy in some cases I forgot tho!
2021-01-19 14:27:55 -08:00
94efb80e65 Handle bugs in neopets username data
Huh, looks like it's possible for a user's NeopetsConnection record to be missing, despite having the ID on their User record!

Here, we handle that case.
2021-01-19 13:55:25 -08:00
8aa644a031 Stop sending client-side nav transaction to Sentry
Oops, we hit our Sentry transaction limit after 3 days!

This is in part because we selected a 100% sample rate to start, but also because our app has a lot of client-side navs that don't represent real navigation, and are just to update the state in the URL.

I'm not using most of Sentry's performance tracing features, though! I don't have logging that helps us understand once the page is really done, and I'm only really able to use Web Vitals right now - which only applies to first-time pageload events, anyway. So, that's now all we track!
2021-01-18 16:31:02 -08:00
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
9e5dfd1c84 Move "Log out" button into the nav menu
When actually using mobile, I was like "oh, it's maybe not great that the menu button is tiny and the Log out button is huge". Awkward click targets!
2021-01-18 13:51:52 -08:00
6e33132881 Load homepage faster for logged-in users
When building the code to await auth before sending _any_ GraphQL queries, I didn't realize that auth might be kinda slow. So, I've added a hack to let me mark queries with no user-specific data to skip auth, and applied that to the main queries on the homepage.

I think this is a hint that we might want to change our strategy - e.g. to flip it to hackily mark that auth _is_ required, or to create wrappers or option-builder helpers for logged-in queries, etc.

I also notice that SSR would have resolved this particular case...
2021-01-18 07:15:00 -08:00
154046695f Avoid alt text flash of content for item thumbnail 2021-01-18 06:51:23 -08:00
b78cede939 Add brief delay before Latest Items loading state
This UI generally loads very fast, thanks to the CDN cache, so the flash of skeleton content is more distracting than anything else! We still show it quickly after 300ms, but good network connections should reliably get it loaded before then.
2021-01-18 06:46:18 -08:00
f3633f5ab6 Privacy policy copy tweak 2021-01-18 06:44:07 -08:00
334d89c101 Add Latest Items section to homepage 2021-01-18 06:31:27 -08:00
934dd829c6 Fix ChunkLoadError crashes after deploys
Our host, Vercel, doesn't keep old build files on its CDN after a deploy for very long. This means that, after a deploy that changes a page's bundle, existing sessions that attempt to navigate to it for the first time will fail on the dynamic `import`, because the filename hash has changed.

The best fix I'm aware of for this is to just, reload the page when this happens!

To test this, I did the following:
1. Use `yarn build` to build a prod copy of the site.
2. Use `serve -s build` to start serving it on its own port. (API endpoints won't work, and that's okay!)
3. Don't touch the open copy of the site yet.
4. Make a change to `PrivacyPolicyPage.js`, and `yarn build` again. This simulates a deploy under similar circumstances.
5. Open the Console, tick the "Persist Logs" option, and try to navigate to Privacy Policy. Observe that it logs a ChunkLoadError in the console, and smoothly reloads the page to show you the updated Privacy Policy page.
6. Undo your change 😅
2021-01-18 05:17:14 -08:00
ca088f3310 Group Sentry stats by route 2021-01-17 08:48:22 -08:00
753305dd11 Fix "Untitled outfit" on open outfit in new window
Previously, when you navigated directly to an outfit by typing the URL into the browser or following an external link, the name would stay as "Untitled outfit", even after the outfit loaded.

This was because, when you render an `Editable` Chakra component with `value={undefined}`, it permanently enters "uncontrolled" mode, and providing a value later doesn't change that.

But tbh passing `undefined` down from outfit state wasn't my intention! But yeah, turns out the `?.` operator returns `undefined` rather than `null`, which I guess makes sense!

So, I've fixed this on both ends. I'm now passing more `null`s down via outfit state, because I think that's a more expected value in general.

But also, for the `Editable`, I'm making a point of passing in an empty string as `value`, so that this component will be resilient to upstream changes in the future. (It's pretty brittle to _depend_ on the difference between `null` and `undefined`, as we saw here 😅)
2021-01-17 08:19:47 -08:00
9b0a99e2ae Mention starred outfits in "Your outfits" WIP 2021-01-17 08:05:05 -08:00
e149d53595 Back links to Your Outfits, *if* it's yours
Previously, when you clicked on a saved outfit from Your Outfits, the back button would take you back to the homepage, which was confusing for scanning through stuff! Now, it goes back to Your Outfits if it's yours.

I'm not suuure this is the behavior we want? But it seems intuitive enough!
2021-01-17 08:04:21 -08:00
2dbed8b8c4 Use default values for plain /outfits/new URLs
Previously, if you navigated to /outfits/new without a species or color in the query string, we'd show a blank outfit page, with the species/color picker hidden. Now, we default to a Blue Acara instead!

We don't do anything to handle _invalid_ species/color IDs, but I don't super mind that, because in practice that would require some call site to malform the URL, and I don't super expect that.

This resolves more of the _cause_ of Sentry issue IMPRESS-2020-8, but I'm still wondering how a user got to the URL `/outfits/new?[object+Object]=&objects[]=35185&objects[]=67084`. I'm wondering if the pet loader on the homepage has a bug in Safari? I feel like I heard something like that from the feedback form, too...
2021-01-17 07:43:08 -08:00
f1dd3bffa6 Hide species/color on wardrobe page when not ready
If the species/color of the current outfit aren't available yet (e.g. a saved outfit is still loading in), hide the picker altogether. This is because the picker can't handle change events during that time, and it's easier to just hide all this than to add special case handlers like disabled states! (And, while placeholders are often helpful, I'm not sure the placeholder dropdowns are any better than empty space in this case.)

This can also happen when the user loads a page without a species/color ready, like just going straight to `/outfits/new`. I think I might want to add a handler for that, though.

Resolves the direct cause of Sentry issue IMPRESS-2020-8, though I'm not sure how the user got to the URL `/outfits/new?[object+Object]=&objects[]=35185&objects[]=67084` in the first place...
2021-01-17 07:24:54 -08:00
33ee4455a7 Gracefully handle unexpected SWF URLs
Fixing our support for our "Totally Legit DTI Graffiti" item 😅

In addition to this change, I also uploaded the images to the correct URLs: the old site was doing the folder algorithm in a surprising way, yielding https://impress-asset-images.s3.amazonaws.com/object/000/000/0-1/-1/600x600.png, whereas the new site was doing the (imo clearer) https://impress-asset-images.s3.amazonaws.com/object/000/000/000/-1/600x600.png. I copied the files to the new location.

I also noticed that the thumbnail URL for that item has been broken for a while, so I created a new copy at https://impress-asset-images.s3.amazonaws.com/object/000/000/000/-1/80x80.png, and updated the database record to point to it.

This should resolve Sentry error IMPRESS-2020-6.
2021-01-17 05:16:53 -08:00
7393991046 log search result errors
We showed an error to the user, but nothing in the console! Now we have it :)
2021-01-17 04:47:11 -08:00
f6ce8611b2 Clearer errors when image download fails
Two fixes in here, for when image downloads fail!

1) Actually catch the error, and show UI feedback
2) Throw it as an actual exception, so the console message will have a stack trace

Additionally, debugging this was a bit trickier than normal, because I didn't fully understand that the image `onerror` argument is an error _event_, not an Error object. So, Sentry captured the uncaught promise rejection, but it didn't have trace information, because it wasn't an Error. Whereas now, if I forget to catch `loadImage` calls in the future, we'll get a real trace! both in the console for debugging, and in Sentry if it makes it to prod :)
2021-01-17 04:42:35 -08:00
cfb5504341 Add hidden command to send test error to Sentry
I haven't seen anything come in from prod yet, and it's hard to trigger one, maybe because the integration is React-specific? Or maybe it's... not working :p

I can send errors from dev! But just haven't _seeeen_ a prod error come in yet.

Maybe we're just squeaky clean tho :3
2021-01-16 12:01:28 -08:00
ffe411c0b1 Add Sentry error logging + privacy statement
My main reason for adding this now is that I'm getting some scattered reports of things not displaying correctly, and I want to start gathering some browser data on that...

I recently confirmed that animations work on iOS (at least one did!), which was going to be my guess of what was breaking...
2021-01-16 10:59:54 -08:00
888825b1b7 add explainer text to outfits page WIP callout 2021-01-14 06:45:07 -08:00
9ce5a230e1 add cute "Impress 2021" flavor explainer text 2021-01-14 06:43:55 -08:00
1376e95f84 bug fixes for new ItemCard
Oops, I messed up the background color in dark mode! and left in an extra `as` prop
2021-01-14 05:34:13 -08:00
8567f9d4b8 Try a grid-based view for item lists
I took out virtualization for now too, I wanna see how this non-Chakra UI version, with fewer nodes and no tooltips etc, performs on large lists in production.
2021-01-14 04:58:40 -08:00
7a5a6b919b Fix Download button
Huh, I'm not sure why SVGs ever didn't have `crossOrigin: "anonymous"`? The old commit isn't really super helpful for understanding that. Maybe I just didn't notice the problem in that case?

Well, whatever. Let's see if this breaks something else! (I'm also wondering if we should just like, _always_ ask for things with crossOrigin set?)
2021-01-08 17:38:27 -08:00
11767828cf Disable PosePicker while saved outfit is loading
Oops, if you try to show PosePicker before we have a species/color ready, it sends a bad GraphQL request. No visible user impact, just an unnecessary network call and an error in the console! This happens when you're loading an outfit by ID.

Here, we hide PosePicker if there's no species/color ready yet. This stops the extra request from firing!
2021-01-08 03:37:56 -08:00
c7929b29a5 Fix awkward blinky loading state for outfit
When loading an outfit in the wardrobe page, there was an awkward state where the outfit preview loading spinner would vanish and then reappear.

This was because `useOutfitState` briefly reported `loading: false`, then fixed itself after almost immediately—but our OutfitPreview component has a delay before re-showing the spinner.

In this change, we smooth out the loading state, by enabling the second GQL request to start immediately once the first request is done, instead of waiting on a callback to finish.
2021-01-08 03:19:57 -08:00
62579dc671 Keep outfit thumbnail while individual layers load 2021-01-08 02:53:31 -08:00
9ae1704908 fix visual regressions on Your Outfits page
Oops, when refactoring and adding alt text, I didn't realize the padding for the text would affect the images too! And I forgot to add `overflow: hidden` to round the image's corners. Fixed!
2021-01-08 01:26:28 -08:00
2a8be58973 Show thumbnail in wardrobe page while outfit loads
To help the load time for outfits feel shorter, we now reuse the outfit thumbnail from the Your Outfits page as a placeholder!

This doesn't add any overhead when the thumbnail data _isn't_ in your session cache, e.g. if you navigate to the outfit directly. But if we have the thumbnail on hand already, we just show it, easy peasy!
2021-01-08 01:23:24 -08:00
fe799a9bbc Add alt text to OutfitCard images 2021-01-08 00:35:56 -08:00
b478f35103 Refactor OutfitCard a bit
Preparing to make a skeleton version for loading!
2021-01-08 00:35:09 -08:00
3804457839 fix OutfitPreview fade out bug
Oops, when switching to @emotion/react, it turns out they no longer support that cute hack I was doing to append suffixes to class names!

Here, I change strategy and let `CSSTransition` apply the plain `exit` and `exit-active` classes to its children, and apply Emotion styles to the child to check for _also_ having those classes.
2021-01-07 00:33:51 -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
4a352e04e0 simulate login with IMPRESS_LOG_IN_AS flag 2021-01-05 23:22:03 -08:00
20f3ca75b0 fix caching on Your Outfits page
Oh right, we can't cache objects  well when they're missing their ID!

Before this change, selecting an outfit then navigating back would require the outfits to reload. Now, they stay!
2021-01-05 06:45:27 +00:00
12b357fad9 oops, tweak outfit data query slightly 2021-01-05 06:43:33 +00:00
95d94a4844 Show loading spinner when outfit data is loading
A pretty easy tweak, phew!
2021-01-05 06:42:09 +00:00
102a29fefd show outfit name faster, instead of "Untitled Outfit"
That'll still show up when the outfit is still loading, but this lets us use the Apollo cache to show the name instantly if you're clicking through a link from Your Outfits
2021-01-05 06:39:12 +00:00
1f5a9d60a2 Show saved outfits in wardrobe page!
Still a pretty limited early version, no saving _back_ to the server. But you can click from the Your Outfits page and see the outfit for real! :3 We have a WIPCallout explaining the basics.
2021-01-05 06:29:39 +00:00
6749d19f9e fix dev emotion crasher in wardrobe page
This seemed to only show up in dev? But right, I guess it's not happy about passing stuff from ClassNames into a Popover Portal. Move it inside, fixed!
2021-01-05 05:51:54 +00:00
f36d6831d0 make outfits page links, to classic DTI
Mostly just getting the link style figured out! But getting them actually working is coming soon :)
2021-01-05 05:20:07 +00:00
71bb593974 center outfits, helps a lot on mobile
I pulled it up on my phone, and there was only one column, and being left-aligned for that was bleck!

This is a good spacing compromise, I think :)
2021-01-04 09:36:01 +00:00
c9603a40ea tweak site bg color, to let card elements "pop"
This has been bothering me for a long time, but I couldn't really figure out what to do about it. But tweaking the site bg color a smidge has helped us really add texture to the cards I want to have pop out, like the outfit polaroids!

I kinda went all-in in a burst, but tbh I think it looks great :3

I haven't really touched the wardrobe page with it yet though, that'll probably need some tweaking... for now I'm overriding it to keep the old background!
2021-01-04 09:17:54 +00:00
98604b39da add message for when you have no outfits 2021-01-04 08:47:39 +00:00
72a99fd5bf fix dark mode styles for outfits page 2021-01-04 08:45:52 +00:00
be7de27c5c refine outfit thumbnail card styles 2021-01-04 08:39:15 +00:00
b01feba038 add items to outfit thumbnails
Now that wasn't so hard! :3
2021-01-04 08:26:05 +00:00
9a2308fd41 add Outfits link to global header 2021-01-04 08:13:37 +00:00
259ae9bd87 add WIP callout to outfits page 2021-01-04 08:12:25 +00:00
30e0a149be basic outfits page with pet-only thumbnails 2021-01-04 08:10:35 +00:00
b8d919b247 basic outfit data from GQL 2021-01-04 07:36:00 +00:00
778eefbdd5 placeholder Your Outfits page
it requires login, and runs a GQL query that will fail 😅
2021-01-04 07:31:02 +00:00
e0af75d927 outfit-images: render actual PNG and SVG layers! 2021-01-04 05:58:19 +00:00
d875b5f6ce outfit-images: use node-canvas to render image 2021-01-04 04:17:32 +00:00
385c476ae8 outfit-images: placeholder function and test! 2021-01-04 04:17:09 +00:00
79bde552e2 move src/images into src/app/images
I'm gonna add a `src/shared` next, and it felt weird for `images` to be a sibling, esp since the images are only for the client app!
2021-01-04 03:49:08 +00:00
4120c7aa88 fix large-icon visual bug
Looks like there was some kind of runtime conflict when running @emotion/css and @emotion/react at the same time in this app? Some styles would just get clobbered, making things look all weird.

Here, I've removed our @emotion/css dependency, and use the `<ClassNames>` utility element from `@emotion/react` instead. I'm not thrilled about the solution, but it seems okay for now...

...one other thing I tried was passing a `css` prop to Chakra elements, which seemed to work, but to clobber the element's own Emotion-based styles. I assumed that the Babel macro wouldn't help us, and wouldn't convert css props to className props for non-HTML elements... but I suppose I'm not sure!

Anyway, I don't love this syntax... but I'm happy for the site to be working again. I wonder if we can find something better.
2021-01-04 03:11:55 +00:00
fd864ab8ec fix cache-asset-manifests script
Just wanted to run it and see if much has been converted since we last checked!
2020-12-28 14:00:11 -08:00
1d498ef960 remove Storybook
This was helpful for playing with OutfitMovieLayer, but we haven't found it super useful since then. We can re-add it later if we want it!
2020-12-28 13:49:46 -08:00
82003a91de fix a11y warning in privacy policy 2020-12-25 09:21:54 -08:00
131ff9d4c2 upgrade to new Chakra extendTheme API 2020-12-25 09:20:18 -08:00
91982c60d9 update to new Chakra <Wrap> API 2020-12-25 09:17:24 -08:00
b023cbeaf9 use @emotion/css instead of plain emotion 2020-12-25 09:09:16 -08:00
406849182a update chakra imports 2020-12-25 09:08:33 -08:00
a6ef12a5dd lol change the privacy policy link text from "Hey" 2020-12-07 22:56:58 -08:00
b07924c40f add a privacy policy 2020-12-07 22:56:23 -08:00
5342968872 fix a weird virtualization bug
surely not the last :p
2020-12-07 19:18:34 -08:00
0c2ec4685e use react-virtualized to speed up user items page
There's a known bug that items with a lot of zones will overflow the row… filing that as a separate fix tho!
2020-12-07 18:58:10 -08:00
d59a4948a0 fix species/color dropdown focus bug
Oops, creating a new `SpeciesColorPicker` fn on each render meant that React treated it as a whole new dropdown each time. I've extracted it out into a stable component class, and just pass in the extra props now!

This bug caused changes to kick you out of focus for the dropdown, because it had unmounted and remounted.
2020-12-04 13:01:39 -08:00
0674834fb2 try column headers "Trade for your/their…" 2020-11-25 02:24:15 -08:00
f09c17e2f5 oops, fix empty matches bug on seeking page!
I fixed a bug in `itemsTheyWantThatCurrentUserOwns`, but forgot to fix it in `itemsTheyOwnThatCurrentUserWants`!
2020-11-25 02:09:03 -08:00
def46b0d9c add matches to the trades list page when logged in 2020-11-25 01:53:42 -08:00
066b914bd5 random-sorted "this week" for most recent trades 2020-11-25 00:33:00 -08:00
7310e62699 trades page col heading tweak 2020-11-24 23:59:44 -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
429d7fd497 "Search for another user" -> "Find another user"
copy was too long for the search field on some devices!
2020-11-24 21:21:38 -08:00
8a06ac7fb9 perf upgrade for UserItemsPage
I knowingly wrote this less performant at first. And indeed, it was slow—like 2sec of main thread time! Turn that O(mn) into O(n) pls!
2020-11-24 21:03:45 -08:00
a7e32232e2 fix query op name on UserItemsPage 2020-11-24 20:54:10 -08:00
bb173552e9 oops, use client-side nav for these links! 2020-11-24 15:05:23 -08:00