Commit graph

1117 commits

Author SHA1 Message Date
edb4ad7a3c Add trade matching to list page
I changed my mind and just went for the same sorting solution as before! Maybe we'll upgrade this later, or maybe not!
2021-06-18 17:53:17 -07:00
cf456c761c Remove stray code for not-in-a-list
I'm not actually sure we're gonna support pulling these out into pages? I might just have them be straggly dangling old less-optimized :p
2021-06-18 17:43:43 -07:00
01000c84f1 Cache ClosetList in Apollo
Now, when you click from the user's lists page to a specific list, we'll share the  data instead of showing a full loading screen!
2021-06-18 17:29:44 -07:00
f20c68ea81 Add description to list page
Pulled MarkdownAndSafeHTML into a shared component, and use it on the single list page now too!

I also simplified some of the logic for the item list, because I figure we'll have to give the trade matching stuff its own pass, y'know?
2021-06-18 17:26:21 -07:00
3cd0ffd764 Fix private lists page
Oops, I pulled `currentUserId` from the wrong place, so it was always acting as if you're logged in! Now, you can see the list page for your own private list!
2021-06-18 17:25:05 -07:00
d386ccfad8 Show placeholder when item description is blank
I'm not sure real item data "should" ever do this? Our "Written Word Shower" had a blank description, but I think that was an error on our end.

Anyway, it's clearer than showing infinite loading, so!
2021-06-17 21:31:04 -07:00
6ae22d171b Fix previews with large source images
Oops, okay, I guess I didn't test the new preview centering stuff with 1200x1200 images, like the Usul's Damask Markings.

Now, I apply a max size to the whole-ass container, and make the parent responsible for centering it.
2021-06-17 15:37:01 -07:00
0de5a5efff Update browser list
`npx browserslist@latest --update-db`
2021-06-17 15:32:13 -07:00
70a31c794e Fix dependencies for prod
Hmm, prod builds weren't happy with how I specified the version here

…do prod builds not listen to the lockfile? Suspicious :p
2021-06-16 18:28:40 -07:00
75ceeba6e2 Bundle CreateJS, instead of loading async
So I finally started looking into the race condition that makes item previews sometimes fail to load, and as expected, it was that we were trying to load the movie before CreateJS had necessarily loaded. Usually the timing worked out, esp after a reload, but not under certain circumstances!

Anyway, I've been wanting for a while to just bundle them instead. That'll help us more eagerly load them when we need them, and not depend on external CDNs, and remove a bunch of loading state!

So yeah, I had to learn how the `easeljs` and `tweenjs` NPM packages did their bundling, and how to use `imports-loader` to let them just register straight onto `window`! But we got there and it's pretty nice tbh!
2021-06-16 18:00:25 -07:00
bb5ec56752 Pause animation when FPS gets too low
Woof, the "Swirl of Power Effect" item tanks my CPU waaay too much

