Commit graph

544 commits

Author SHA1 Message Date
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
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
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
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
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
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
65b4a05639 fix bug on "no trades yet" screen w/o "Compare" 2020-11-24 15:02:03 -08:00
ec9b96ff70 link to the new trade pages from item page 2020-11-24 15:01:24 -08:00
1f2e83e11e sort trades by user activity (will refine later)
I think a plain sort by last update is too game-y, so I have some ideas how to make this a bit more random but still usefully sorted
2020-11-24 14:58:11 -08:00
c8af209012 hide compare column for now 2020-11-24 14:49:20 -08:00
c23243fcb7 add real timestamp to trades page 2020-11-24 14:43:43 -08:00
d275c96396 fix bug in table loading placeholders
The extra word width of "Placeholder" caused wrapping on some screens!
2020-11-24 14:29:00 -08:00
54abd1ac80 real trade data on the page! 2020-11-24 14:24:34 -08:00
6681f9642a add media query for "this week" vs "<1 week" 2020-11-23 13:30:34 -08:00
c1012e57d5 fix bug linking directly to a specific list 2020-11-23 13:28:43 -08:00
8068a1d260 offer/seek trade pages, with placeholder data 2020-11-23 11:25:23 -08:00
9481ce05a6 open trading links in new page from wardrobe page 2020-11-23 09:36:24 -08:00
1af034e4e7 refactor ItemPage components to be more reusable
this is because I'm about to make trades pages!
2020-11-23 09:34:46 -08:00
d219750ea1 support can look up users by email, not just name 2020-11-18 10:32:49 -08:00
7c9313f4a6 support tool to edit usernames 2020-11-18 07:42:40 -08:00
6a43f92438 can search for user by name from items page 2020-11-18 06:45:33 -08:00
68e6e9e243 add real offering/seeking counts to item page 2020-11-09 06:26:29 -08:00
90233c0a03 add items.jellyneo.net to valid trade list links 2020-11-09 06:11:07 -08:00
a5bfadf126 fix missing pause/play button for some animations
We do animation detection during the preload now, but this wasn't always working correctly: some movies don't actually fully mount the children onto the stage until we start playing. This caused the play/pause button to be missing on the outfit page and the item page, but the animations would still play, depending on the user's saved play/pause state in localStorage.
2020-11-08 16:17:07 -08:00
652d3cff7d add trade link placeholders to item page 2020-11-08 15:46:11 -08:00
d02f7ced72 add pb badge to pb items, instead of nc/np badge 2020-11-08 15:13:30 -08:00
02e173d7de nc/np/pb search filters 2020-11-08 15:04:17 -08:00
63a17824e5 lint fixes 2020-11-08 14:35:02 -08:00
d701f51c15 move own/want badges to end of wardrobe items
I saw the short-near-the-front and it just frankly looked awkward? Not sure why I liked it before?

I think this medium at the end of the list is better aesthatically, though it's starting to get a bit messy with the different colors mixed around… but I think there's also a semantic argument that we're keeping the facts about the item together, and the _user-specific_ stuff separate at the end… (putting it at the front would be a good semantic argument too, but I think the NC/NP alignment is too important)
2020-11-03 20:24:56 -08:00
045fb95d69 fix spacing bugs with item badges
In a previous change, I moved the margin for item badges onto an ItemBadge element… but I didn't think through how that would break the spacing for the loading state of ItemPage. Now, the loading skeleton items _contained_ the badge margin, and so the spacing between badges was shiny skeleton-y.

Here, I replace ZoneBadgesList with a function that just returns the elements, and go back to using Chakra's Wrap component. That will apply the margin to direct children, and the zone badges are direct children now.

