Commit graph

1070 commits

Author SHA1 Message Date
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
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
3b4d2ac390 fix user items page crash for item w/o zone data 2020-11-18 10:35:25 -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
f1a8277c22 simplify offering/seeking count query 2020-11-09 06:30:20 -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
f6723bb67a fix edge case bugs in itemByName and itemsByName
not-found case was erroring instead of returning a simple null, and string trimming wasn't working right, oops!
2020-11-08 00:20:21 -08:00
f621391446 add itemByName and itemsByName GQL 2020-11-08 00:06:51 -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
3171d8095a add isPb to item GQL 2020-11-03 19:46:18 -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
21039ec148 add GQL for individual trade lists 2020-10-27 22:32:37 -07:00
a49e66e359 fix bugs in auth mocking for tests 2020-10-27 22:16:34 -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
f832cb9acb oops, fix crash when no neomail contact exists 2020-10-24 00:11:56 -07:00
b28d8256b8 add lookup/neomail links to user item pages 2020-10-24 00:08:22 -07:00