(I bet it's those 7000x7000 PNGs lolol 😬)

Anyway, before thinking about optimizing specific issues, I'm just adding this emergency switch: if we detect FPS < 2 on any layer, we just pause the whole outfit, until the user decides to unpause.
2021-06-16 16:26:24 -07:00
307ab932c8 Add FPS logging to OutfitMovieLayer
This is a precursor to adding an emergency brake if the FPS gets too low lol
2021-06-16 16:06:34 -07:00
25376a8fa8 Register images, to fix movies like Swirl of Power
Oh hey, turns out I was missing a step in movie clip stuff! Images aren't just for sprite sheets, but also sometimes they just want the raw images!

Here, we register them, uwu

Items like "Swirl of Power Effect" and probably others work correctly now!

That said, Swirl of Power takes WAY too much CPU lmao, I want to maybe add some kind of automatic kill switch lol
2021-06-16 15:49:56 -07:00
617ffd9a38 Add --upsert option to auth0 script 2021-06-16 08:24:59 -07:00
5a18a1d041 Oops, fix outfit page SSR title
Untitled outfits need a fallback, or else they show "null"!
2021-06-15 22:49:29 -07:00
5c5bdb11ff Oops, fix Lists page links!
Right, oops, the redirect works when you navigate directly to a URL, but not client-side! Fixed a bunch of 'em 😅
2021-06-15 22:46:43 -07:00
cf30b25be0 First draft of UserItemListPage
A lot is missing! No descriptions, no support for the "Not in a list" case, no scroll performance windowing, no editing!

But it's a start :3
2021-06-12 04:45:23 -07:00
232e35e062 Add not-found case to MajorErrorMessage
Like the previous change, we can use this for a lot of resource loading failure stuff!
2021-06-12 03:25:01 -07:00
468e662a32 Add network error support to MajorErrorMessage
Now we can use this for more of our like, GraphQL failures!
2021-06-12 03:19:09 -07:00
02d7cf73bb Support HTTPS asset URLs
There are a couple spots where we parse SWF URLs to get the ID out! Most visibly, our Support tools were crashing on it. And internally, manifest loading wasn't working. (I'm not sure if this got caught or if it caused crashes in user space? I didn't see them when wearing a failing item)

Anyway, fixed now!
2021-06-12 02:29:30 -07:00
9e222f3bf8 Change item list URL to /user/:userId/lists
This is because it's the terminology I'm using elsewhere ("Items" and "Closet" are too overloaded in the UI), and because I want to start putting specific lists at like `/user/:userId/lists/:listId`!

I also create a redirect from the old URL, and also from the DTI Classic variant of the URL
2021-06-11 19:06:12 -07:00
ddd562b672 Oops, I broke valids!
Ah right, React state batching doesn't always work how I expect it to. The separate state caused the hook to return and cache `{loading: false, error: null, data: null}`, and then on a _later_ tick the data value showed up, but only _after_ the response was already cached!

This broken a bunch of species/color picker stuff, now it's fixed!
2021-06-11 08:31:01 -07:00
eaa4fbb575 Improve item page perf by caching valids in client
Okay, so getting the initial render down time for these faces is annoying, though I might come back to it…

But actually, the _worst_ part isn't the _initial_ render, which just kinda gets processed as part of the page navigation, right?

The _worst_ part is that we render it slowly _twice_: once on page load, as we send the `useAllValidPetPoses` fetch request; and then again when the fetch request ~instantly comes back from the network cache.

The fact that this requires a double-render, instead of just rendering with the cached valids data in the first place (like how our GraphQL client does), causes a second and highly-visible render of a slow-to-render UI!

So, here we update `useAllValidPetPoses` to cache its response in JS memory, similar in principle to how Apollo Client does. That way, we can return the valids instantly on the first render, if you already loaded them from the homepage or the wardrobe page or another item page!
2021-06-11 07:37:49 -07:00
caf0a8b815 Extract SpeciesFacesPicker to a new file
I wanna refactor how we do styles in it for perf reasons, and it's enough added complexity that I want it in its own file!
2021-06-11 06:58:12 -07:00
ab2dbeb02a Item page perf: memoize species faces
This is a pretty easy change, that makes re-renders faster when something about the item preview state changes!

That said, the initial render is still pretty slow, too, and that's the one that's bothering me more lol
2021-06-11 06:45:11 -07:00
07bf555a02 Oops, fix a perf regression in Hi-Res Mode!
Ah oops, because I forgot to set `hiResMode` here in the image preloader, we would preload the PNG, and _then_ load the SVG separately.

This doubled the effective image loading time in Hi-Res Mode!

Now, the image preloader respects hi-res mode, and will preload the SVG in the SVG case, and the PNG in the PNG case.
2021-06-11 05:52:53 -07:00
2375669cdf Only show SVG glitch message in hi-res mode
If you're not in hi-res mode, then you don't care about broken SVGs, because you wouldn't have seen them anyway!

We also update the message to reference Hi-Res Mode.
2021-06-08 08:32:30 -07:00
bed525d3ff Add hi-res mode setting, default off
We're just having too many glitchy SVGs for my taste, esp since TNT seems to just be using PNGs for now?

This change defaults us to using PNGs for users by default, with the option to use SVGs as a new "hi-res mode" setting.

This is our first ever setting, wow!

I'm also envisioning that like, if we get Fastly Image Optimizer set up, this could be a way to tune the quality of the incoming images.

We could also consider a setting to turn off animations altogether—like, just download the PNG instead of the movie, whereas right now we download the movie on the assumption that you might play it at any time.
2021-06-08 08:27:45 -07:00
efa8a4d499 Oops, don't show UC conflict glitch while loading
The way we were checking for UC compatibility issues, was also triggering while the appearance was still loading, so items didn't have any appearance layers yet!

Now, we check for loading before testing for that glitch.
2021-06-08 07:23:13 -07:00
277b8df838 Fix caching for homepage Latest Items
Oh right, adding user data to this query makes it uncacheable!

Split the query into the main public data, which will cache; and the user data, which will load in later.
2021-06-08 01:59:56 -07:00
a0be9942fb Add extra flair to trade matches
I refactor the hide-badge thing into 3 "trade matching modes". Then, the logic for whether to hide specific badges moves into the component, and we use that same flag to decide whether to show the big word "match"!
2021-06-08 01:23:31 -07:00
b762e11331 Add owns/wants badges on SquareItemCard
Boom, cute owns/wants badges on "Latest items", and the item search page, and trade matches!

I'm gonna add some additional flair to the trade match case, too!
2021-06-08 01:03:09 -07:00
4a22b50a77 Extract NC/PB/NP badge in SquareItemCard
This is just a small refactor to make `ItemThumbnail` more workable, because I'm gonna start working in it!
2021-06-08 00:33:23 -07:00
9a30b8c43f Fix bg color bug in homepage search field
This has been bugging me for a while lol, the background was leaking out of the corners!

I had applied the styles to the `InputGroup` because I didn't realize how Chakra implements this… I had assumed that the left/right elements wouldn't also get the background.

But it turns out, `InputGroup` uses `position: absolute` stuff, and uses padding to create visual space in the `Input` below them! So, this works perfect!
2021-06-08 00:20:23 -07:00
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
598858c084 Oops, minor path regex fix
Escape those dots!
2021-05-27 18:41:01 -07:00
f932498066 Use a redirect for live outfits instead
I'm gonna try and see about getting Fastly to redirect these internally, so we can get all the benefits of CDN-caching the generated image, without forcing the user through another round-trip!
2021-05-27 18:33:14 -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
a5c3108a90 Whoops, fix outfitImage caching bug
I was accidentally serving images _without_ `updatedAt` with the long-term cache headers, but only in prod, not in dev

I think this is probably because I made a mistake in my Vercel route config, by including an `$updatedAt` parameter that doesn't actually exist in this case.

I'm guessing the Vercel dev server has different behavior for my mistake than the prod server. I'm guessing the dev server makes it an empty string, and the prod server makes it the literal string `$updatedAt`. Oops!

I hope this fixes it!
2021-05-27 17:29:06 -07:00
e608844171 Add better 404 message for outfit image 2021-05-27 17:01:20 -07:00
27437c33de Merge branch 'graphql-docs' into main 2021-05-27 16:52:15 -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
5f0089f990 Access-Control-Allow-Origin: * for GraphQL
Someone asked to use the DTI API for a small client-side project, so I'm making this change to support it!

As explained in the comment, I think this should be safe regarding CSRF attacks. But it _does_ increase the risk that someday we change something elsewhere that creates a problem, like using cookies to authorize something. So, let's remember to be careful! (as I would hope we would be when adding another auth mechanism!)
2021-05-27 16:41:52 -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