One option I'm thinking of in hindsight is an idea I had earlier: Chakra hacks the margin onto _React_ children, but could we use CSS direct child selector instead? A bit trickier to resolve the margin size to the theme's value, but plenty doable… something to consider!
2020-11-03 20:11:37 -08:00
e47bec0abc refactor menu/nav a bit 2020-11-03 19:36:48 -08:00
2de840b53e fix mobile flash-of-wrong-nav-menu
In the previous impl, the buttons variant of the menu would appear on first render, and then the breakpoint stuff would adjust and re-render as the compact nav menu. Now I'm using CSS to show/hide instead!
2020-11-03 14:57:26 -08:00
2772c3e090 adjust WIP callout on user items page 2020-11-03 14:45:43 -08:00
de974a365b fix bug with items with %20 in movie clip URL
"Beautiful Green Painting Background" wasn't loading! https://impress-2020.openneo.net/items/75594

```Error building movie clips Error: Expected JS movie library http://images.neopets.com/cp/items/data/000/000/491/491273_31368b3745/491273_2_HTML5%20Canvas.js to contain a constructor named _491273_2_HTML5%20Canvas, but it did not: ssMetadata,Bitmap3,Bitmap5,CachedTexturedBitmap_4183,CachedTexturedBitmap_4184,CachedTexturedBitmap_4185,CachedTexturedBitmap_4186,CachedTexturedBitmap_4187,Symbol20,Symbol8,Symbol4,Symbol7,Symbol2,Symbol1,Symbol9,Symbol2copy,Symbol2_1,_491273_2_HTML5Canvas,properties,Stage```

We already had code to strip out spaces, but not encoded spaces like %20. Now, we decode the URL first, so that space-stripping will work even if it was encoded.
2020-10-28 00:29:32 -07:00
15f10c615b add descriptions to closet lists (formatted! :3) 2020-10-28 00:00:14 -07:00
4e00962edc add individual lists to user items page 2020-10-27 23:09:42 -07:00
3ce5e74b09 swap own badge and want badge 2020-10-27 21:43:57 -07:00
444887b64f update trade list matching after changing own/want
That is, if you're browsing a trade list and you go "oh actually, I _do_ want that!", and click the item page to mark it, then click Back, we'll now update the matching stuff on the trade list page to reflect that it's now a match.

This was just a matter of simplifying the GraphQL query, I think the `currentUserOwnsThis` and `currentUserWantsThis` fields just didn't exist at the time?

We _don't_ yet update your _own_ trade list, if you click through to an item to remove it or something like that. The cache update function isn't too tricky, but it's a bit verbose to implement in Apollo, so I'm not bothering right now!
2020-10-24 01:35:37 -07:00
4d4d475437 add quick-look trade matches to top of page 2020-10-24 01:06:55 -07:00
5a13959805 fix bug with zone badge wrapping
Oops, the <Wrap> component is nice, but it uses React.Children to apply margin to its _direct_ children, and our badges are not always direct children! (See the new `ZoneBadgeList`.)

I poked my head into how `Wrap` works, and it's honestly pretty simple, so I've applied the same styles manually. Ta da!
2020-10-24 00:32:23 -07:00
271b1e2ac5 add comment noting how we built the star svg 2020-10-24 00:14:42 -07:00
b28d8256b8 add lookup/neomail links to user item pages 2020-10-24 00:08:22 -07:00
274a4f716f add zones to user items page
idk the labels section was feeling empty, and I didn't see a way to streamline it more, so I figured, add info that might be useful! lol
2020-10-23 23:29:54 -07:00
5111ebcbfe split out separate Your items header 2020-10-23 23:00:53 -07:00
3a20deba09 can remove owned/wanted items from item page 2020-10-23 22:43:56 -07:00
bb46c1f184 fix crash opening user items page logged out 2020-10-23 22:19:54 -07:00
49d3b3685d add CORS for movie clip asset loading
I think the issue with the Spring Topiary Garden Background is that EaselJS is trying to do intermediate canvas reads in order to apply computed filters, but loading from our asset proxy counts as tainted data.

