Commit graph

2099 commits

Author SHA1 Message Date
4a431a4ae8 Oops, omit the commit field from Rainbow Pool filter URLs
By default, Rails gives this button the name `commit`, so it appears in
the URL the form sends to. By setting the name to `nil`, Rails doesn't
set a `name` attribute on the HTML element, so it's *not* included.
2024-09-30 18:05:05 -07:00
4bcc3aaebb Limit Rainbow Pool filter dropdown size
cuz the "Prismatic Pink: Nostalgic" stuff is gonna get pretty long if
we just do the default behavior of letting it grow to max content size!
2024-09-30 17:42:52 -07:00
5890e52e53 Use full name when showing Alt Styles in the list 2024-09-30 17:41:21 -07:00
dd8426fefd Paginate Alt Styles, sort by most recent first-seen date 2024-09-30 17:35:18 -07:00
2a9818b2d1 Add series name filter to Alt Styles filter form
Right now this just is Nostalgic, but I'll label the rest soon!
2024-09-30 17:34:31 -07:00
0b72b5568c Add edit form for Alt Styles, for Support staff only
We'll need this to fix up the series names and thumbnails for the new
prismatic styles!
2024-09-30 17:21:45 -07:00
86e1f31231 Only show *relevant* colors in Alt Styles filters
That is, there is no 8-bit alt style, so don't bother including it in
the filter form; same for most other colors.
2024-09-30 16:35:58 -07:00
a99fb3ec02 Use Rainbow Pool styles for Alt Styles lists 2024-09-30 16:24:43 -07:00
d11c18129d Refactor Rainbow Pool to use shared styles for the list elements
The lists of pet types and pet states had very similar styles, which I
mostly copy-pasted. Now that I want to use them for Alt Styles too, I'm
refactoring!
2024-09-30 16:21:47 -07:00
0958111341 Share styles between pet types and alt styles as "rainbow-pool" CSS 2024-09-30 16:10:26 -07:00
775baa250b Add filter form to alt styles page
Oh wow, alt styles are getting some real work! I'll improve both the
user-facing and Support-facing tooling, to better handle the complexity.
2024-09-30 16:06:22 -07:00
2bd8afd486 Fix whitespace around "(X species)" in item page zone info 2024-09-29 15:05:57 -07:00
1f1c6d92b1 Oops, fix item page's "Customize More" not animating after color change
Ah whoops, I didn't notice that, when Turbo morphs the
`<measured-container>` into what the server HTML returns, it deletes
the `style` attribute we were using.

In this change, I refactor for `MeasuredContainer` to be the component
rather than `MeasuredContent`, so that it can also be responsible for
listening for changes to its own `style` prop, and remeasuring when
they happen.

We're also careful to avoid infinite loops, by only doing this when the
property is missing! (Otherwise, setting `--natural-width` triggers the
callback again, oops!)
2024-09-29 14:59:52 -07:00
e4a640ccee Oops, fix minor breadcrumbs display bug on pet_types#show 2024-09-27 22:39:22 -07:00
d465f4125e For support staff, Rainbow Pool links directly to edit page, not show
Just on the assumption that like. We're mostly here to edit things
2024-09-27 22:35:13 -07:00
946a6326ac Use radio buttons for poses in Rainbow Pool form, instead of dropdown
Just a bit easier to find what you want! especially with the grid layout
2024-09-27 22:34:52 -07:00
d5a901b917 Add edit form to Rainbow Pool for pet states, for support staff only 2024-09-27 22:14:00 -07:00
39e5ca59c4 Add breadcrumbs to Rainbow Pool pages 2024-09-27 20:01:07 -07:00
4fa80d33cc Merge branch 'main' into rainbow-pool 2024-09-27 19:43:31 -07:00
d66f81c96b Remove support for old "Nebula (fake)" April Fools color
This hasn't worked for a while anyway! Let's remove the bits of code
where we deal with it, and the database field that signals it. (We also
make a corresponding change in Impress 2020, so it doesn't crash trying
to query based on the `prank` column.)

