1
0
Fork 0
forked from OpenNeo/impress
Commit graph

1412 commits

Author SHA1 Message Date
394cc212b3 Add Styling Studio page to show the styles we already have modeled 2024-01-24 06:53:37 -08:00
ba45de583f Oops, don't update body_id when there's an alt style! 2024-01-24 06:12:35 -08:00
40278afd0c Add find_by_name method to AltStyle 2024-01-24 06:12:03 -08:00
e511bdc5e2 Oops right, it's okay to work with an alt style we've already seen! 2024-01-24 04:01:34 -08:00
4e5023288e Track contributions of Alt Styles 2024-01-24 03:54:43 -08:00
1933046809 Try to fix the pet load limiter
This is hard to test directly, but this is my guess from what I'm
reading in this? https://stackoverflow.com/a/32958124/107415
2024-01-24 03:26:52 -08:00
5004142dfb Add alt style support to modeling
Nothing to show them yet, but I think this works for loading it all in
the first place?

Still needs contributions tho!
2024-01-24 03:25:23 -08:00
ec3bb7dbe0 Update NC UC announcement 2024-01-24 02:15:50 -08:00
4888a9dcbe Oops, remove stray viewer_data reader from Pet
This is left over from a previous plan I had, before moving
`fetch_viewer_data` to a class method.
2024-01-24 01:00:53 -08:00
b24ed7facb Re-enable pet loading, now that we're filtering out alt styles for now 2024-01-24 01:00:25 -08:00
b0e7f2ccd5 Move lib/rocketamf -> lib/rocketamf_extensions, to fix reload issues
Something in the Rails loader doesn't like that I have both a gem and
a lib folder named `RocketAMF`, I think? It'll often work for the first
pet load request, then on subsequent ones say `Envelope` is not
defined, I'm guessing because it scrapped the gem's module in favor of
mine?

Idk, let's just simplify all this by making our own module. I feel like
this old lib could use an overhaul and simplification anyway, but this
will do for now!
2024-01-24 00:59:11 -08:00
0406a32444 Disable loading alt style pets specifically 2024-01-24 00:54:30 -08:00
1057fdd3a9 Add rake task to load pet data
Just a quick lil shortcut to look up a pet, I've wanted this recently!
2024-01-24 00:51:37 -08:00
c33f1cb767 Extract Pet.fetch_viewer_data to a class method
This will make it easy to look up pet data from Neopets without messing
around with how the Pet model handles it!
2024-01-24 00:51:20 -08:00
c76e8cd2a9 Allow admin users to load pets
Also allows the new rake task we're building to load, too!
2024-01-24 00:42:35 -08:00
610177d3f5 Remove supervisor from the Falcon process?
Idk what it's doing, but what I do know is the Falcon process is
weirdly slow to restart on deploy. My hope was this would fix it cuz
the supervisor was maybe blocking process exits? Idk, something to look
into, I don't think this fixed it but I also don't think it broke
anything, and I think systemd is doing a fine job monitoring already?
idk
2024-01-24 00:20:23 -08:00
b1eca2f3a5 Disable modeling while we fix Alt Styles rollout bugs 2024-01-24 00:19:28 -08:00
09ad6d5fbb Convert /cpn/ loading errors to warnings
Idk why this broke again, it works locally for me, did our IP get
banned or something? We'll look into it another time!
2024-01-23 22:11:10 -08:00
44d9f98313 Increase pet loading timeout 2024-01-23 22:10:42 -08:00
76af587e7c Replace falcon server with puma
Been wanting this for a while in theory, gonna actually do it now!

The motivation is that I want to turn up the timeout for loading pets,
because the Neopets endpoints are slower today with the NC UC release -
but I can already predict that under our current architecture that will
be a problem, because it'll block up our request queue!

Falcon uses Ruby's relatively-new async system to *not* have requests
block on upstream requests, and my understanding is that this behavior
is plug-and-play. Let's see how it goes!
2024-01-23 21:55:26 -08:00
0cad34acfc Add NC UC maintenance message 2024-01-23 21:27:37 -08:00
73af9d4d77 Start migrating off globalize gem for zones
Like in 0dca538, this is preliminary work for being able to drop the
`zone_translations` table! We're copying the field over first, to be
able to migrate DTI 2020 safely before dropping anything.
2024-01-23 05:43:00 -08:00
48f613d9bc Oops, fix recent bug in species:acara item search filter
Ah oops, I just typo'd this and didn't test it properly, womp womp!
2024-01-23 05:31:09 -08:00
413d2eed91 Improve species/color name migration performance & correctness
Oh right, this should only run in the up direction! And also we can get
a lot faster by preloading the translations.
2024-01-23 05:30:42 -08:00
ce64f12cc3 Remove references to species/color translations at call sites
We wisely did preloading in some places. Now, we don't need to!
Hopefully this'll even be a free speed boost on some pages!
2024-01-23 05:23:57 -08:00
0dca538b0a Start migrating off globalize gem for species/color names
Non-English languages haven't been supported on Neopets for a while, so
I'd like to remove this extra cross-cutting complexity, especially
since it's now inconsistent with the real site anyway!