Here's the traceback I got in Chrome for it:
```
Error building movie clips DOMException: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The canvas has been tainted by cross-origin data.
    at a.b._applyFilters (https://code.createjs.com/1.0.0/easeljs.min.js:15:12029)
    at a.b._drawToCache (https://code.createjs.com/1.0.0/easeljs.min.js:15:11806)
    at a.b.update (https://code.createjs.com/1.0.0/easeljs.min.js:15:8638)
    at a.b.define (https://code.createjs.com/1.0.0/easeljs.min.js:15:8148)
    at lib.Flowerfront.b.cache (https://code.createjs.com/1.0.0/easeljs.min.js:13:3361)
    at new lib.Bg (https://images.neopets-asset-proxy.openneo.net/cp/items/data/000/000/441/441520_f4a43d48bf/441520HTML5.js:4266:16)
    at new lib._441520HTML5 (https://images.neopets-asset-proxy.openneo.net/cp/items/data/000/000/441/441520_f4a43d48bf/441520HTML5.js:5291:18)
    at x (https://impress-2020.openneo.net/static/js/11.3a356cfe.chunk.js:1:12286)
    at https://impress-2020.openneo.net/static/js/11.3a356cfe.chunk.js:1:17768
    at Array.map (<anonymous>)
```

To try to fix this, I've updated our Fastly config to version 8, which should accept CORS requests from https://impress-2020.openneo.net. And here, I've updated the movie clip assets to be requested CORS-style, so that the Origin header will actually be set.

It's hard to test this without just, pushing it to prod. I've confirmed in isolation that setting the `Origin` header in the request yields the expected `Access-Control-Allow-Origin` response header, and that the `Vary` header is set correctly too. But, end-to-end, I don't really have great mockability here—maybe with a good proxy setup I could do it? But nah, let's just push and find out!
2020-10-23 00:20:50 -07:00
10b10e9a43 oops, remove some unused variables 2020-10-22 23:53:06 -07:00
0387a78574 show error message when preload can't build movies
Not sure why movie clip building is failing! But it happened outside our try-catch, so it left us in an infinite spinner state.

The repro item is the Spring Topiary Garden Background!
2020-10-22 23:52:26 -07:00
57889a3a88 can add own/wanted items from item page
the buttons work now! but only when adding 😅 remove comes next!
2020-10-22 21:20:49 -07:00
d2671d0fa6 fix ItemPage safeImageUrl loading bug
When you navigated directly to ItemPage, the new `safeImageUrl` function would crash during the loading state, because it was trying to safe-ify `undefined`.

Now, I've just made `safeImageUrl` more resilient to that particular kind of unexpected input, by passing through null-y values without change.
2020-10-22 20:53:21 -07:00
5f3ac956e3 make the feedback form more visible 2020-10-22 16:01:54 -07:00
d99f5d7ac8 oops, fix missing react hook dep! 2020-10-22 15:46:22 -07:00
456a098df9 replace /api/assetProxy with a CDN proxy
When we decided to start out with /api/assetProxy, we didn't know how much the load would be in practice, so we just went ahead and tried it! Turns out, it was too high, and Vercel shut down our deployment 😅

Now, we've off-loaded this to a Fastly CDN proxy, which should run even faster and more efficiently, without adding pressure to Vercel servers and pushing our usage numbers! And I suspect we're gonna stay comfortably in Fastly's free tier :) but we'll see!