I also ran this snippet to clear out all the Nebula stuff in the db:

```rb
Color.transaction do
	nebula = Color.where(prank: true).find_by_name("Nebula")
	nebula.pet_types.includes(pet_states: :swf_assets).each do |pet_type|
		pet_type.pet_states.each do |pet_state|
			pet_state.parent_swf_asset_relationships.each do |psa|
				psa.swf_asset.destroy!
				psa.destroy!
			end
			pet_state.destroy!
		end
		pet_type.destroy!
	end
	nebula.destroy!
end
```
2024-09-27 19:38:53 -07:00
f8a5ce4490 Improve Rainbow Pool filter form styles 2024-09-27 19:10:37 -07:00
81f0845d4a Improve Rainbow Pool link styles 2024-09-27 18:45:45 -07:00
f0257ba2d3 Merge branch 'main' into rainbow-pool 2024-09-27 18:32:04 -07:00
d056a5e766 Oops, don't show not-directly-for-sale items as being "0 NC"
"Fall Woodland Leaves Filter" is an example, it's part of the two-item
*pack* named "Fall Woodland Minitheus Petpet Foreground". The NC Mall
page for it will include the secondary items in `object_data`, but it's
not part of the storefront itself—and the only thing indicating that is
the `render` list.

Theoretically, we could use this to construct more data about like,
packs and stuff, automatically? But also, I don't want to backfill it
for everything historically, so like. Whatever.
2024-09-27 18:27:12 -07:00
5214a14990 Rescue from ActiveRecord::ConnectionTimeoutError
Just to stop filling the crash logs with it… if they spike, we'll be
alerted by the downtime monitor anyway.
2024-09-27 17:50:35 -07:00
06a89689d8 Oops, fix crash when modeling Patchwork Staff (AMFPHP string encoding!)
See comment for details! I wonder if other items have been affected by
this in the past. I think probably what happened before was that we
successfully created this item, but failed to create the *translation*,
so when migrating over the Patchwork Staff all its translated fields
were empty? (That's what I found looking in the database today.)

But yeah, thankfully our crash logging at health.openneo.net gave me
the name of a pet someone was trying to model, and so I was able to
find the bug and fix it!
2024-09-27 15:18:43 -07:00
a08fb89d59 Oops, don't crash when an item has no previews
A weird state to get into, one would expect impossible! But something
funny is going on with the Kiko Lake Team Popcorn item (85598)!
2024-09-27 15:18:43 -07:00
80307f21f7 Add Rainbow Pool homepage, with basic filter form 2024-09-26 21:10:25 -07:00
75040ffbf3 Add pages for the Rainbow Pool pet states 2024-09-26 20:24:31 -07:00
6f45cd0485 Add a bit more info to Rainbow Pool glitched label 2024-09-26 19:34:30 -07:00
4e33477c65 Hide unconverted below the "Other" list for Rainbow Pool poses 2024-09-26 19:33:16 -07:00
b28255cafd WIP: Better styles for Rainbow Pool pet type page 2024-09-26 18:39:32 -07:00
99e8b46157 Oops, fix bug parsing "8-Bit-Chia" in Rainbow Pool URLs 2024-09-26 18:36:49 -07:00
734b7fba1d WIP: Outfit viewers on pet type Rainbow Pool page
Now that we have such a convenient lil outfit viewer component we built
for the item page preview, it's easy peasy to drop it in here too! And
it's all nice and lightweight, since in this case it's basically just.
image tags, with some supporting enhancements.

Anyway, this page has no actual useful styles of its own yet. Gonna
make it look nice and such!
2024-09-26 18:20:05 -07:00
a1d6961249 WIP: Placeholder page for Rainbow Pool pet type
I'm experimenting with a Rainbow Pool ish UI, mainly as a support tool
for exploring and labeling poses—but one we can probably just show to
real users too!

Right now, I just use pet type images as a placeholder, and I polished
up some of the `pet_type_image` API. But we're probably gonna drop
these for a full outfit viewer, now that I think of it.
2024-09-26 14:56:45 -07:00
e7148ffae3 Oops, finish removing record_tag_helper gem
My bad!!
2024-09-26 12:53:16 -07:00
64b1d11faa Remove old record_tag_helper gem
This is a transitional gem to help with upgrading from old versions of
Rails: it provides a deprecated feature that Rails removed.

I audited and I *think* we only used it in one place, and that this one
place doesn't even use any of its functionality for styling or
scripting? So, begone!
2024-09-26 12:50:47 -07:00
e63f4df25b Run bundle update 2024-09-26 12:42:18 -07:00
535a0029f9 Replace some JS with the @starting-style CSS directive
Oh sweet, I learned about a new CSS feature with good-enough support!
This lets you use CSS transitions for an element as it enters the page,
or becomes visible.

Firefox only has partial support for this feature rn, but its partial
support covers our case, I tested to make sure! (Specifically, it
doesn't handle transitioning from `display: none` yet, which isn't what
we're doing.)
2024-09-24 19:33:06 -07:00
c0e4291745 Remove FragmentLocalization and localized_cache helper
We replace the `localized_cache` helper with just simple keys provided
to the `cache` helper, with `locale=#{I18n.locale}` inlined. End of an
era!
2024-09-20 20:10:04 -07:00
d27c03606f Delete unused images
Whew, quite a history here! I didn't _extensively_ audit for these, but
I scanned with pretty good searches and hit major pages and they didn't
crash, so. Good enough for me!
2024-09-20 19:38:52 -07:00
40a3f5bf68 Don't show the list filter for petpage exports if you have no lists 2024-09-20 19:30:23 -07:00
4bc38db5aa Replace closet_hangers/petpage.js with modern CSS
We use jQuery to basically simulate the `:has()` pseudoselector. Let's
just, use `:has()` now!
2024-09-20 19:27:39 -07:00
2ab1951e68 Move closet_hangers/petpage stylesheet into its own CSS file 2024-09-20 19:26:06 -07:00
cae2f3ca74 Serve jquery and jquery.tmpl from our own codebase, instead of a CDN
Right, yeah, we've been depending on an external CDN for a long time
for jQuery and the jQuery Template library, and I don't like that kind
of external dependency! Let's put it in with the rest of our libs.
2024-09-20 19:23:53 -07:00
31619071af Remove ajax_auth.js lib, by merging it in where needed
It's only actually used in two JS files, so rather than doing a weird
global `$.ajaxSetup` call, let's just inline it into the small handful
of AJAX calls that actually care.
2024-09-20 19:10:26 -07:00
f20a1b5398 Oops, fix locale form with Turbo pageloads
Before this change, this would only work on the first pageload, and
fail after doing a Turbo page navigation. Now, it works all the time!
2024-09-20 18:55:08 -07:00
3bd6f09a54 Remove "About NeoPass" page, now that it's on the blog 2024-09-20 18:43:38 -07:00
38474d19d7 Oops, fix broken strings on Neopets page import wizard
Uhh I guess when I half-removed a feature from the translations list (I
don't remember when?), it left two different dictionaries labeled
`neopets_page_import_tasks.new`, and the second one overwrote the
first. Oops! Yikes!

By removing these, the translations *above* them actually get to apply
to the page correctly. Before this change, the page just showed the
translation keys as placeholders, womp womp.
2024-09-20 18:16:06 -07:00
73e0b3bb3c Remove some silly view template caching calls
When I was trying to debug slow view code one time long long ago, I was
like "let's cache any part of the template that's static!"

And like. no that's silly, I don't trust that this speeds anything up,
but it _definitely_ adds complexity. Let's just not.
2024-09-20 18:08:11 -07:00