Commit graph

1025 commits

Author SHA1 Message Date
39f6c6f4ac Explain why AppearanceLayer.imageUrl can be null 2021-06-02 14:27:11 -07:00
cb55881029 Switch back to $20/mo copy 2021-06-02 14:26:47 -07:00
da8cd8eda9 Extend the outfit deadline to Aug 1
I figure 1 month is fiiiine, but 2 months is less likely to catch people unawares, and I think that's important here.
2021-06-01 17:38:23 -07:00
e1d6981274 Fix mobile layout for outift URLs no-op message
Copied styles from the similar layout in the bulk converter tool! The status will flush to the right of the field header on desktop, and move below the input on mobile.
2021-06-01 17:35:29 -07:00
9191a5a65a Add UI for already converted outfit URLs
When the outfit image URL is already converted, we show a happy no-change message!
2021-06-01 17:32:27 -07:00
1865d62945 Clarify that outfit page links won't change
I add copy to indicate this, and update the tool to respond with a happy-looking no-change UI when you put in an outfit page link!
2021-06-01 17:29:13 -07:00
d461686bc3 Fix Maraquan modeling
This was a known oversight, that I've finally fixed because I realized this subquery probably would be just fine lol!

Now, instead of removing rows with _all_ species modeled, we remove rows with all species _for that color_ modeled.

This leaves the rest of the modeling list unchanged, but removed 10 Maraquan items that were done modeling but still on the list:
- Dyeworks Coral: Maraquan White Beaded Gown
- Dyeworks Green: Maraquan White Beaded Gown
- Dyeworks Lavender: Maraquan White Beaded Gown
- Dyeworks Purple: Maraquan Wig with Negg Accessory
- Dyeworks Lavender: Maraquan Sea Blue Gown
- Dyeworks Pink: Maraquan Sea Blue Gown
- Dyeworks Silver: Maraquan Sea Blue Gown
- Maraquan White Lace Gown
- Underwater Maraquan Markings