(Though, as always, if Neopets can finally upgrade their own stuff to HTTPS, we'll get to tear down this whole proxy altogether!)
2020-10-19 13:24:13 -07:00
9a36a6ec69 don't advance movies by a frame when resizing 2020-10-10 04:51:53 -07:00
7102772f63 fix positioning of movie layers on large screens
Oops, movie canvases were drawing larger than the images, if there was more than 600px of space available! fixed!
2020-10-10 04:32:53 -07:00
afe9fcf392 fade in for movie layers, too
gosh I hope I didn't break everything 😅
2020-10-10 03:46:23 -07:00
82f849f047 fix fade-in for static image layers
I guess something got more picky about the loading sequencing: the fade in animation was happening faster than the cached image could load. Now, we explicitly wait for the image to load (even though we know it's probably cached) before fading it in.
2020-10-10 03:37:43 -07:00
5f612f544c tweak homepage copy to make feedback more obvious
I noticed that, if you're _reading_ the beta callout it's obviously a feedback link, but it's easy to glaze over "Tell us what you think". Here, I've added the word "feedback" to make it stand out on scanning the page, while adding "Got ideas?" to keep it feeling colloquial.
2020-10-10 03:13:12 -07:00
68607e3756 fix infinite spinner on err loading HTML5 layers
Oops, our movie layer promises don't have a .cancel() method, so calling it crashed our error handler. Now, when there's an error loading a layer and there are HTML5 layers visible, we'll correctly show the "Could not load preview. Try again?" message.
2020-10-10 02:42:27 -07:00
f6268810be make invisible DTI title text not clickable 2020-10-10 02:34:02 -07:00
1eca5d1e27 add WIP callout to item page 2020-10-10 02:17:21 -07:00
e7359ab51b add WIP callout to user items page 2020-10-10 02:07:49 -07:00
a8cdd51bb5 rename "old DTI" to "classic DTI" on item page 2020-10-10 01:29:13 -07:00
fb632f82d6 minor fixes to feedback form React code
oops, forgot some hook deps!
2020-10-10 01:25:10 -07:00
ad43f58a07 fix Download button to use better caching
So I broke the Download button when we switched to impress-2020.openneo.net, and I forgot to update the Amazon S3 config.

But in addition to that, I'm making some code changes here, to make downloads faster: we now use exactly the same URL and crossOrigin configuration between the <img> tag on the page, and the image that the Download button requests, which ensures that it can use the cached copy instead of loading new stuff. (There were two main cases: 1. it always loaded the PNGs instead of the SVG, which doesn't matter for quality if we're rendering a 600x600 bitmap anyway, but is good caching, and 2. send `crossOrigin` on the <img> tag, which isn't necessary there, but is necessary for Download, and having them match means we can use the cached copy.)
2020-10-10 01:21:47 -07:00
d602287190 feedback form now sends actual emails! 2020-10-09 08:55:03 -07:00
87d6cbf72a Feedback form sends req to stubbed API endpoint
Okay, now the UI can handle the loading/success/error status! Next we need to actually send :3
2020-10-09 08:18:18 -07:00
b713aeea96 bundle feedback xwee, make it transparent
Oops, I shipped with the images.neopets.com TODO undone! Also, the white background was intersecting with the close X for the feedback form.

In this change, we move the xwee image into our bundle instead of depending on images.neopets.com, and we edit it to have a transparent background, which looks nicer for dark mode. (And we do a srcset!)
2020-10-09 08:01:46 -07:00
423ab5c98d oops, un-break the homepage! 2020-10-08 04:20:23 -07:00
1875931a48 simplify canvas code, just use separate elements
Previously I tried to be clever and pre-optimize by putting all the layers onto one canvas… I think this probably helped by batching their paints, but it made fades less smooth by not taking advantage of native CSS transitions, and it made us dip into JS way more often than necessary.

Here, I take the simpler approach: just layers of <img> and <canvas> tags, with each animated layer on its own canvas, and letting the browser handle transitions and compositing, and separate `setInterval` timers to manage their framerates.

I have a suspicion that batching the paints could help performance more, but honestly, maybe that batching is already happening somehow, because things look pretty great on my big-screen stress test now; and so if it _is_ relevant, I want to wait and see after testing on low-power devices.
2020-10-08 04:13:47 -07:00
3e147ec5b4 oops, don't auto-focus feedback button on load 2020-10-07 10:17:52 -07:00
cd42988a90 add beta blurb & WIP feedback form to homepage 2020-10-07 09:48:55 -07:00
3dc9a1d0ef add a subhead to the homepage
Not 100% sure on the copy, but I like that it's a bit clearer about the value prop. I tried to work in customization for SEO, but it feels too clunky in a sentence, might need to put it elsewhere in the copy!
2020-10-07 07:52:34 -07:00
c0ce71c206 don't show preview in the item info drawer 2020-10-07 07:05:37 -07:00
42c59328a9 only make a 60fps call if we're actually animating 2020-10-06 08:55:21 -07:00
900d102594 Merge branch 'modeling' into main 2020-10-06 07:06:30 -07:00
6ec6bbec57 first-time modeling UX improvements
These changes are most relevant for playing around in the dev server, modeing against an empty database. But they'll also help in real-world modeling scenarios! e.g. modeling a new species/color combo is now a bit nicer, we don't show a blank entry in the color picker
2020-10-06 06:37:51 -07:00
f543868924 fix bug that broke fades on cache-grouped layers 2020-09-25 07:53:04 -07:00
32c4e540a3 group and cache adjacent static outfit layers
perf win owo!
2020-09-25 07:35:49 -07:00
d52849c7a2 add animations and play/pause button to item page 2020-09-24 08:29:56 -07:00
ffe9d25b1c help user find play/pause when adding animation
I think it's great that we hide the button when it's not relevant, but that makes it hard to know that it exists. Here, we do some cute tricks to blink up the "Paused" button when it first appears, even if the user doesn't have the controls visible right now
2020-09-24 07:54:11 -07:00
2a8ac4ad65 improve contrast on play/pause button
I had trialed it on darker backgrounds, but on lighter ones we just need a higher base contrast imo
2020-09-24 07:19:29 -07:00
e5ce4a4a42 improve perf on item add/remove
We did this a while back too, but I guess something changed in Apollo: I guess it used to return identical item objects from the cache on its own, and now it returns brand new item objects. So we gotta do the object caching hacks ourselves!

This speeds up add/remove item state updates from 500ms to 100ms on my Mac, because we stop re-rendering all the Item components and their complex Chakra children.

This is especially worth doing now, because animations make long updates much more noticeable! (It interrupts the animation 😅)
2020-09-24 07:09:08 -07:00
05f7b3fcc7 oops, fix missing hook deps 2020-09-24 06:43:46 -07:00
ce402c23d7 include animated assets in preloading
Honestly kinda surprised this worked on the first go! I was worried something about the process would make the sorta like, instant-cache expectation not work.

Still thinking it might be considerate to like, keep a LRU cache of MovieClip options, so that we don't double-execute these scripts when adding stuff… we even re-execute the ones already applied lol 😅 and that adds lots of script tags to the body!

But yeah I'm not gonna push on it yet until I see evidence that it actually causes performance issues in practice
2020-09-24 06:25:52 -07:00
53b4d34419 only show play/pause when there are animations 2020-09-24 06:13:27 -07:00
5027a62ec5 cuter play/pause button at top of controls 2020-09-24 06:04:59 -07:00
c4a9ee8497 a bit more perf for static assets 2020-09-24 06:04:51 -07:00
5879324ebb play/pause button for animations 2020-09-22 05:39:48 -07:00
88f5c1f1aa fix bug where resizes pause the animations 2020-09-22 05:14:31 -07:00
30ec18e85e maybe fix races in movie script load order? 2020-09-22 05:12:59 -07:00
d50d1ecacc fix bug that reloaded all layers on resize 2020-09-22 05:01:56 -07:00
185d6acc88 some movie clip race condition fixes 2020-09-22 04:36:32 -07:00
d1be0f2d4a oops, add a missing assetProxy call! 2020-09-22 04:34:40 -07:00
772065815a Badge for animated items, support only
This is really very cute, but too many items it turns out are lod despite not actually being animated 🙃 it's helpful for looking for test cases tho, so I'm keeping it, but support only!

I also ended up really liking the icon-badge+tooltip design as a way to summarize lil things, so I'm trying Own/Want short badges in the same style.
2020-09-22 04:25:41 -07:00
3fe2c478f2 log manifest image load errors, instead of crash 2020-09-22 04:12:52 -07:00
8cc034900d ah, refine the bug fix for number filenames 2020-09-22 04:08:05 -07:00
d27395bda2 hooray, animated items seem to be working?! ^w^ 2020-09-22 03:53:48 -07:00
a4d159381c add an underscore to numbered filenames
Here's an example, the file is http://images.neopets.com/cp/items/data/000/000/546/546022_1132b0ffeb/546022.js and the constructor is _546022, to account for the fact that JS syntax won't allow a plain number there.
2020-09-22 03:46:32 -07:00
7fdf8f5e21 remove stray console logs 2020-09-22 03:06:50 -07:00
e8bfc24506 oh, I think I fixed the movie pausing bug! 2020-09-22 03:06:14 -07:00
08bdf560a4 draft of animated layers in storybook
Not running in the real app yet, but there's something a bit off where changes seem to pause animations and I don't understand why
2020-09-22 03:03:01 -07:00
c806de4e83 rename EaselCanvas to OutfitCanvas, etc
reflecting further on the abstraction, I'm noticing that this isn't an Easel abstraction like I envisioned early, and that we're baking some Neopets stuff into it. And I think that's the right call, esp with the tricky MovieClip stuff coming up, where I think more barriers would hurt more than they help. So, a new name!
2020-09-22 01:49:12 -07:00
9a8047c613 extract EaselCanvas to its own file, basic stories 2020-09-22 01:44:24 -07:00
feaaf97dce fix the broken loading delay again
Did it revert? Or did I just never notice that it only worked on mount, not on new loading states?

Also, fixed a bug where we were injecting the script tag way too much, and triggering loading too much that way too!
2020-09-21 19:03:17 -07:00
7677a60bbe add non-canvas version back for smaller previews 2020-09-21 18:50:27 -07:00
80a52d3bb9 add fade-in/fade-out to easeljs outfit previews 2020-09-21 18:40:12 -07:00
bf83b175ad use EaselJS for outfit previews
still just for static stuff, but it's good to be working!

PosePicker got a bit broken, CSS scaling doesn't work quite right anymore, we might need to just up the internal resolution or something?
2020-09-21 18:11:25 -07:00
64d09f040a re-add nav menu, to prevent bad wrapping on iphone
noticed that the left-title and right-nav were running into each other on a standard iphone layout... menu fixes this!
2020-09-21 03:31:49 -07:00
a81060d5b8 make the Dress to Impress text clickable
oops, right, it was not part of the link! Now it is. Feels much better :)
2020-09-21 03:18:32 -07:00
1eeba40fac rename GlobalNavBar to GlobalHeader
for consistency with GlobalFooter
2020-09-21 03:08:24 -07:00
5c8fbdc81e use preloaded pet data when loading item page 2020-09-21 02:56:56 -07:00
a6761a2403 load correct pet for species-specific items
uses the new canonical appearance GQL stuff :)