The main motivation is that I'd like to do this for items too, because
I have a hunch that all the complexity of `globalize` to read
`item.name` is part of what's making large user lists so slow to
render: lots of little objects getting created down the stack, and
needing to be garbage-collected later.

I'm not sure that's why! But I figure removing this complexity is a
simplicity win anyway, so let's do it!

Note that this doesn't *finish* the migration, it just starts it! The
`Species::Translation` and `Color::Translation` models still exist, and
still have their data, and not all references to them are scrubbed yet.
I especially don't want to delete the backing tables until both DTI and
DTI 2020 are ready for it!

So this change will someday be paired with another change to actually
drop the tables - after backing up the data for future records just in
case, of course!
2024-01-23 05:10:43 -08:00
b28459c1cf Oops, fix silly bug keeping the bulk list form open all the time
Lol I forgot to interpolate the `value` variable into the cookie and
just always set it to open lmao
2024-01-23 04:40:05 -08:00
f89fdf0219 Fix item page contributor list styles
Idk when and how this regressed, maybe I deleted a style I thought was
unused? But yeah, this is how this was always intended to render.
2024-01-23 04:37:43 -08:00
0c615043f2 Persist item user lists form open/closed state across pageloads
Using good ol'-fashioned cookies! The JS sets it, and then Rails reads
it on pageload. That way, there's no flash of content for it to load in
after JS loads.
2024-01-23 04:30:23 -08:00
0011fdf76a Move user bulk lists form into a toggleable form, not a dialog
My intent is to next add behavior to save this state across pageloads,
for power users to not have to always reopen it!
2024-01-23 04:20:03 -08:00
23240005a2 Oops, fix bug that would sometimes flip own/want in the item bulk menu
If your first wanted list was created before your first owned list,
then `false` would come before `true` in the keys of
`current_user_lists`.

I both fixed this to be more consistent at the model level, because who
likes unpredictable behavior? But also downstream at the view I
hardcoded that true should come before false, because that's a UI
concern that I want to be encoded in the view regardless of what's
upstream.
2024-01-23 04:06:58 -08:00
929c825b23 Tweak tab styles
Oh right, I just remembered how tabs work, they join with the page when
selected! lol

Something about this still feels off to me, but idk, I find it charming
and I wanna just let it rock.
2024-01-21 07:17:10 -08:00
501ea3db7d Oops, show the correct count for "Trades: Seeking!"
lol silly mistake, showing the offering count twice, my bad
2024-01-21 06:54:26 -08:00
42b1bf3e8c Don't overflow long usernames in the trades table
They can just ellipsis, that's fine, the full name is not essential
when you're just scanning the list; you're gonna pop it open and see
the full name during contact anyway.
2024-01-21 06:52:51 -08:00
5d577db649 Oops, load the data for the bulk item quantity form on the trades page! 2024-01-21 06:42:24 -08:00
8e3d2b994f Oops, link to the user lists page for the not-in-a-list case 2024-01-21 06:40:20 -08:00
507b346c2c Move item lists bulk management form to an openable dialog in the header 2024-01-21 06:20:32 -08:00
77d88e50a6 Oh right, make the item kind badges translatable!
Also make it an abbr, which means we need to override the default
text-decoration on it
2024-01-21 05:41:55 -08:00
abe2747b93 Oh right, PB is another kind of item! 2024-01-21 05:23:53 -08:00
31468c9682 Replace rarity on item page with NC/NP badge, styled after 2020 2024-01-21 05:20:08 -08:00
e8832f2c36 Move item description into header 2024-01-21 05:07:45 -08:00
e4fb067e45 Remove old trade hangers UI from item page 2024-01-21 04:49:06 -08:00
b9bb697ca1 Add trade counts to item page tab navigation 2024-01-21 04:45:22 -08:00
eb6f196b15 Add tab navigation to get to item trade pages 2024-01-21 04:40:25 -08:00
4b9e11fc2a Sort trades in vaguely-recent order
This logic is copied from DTI 2020! Though I didn't include the part
where we highlight trade matches yet!
2024-01-21 03:59:06 -08:00
bfb11e94e3 Fix style bug in trades page
Oops, I forgot this import! It worked when rebuilding styles in dev,
but not once I reloaded the server.
2024-01-21 03:58:33 -08:00
c6927c2ce8 Add basic styles to trades page
Still not accessible via links, just exists!
2024-01-21 03:38:02 -08:00
402e3d4afb Basic trade hangers page, just content and without style
We're just getting started but there we go!! No links or styles yet,
just getting it done!
2024-01-21 03:10:06 -08:00
a03ae90697 Move more of the trade-fetching logic into the model
It was a bit tricky to figure out the right API for this, since I'm
looking ahead to the possibility of splitting these across multiple
pages with more detail, like we do in DTI 2020.

What I like about this API is that the caller gets to apply, or not
apply, whatever scopes they want to the underlying hanger set (like
`includes` or `order`), without violating the usual syntax by e.g.
passing it as a parameter to a method.
2024-01-21 00:39:20 -08:00
80e158caf7 Remove extra item zones section from item page
This is in the previewer UI now, we can remove this extra one!
2024-01-20 23:59:08 -08:00