(I also went in the database and marked the "Maraquan Ocean Blue Contacts" with the `modeling_status_hint = "done"`, because it's not compatible with Lutari.)
2021-05-27 17:39:56 -07:00
8525ac393f Fix GraphQL docstrings
Oops, right, I forgot for a while that GraphQL fields have a special syntax for docstrings, and it's not just comments! This will help stuff show up in our GraphQL Playground API docs correctly 🥰
2021-05-27 16:51:31 -07:00
abc322c24d Remove imageUrl from Outfit GQL
I'm not sure which image url is better to return from stuff like this, and I don't actually have a use case for it anymore, so let's just clear it out until we need something like it!
2021-05-26 20:01:03 -07:00
684bf5778f Use live outfit URLs in bulk converter 2021-05-26 20:00:01 -07:00
929e6c57a4 Use live outfit image URLs in single image converter 2021-05-26 19:57:06 -07:00
3603d6fd85 Explain the error condition 2021-05-26 19:11:04 -07:00
81b434347a Add title to OutfitUrlsPage 2021-05-26 19:03:21 -07:00
accd847a7d Merge branch 'main' of github.com:matchu/impress-2020 into main 2021-05-26 18:50:25 -07:00
7f0a450480 Apply sampling rates to Honeycomb events
Oops, we get a _lot_ of outfit image requests, and it's pushing the limits of our free Honeycomb plan! But I don't really need all that much detail, because there's so many.

So, we here apply sampling! `api/outfitImage` is getting a 1/10 rate, and for GraphQL, `ApiOutfitImage` is getting 1/10, and `SearchPanel` is getting 1/5.

I had to add a `addTraceContext` call, to give all the child events awareness of what operation they're being called in, too!

I haven't actually tested that this is working-working, just that the endpoints still return good data. We'll see how it shakes out in prod!

But I did add `console.log(sampleRate, shouldSample, data);` to the `samplerHook` briefly, to see the data flow through, and I reloaded a `SearchPanel` request a few times and observed a plausibly 20% success rate.
2021-05-26 18:50:19 -07:00
5cab2c87c4 Fix UC outfit images
Oops, I wasn't requesting `bodyId` for item layers, so the check for `layer.bodyId !== "0"` was always true—because it was always `undefined`, even when it should have been `"0"`.

This wasn't an issue on the client, because the client _does_ request `bodyId` for caching item appearances between pets of the same body, and I didn't realize that it needs to be part of this fragment too!
2021-05-25 17:02:29 -07:00
e829cc5525 Add a delay to bulk image conversion loading state
Right, yeah, in prod this is way faster, so the loading indicator is a distraction!
2021-05-25 05:49:47 -07:00
5f1980241f Oops, don't stretch preview when showing error
Right, oops, if you typed an invalid image url, the preview square would try to stretch to match! Now, it has a max-height to match its max-width.
2021-05-25 05:47:58 -07:00
11703140c4 Add more explainer copy to /outfit-urls 2021-05-25 05:46:10 -07:00
a08f4e3bd1 Fix controlled component warning
Mm right, when we first render the output, `imageUrl` is `undefined`, so the output textbox renders with `value={undefined}`, which is an "uncontrolled" component that the DOM is free to change.

In practice, this isn't an issue because the textbox has `isReadOnly`, so the user can't _actually_ change it. But it's still a good idea for consistency and clarity to use an empty string instead of `undefined`, and it removes warning spam from my console!
2021-05-25 05:30:57 -07:00
f9f8cdc553 Wire up the bulk outfit image converter
Heck yeah, it's looking great!! Good error handling too :) you can test the partial error case by changing some image URLs to have invalid IDs.
2021-05-25 05:28:02 -07:00
08eee30743 Lookup/petpage converter layout upgrades
Added placeholders, and improved copy styles

I tried a two-column view for desktop, but it's too busy with the long label text. This is clearer!
2021-05-25 04:17:09 -07:00
8b3cfe7118 Basic lookup/petpage design for /outfit-urls
Not converting yet, and only mobile design, but hitting save on it anyway!
2021-05-25 04:04:35 -07:00
01711fe0c2 Don't shrink error icon for long error text
Oops, previously the MajorErrorMessage was willing to shrink the width of the cute Grundo Programmer icon, to allow error messages with long words to avoid word breaks.

Here, we switch `1fr` for `minmax(0, 1fr)`, which allows the text zone to get smaller. (`1fr` is short for `minmax(auto, 1fr)`, which isn't capable of shrinking smaller than the natural value.)

Now, the error text is more willing to shrink by word-wrapping, than the image is by shrinking the image. Success!
2021-05-25 03:54:14 -07:00
390c21b53e Add image converter to /outfit-urls
Adding the tool that will help people convert one image at a time!
2021-05-25 03:35:32 -07:00
42b8c3833c Create /outfit-urls page
Gonna put an upgrade tool here for outfit images, and provide the URL in the replacement images on S3!
2021-05-24 21:07:30 -07:00
e5551a6847 Fix performance regression in SpeciesColorPicker
Oops, my cute API idea for `speciesPickerProps` breaks `React.memo`, of course!

We could fix this by having the caller memoize the `speciesPickerProps` object, but that's too unusual and error-prone. We could also fix this by writing a custom function for `React.memo` to determine whether props match, but that seems like overkill when there's only one actual prop we're using here in practice.

So yeah, I've updated `SpeciesColorPicker` to just accept `speciesTestId` and `colorTestId` props instead!

Note that actually this component _is_ still re-rendering too often, because of a Chakra bug I just discovered and reported! So this change won't immediately improve performance, but it should stop re-rendering too often once we _also_ upgrade Chakra after this bug is fixed. https://github.com/chakra-ui/chakra-ui/issues/4080
2021-05-24 17:50:31 -07:00
e3ae5e7116 extract PaginationToolbar from ItemSearchPage
wanna reuse in like outfits page
2021-05-21 00:50:55 -07:00
9722addd3f Generate outfit images by ID alone
Not using this anywhere in-app yet! But might swap it into the user outfits page, and use it to server-side-render social sharing meta tags!

Also eyeing this as a way to replace our nearly 1TB of outfit image S3 storage, and save $20/mo…
2021-05-13 18:03:56 -07:00
8f495d8302 Move getVisibleLayers to a new shared directory
This folder will include code shared by both the client-side app and the server!

The server isn't using it yet, but it will in a new API endpoint soon! I'm doing this in a separate commit to avoid lumping all the import-change noise into that commit.
2021-05-13 17:35:58 -07:00
3e981d82b4 Extract getVisibleLayers to its own file
I'm doing this in preparation for an API endpoint to build outfit images by ID. It'll need the same logic to decide which layers are visible, and the same GQL fragments to load the relevant data!
2021-05-13 17:33:54 -07:00
eec73d245b Add PB badge to items in search / homepage
Oh right, labeling PB items as NP is confusing! Here, we add a "PB" case to the lil badge on the corner of the item thumbnail, in item search page & homepage Newest Items.
2021-05-13 16:24:24 -07:00
c8feb9a7e0 Fix infinite loop when searching for Markings
Oops, we did an in-place sort on the search variables we passed to Apollo! This meant that Apollo's first read of the variables wouldn't match later reads, so it would always decide the variables had changed, causing an infinite re-render loop.

Remember to copy existing arrays before sorting! 😅

Incidentally, this only happened for Markings, by coincidence: it's the only (I think) searchable zone label with multiple zone IDs, that don't sort alphabetically the same as they sort numerically. This `.sort()` sorts them alphabetically, whereas they come in numerical order in `allZones`, because that's the order the GQL server returns them in `build-cached-data.js`.
2021-05-13 00:28:06 -07:00
b521f79a13 Don't auto-select the first item search filter
There have been usability problems with this search filter UI, and I think they mostly come down to people accidentally selecting filters when they don't mean to—sometimes pressing Enter to indicate that they're done typing, but accidentally selecting something.

Here, we remove that behavior, and additionally add a new behavior to clear the suggestions on pressing Enter.
2021-05-12 23:08:54 -07:00
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