there's still an extra reload, we're not using the apollo cache correctly!
2020-09-21 02:56:56 -07:00
1b59b9631b GQL for canonical appearance for body
gonna use this for item page! I walked back my supported species idea 😅
2020-09-21 02:56:48 -07:00
b53d95cda8 rename "Incompatible" to "No data yet" 2020-09-20 21:34:27 -07:00
5f9b143939 add species/color picker to item page
still missing some basics like choosing the right default for the single-species case, but overall work-y!
2020-09-20 21:08:16 -07:00
baa3563abb fix margin between home icon and user bar
Oops, I attached the margin to the title, which meant that the home link _didn't_ get spaced away from "Hi, matchu!"
2020-09-20 20:13:00 -07:00
c52b5f0039 update footer design, add links
notable layout change is that the text content will now try to center itself, and we push the buttons off to the right. we also needed to tweak the layout code a bit to get the buttons to feel centered with the top two lines, bc centering against the full block just feels wrong, they want to be top-y in terms of positioning, but still feel centered-y in terms of visual balance
2020-09-20 20:10:26 -07:00
34112b30df add site title to left nav, move Modeling to right
Honestly I don't think this is the long-term home for the Modeling link, I think it'll become a homepage-only link as we add more modules there. But I wanted to get it out of the way!
2020-09-20 19:36:51 -07:00
abda9e4687 add a footer, move the dark/light toggle to it 2020-09-19 22:10:52 -07:00
fa8de52d81 scroll to top on navigation 2020-09-15 05:35:01 -07:00
8e97355499 smooth out the skeleton fades a bit more 2020-09-15 05:29:28 -07:00
956580c651 avoid skeleton flash-of-content on item page 2020-09-15 05:20:10 -07:00
496e2e9550 tweaks to item page description loading delay
make it 2 lines when embedded, and also add a Delay, bc prod is much faster to load this and it's annoying to see the flash!
2020-09-15 04:54:37 -07:00
02cb4731d3 use min width to stop date badge from resizing on load 2020-09-15 04:50:36 -07:00
ec0b80c0ca add NC badges to modeling page 2020-09-15 04:31:27 -07:00
c9f7f7a6bb sort new items to top of modeling & label 'em 2020-09-15 04:25:48 -07:00
ffeb494f45 add created at date to item page
this will help me notice which items are new! lol
2020-09-15 04:15:15 -07:00
2a30e8a6e5 show the special colors on the modeling page 2020-09-15 03:18:21 -07:00
351b9a88bd use corner spinner on item page, and fix delay bug
Fading the whole preview to a black overlay for the loading state was feeling aggressive, especially since loading delay wasn't working correctly!

In this change, I fix loading delay, and I add a nice subtle "corner" variant for outfit preview spinners :)
2020-09-13 04:12:14 -07:00
fa0ae3fbe1 add item description to item page 2020-09-12 23:23:46 -07:00
0725a7b1e8 launch item page links in new window when embedded 2020-09-12 23:10:29 -07:00
3feade9241 add focus state for own/want checkbox buttons 2020-09-12 22:45:58 -07:00
3ecdd265c2 smarter cache lookups for "do we own/want this?" 2020-09-12 22:39:38 -07:00
2cfafce768 add own/want buttons to item page 2020-09-12 22:21:00 -07:00
0b724f7509 add own/want badges to items in wardrobe 2020-09-12 20:02:56 -07:00
dcf2ec6a26 embed item page in wardrobe page drawer 2020-09-12 19:29:20 -07:00
056b238462 better partial item data loading
Here, we add loading skeletons to lots of individual elements, instead of doing a whole item placeholder skeleton. That helps when coming from pages where we have some data, like name and thumbnail, but things is isNc are still missing.
2020-09-12 18:32:06 -07:00
383d514397 link to new item page from item list & model pages 2020-09-12 18:23:12 -07:00
d29abf5cd1 add skeletons for item page header
It looks nice, but also particularly means we can handle the loading for the preview separately, get that started faster and iterate better on it in dev!
2020-09-12 18:17:23 -07:00
bf2660cbd4 show a basic item preview on the new item page 2020-09-12 17:56:31 -07:00
ef7ba58c90 refactor ItemPage a bit
to prepare the way for the other content
2020-09-12 17:27:00 -07:00
4f6f3640bb start building item page 2020-09-11 23:56:47 -07:00
ebb8c63ac6 page title upgrades 2020-09-11 23:54:37 -07:00
a52bd3e3bb fix some old lint errors! 2020-09-11 23:27:23 -07:00
76ad917843 rename ItemsPage to UserItemsPage
this is because I'm making ItemPage now lol
2020-09-11 23:20:06 -07:00
9143bacbe5 fix typo in comments 2020-09-11 22:36:38 -07:00
0d7efb2357 use 3 columns for grid on wider screens
This isn't as great for modeling cards, but it's fine imo, and it's much better for item list cards (where there's practically no badges)
2020-09-11 22:13:38 -07:00
d1262f77d7 sort trade list matches to the top of item lists
Items with the "You want this!" or "You own this!" badge will now sort to the top of their respective lists!
2020-09-11 22:04:37 -07:00
5546b21c27 use the same ItemCardList in items + modeling
and make the grid items take the full two-column width
2020-09-11 21:53:57 -07:00
8e091b14c6 add own/want compare badges
now you can compare your item lists with other users!
2020-09-11 21:45:38 -07:00
45ffa92f1d add itemsTheyWant to user GQL 2020-09-11 21:34:28 -07:00
0df57818e3 create ItemCard, use it in ItemsPage too
extracted from modeling page!
2020-09-11 20:41:39 -07:00
9cb6cc2120 use better colors for light mode hanger spinner
Initially the spinner was only used in OutfitPreview, where the background was always pretty dark. Now that we use it in more general contexts, we need a light/dark distinction!

Also went and standardized out the `size` props
2020-09-10 03:06:44 -07:00
93564ee6bd more realistic loading state into WardrobePage
Here, we extract a lean WardrobePageLayout component, so that we can bundle it into the main app as a loading state for WardrobePage.

This means that clicking Start from the homepage will, instead of flashing the screen to white while WardrobePage loads, show the correctly-sized black/white page layout instead.
2020-09-10 02:54:22 -07:00
c7e2daa07b fix visual regression on homepage
I think the Chakra upgrades made these overrides stop working? added !important so that they happen again!

The regression meant the homepage looked worse, always having the selects fade in :/
2020-09-10 02:37:06 -07:00
0975a94511 code-split nav bar out 2020-09-10 02:32:14 -07:00
0fa378ec6c lol I triggered that weird comments bug again XDD 2020-09-07 21:17:07 -07:00
75ffd813e9 oops, fix bug in Chakra globals
ahh, right, I was overriding their html/body styles! stop doing that 😅
2020-09-07 21:11:10 -07:00
901a6b14f0 add gentle border to modeling cards 2020-09-07 21:06:25 -07:00
75df0cc445 create nav menu, move dark/light toggle to left 2020-09-07 21:02:28 -07:00
0c3d9443c2 upgrade to next Chakra RC
some regressions in here with global styles and color mode! I think we got it fixed though!
2020-09-07 20:59:38 -07:00
bebb8e2d11 add Modeling link, permanent home link, subtleness 2020-09-07 19:48:03 -07:00
d4c2a681ab add some extra loading flair
just some text to keep you busy in the longer loading cases!
2020-09-07 00:34:01 -07:00
0c614deb41 add focus/hover responses to modeling page cards 2020-09-07 00:14:44 -07:00
dba8eed7e5 add dark mode styles for modeling page 2020-09-07 00:03:46 -07:00
626b36319a add a badge to items the user owns 2020-09-07 00:00:56 -07:00
6a923a55a0 add links to modeing hub cards 2020-09-06 23:51:51 -07:00
1cc4d718a5 basic modeling page cute cards! 2020-09-06 23:49:04 -07:00
715f466df4 create very basic modeling page, not useful yet! 2020-09-06 23:32:04 -07:00
1d244fd1ea wider page layout 2020-09-06 22:58:06 -07:00
578d0c45f6 use small-sized image for home link icon 2020-09-06 19:01:12 -07:00
9d6ec247cf avoid re-layout from header bar when login loads in 2020-09-06 18:54:27 -07:00
0a6a9121f0 fix wrapping when username is too long for the header bar 2020-09-06 18:52:56 -07:00
c9ef20edf7 max width to the entire page layout 2020-09-06 18:45:20 -07:00
b086a4a8d7 add cute back to home link 2020-09-06 18:42:39 -07:00
e33e5fb88f shared page layout component 2020-09-06 18:12:34 -07:00
88862f9ce7 simplify petAppearance cache lookup, remove hacks
I think I got all up in my head about direct queries for this one, because of a previous implementation I had in mind, and I forgot that I could just query species and color from the cache by reference without breaking out of the API provided to the cache function!

I also learned in here that I _can_ look up things from the root by doing `readField("allSpecies", {__ref: "ROOT_QUERY"})`, which I struggled to figure out my previous time. I couldn't figure out how to read an uncached field with arguments (I couldn't quite figure out how to build a proper FieldNode, and passing the string form seemed to provide `null` to the `species` cache field reader), but it's probably doable!
2020-09-05 16:37:17 -07:00
Matchu
70d3b06742 basic items page, with user permissioning :)
(the permissioning happens on the backend in the prev change! but yeah we send the auth token in the headers, so the backend knows who you are and whether to show you private data)

(also it is just owned items not in any list!)
2020-09-04 05:59:35 -07:00
12b87ee7d1 set up auth on the server + test utils 2020-09-02 23:00:16 -07:00
f351c7013c hide user info until it's done loading 2020-09-02 15:41:51 -07:00