Commit graph

709 commits

Author SHA1 Message Date
7eb209e206 Update pet state bulk-labeling to skip to next unlabeled if desired
Previously, "Then: Go to unlabeled appearance" would always take you to
the *first* unlabeled appearance in our database.

Now, we go to the *next* unlabeled appearance in the list, relative to
this one.
2024-12-08 10:08:39 -08:00
347419aee8 Add SVG/PNG picker when editing pet appearances
I've known there are bugs in the SVGs pretty often, because they're not
very well attended-to—I noticed pretty quick that the Marble Eyrie, for
example, has its Body asset saved correctly in PNG, but its SVG is just
another copy of the head, oops!

I think SVG is still a nice default for this UI, but I added a little
form to switch to PNG, to give us a debugging method and escape hatch
if it starts to get weird.
2024-12-07 12:16:52 -08:00
addf2d6cc5 Use SVG for the magnified outfit viewer when editing pet appearance 2024-12-07 11:45:01 -08:00
b2a23b3e7b Add magnification when editing pet appearance
I couldn't find a library for this functionality that didn't require
jQuery, and I don't want to be adding *more* jQuery requirements. So, I
decided to throw together my own!

The `<magic-magnifier>` component copies its contents into a "lens"
element, then uses basic JS to track mouse position, then uses CSS to
move the lens and its contents into a helpful position.

One thing I noticed here is that the zoom is a bit crunchy because
we're using PNG images, and it's hard to zoom in even further than we
already are. I might try switching this UI to use the SVG images by
default instead?
2024-12-07 11:39:37 -08:00
b3f3b39aa0 Add helpful layer interactions on pet appearance edit page
When you hover the row for a layer in the table, it highlights the
corresponding layer in the outfit viewer. And when you click anywhere
in the row, it opens the first link (usually the PNG image).
2024-12-07 10:41:52 -08:00
d92e3288ab Add layers table to pet appearance edit page
Gonna add some more functionality here too, but right now we at least
have this!
2024-12-07 09:58:24 -08:00
c32a495780 Announce the temporary server upgrade (and refactor announcement helper) 2024-12-01 19:26:42 -08:00
ea5c315c2a Oops, fix typo in "Glitched?" label in pet appearance edit form 2024-12-01 11:27:18 -08:00
ab238ab2a6 Add "Support summary" section to Rainbow Pool
This both gives us a sense of progress on labeling, and adds a link to
get started in bulk labeling mode!
2024-12-01 11:13:21 -08:00
407c4b38a5 Add link to reference pet type when labeling pet appearances
Sometimes I forget like, what the masc/fem variants of a given pet
actually look like? Some are super obvious about things like eyelashes,
and others use more subtle eye differences.

This is a cheap lil hack to make it easier to open a reference! Ideally
I think it would be neat to like, when you hover over an option, have
it show you the reference variant of that pose? But this is good enough
I think!
2024-12-01 10:28:58 -08:00
b656ccd982 Add bulk labeling mode for pet appearances
We copy the same feature from alt styles, now that the UI is shared via
support form helpers! Easy peasy!

This adds a "Then: Go to unlabeled appearance" checkbox next to the
submit button on the pet appearance edit form. If checked, it takes you
to the first unlabeled appearance in the database, and keeps the box
checked for next time. Slam through 'em!
2024-12-01 10:10:33 -08:00
aeb00f73cf Extract alt style's "go to next" field into a support form helper
I want to reuse this for unlabeled pet styles is why! (That's been the
immediate motivation for this refactor, but also I do just like that
it'll make support forms easier to build.)
2024-12-01 09:42:19 -08:00
06a301e6d7 Add actions helper to support form builder 2024-12-01 09:30:17 -08:00
1119bbb292 Extract the more complex support form helpers into templates
I think helpers are fine for the simpler ones that are basically *just*
wrapper tags, but once it starts getting into `concat`, I think that's
too unfamiliar of a syntax for developers; let's bail into our usual
templating system!

I'm not sure about putting them in `application/support_form` like this.
That's cute for one-offs like `application/hanger_spinner`, because
`render partial: "hanger_spinner"` assumes the `application` view folder
by default, but that doesn't work once it's nested: it looks for a
`views/support_form` folder.

I think maybe it could soon be time to bail from the strict "view
folders belong to controllers" thing, similar to how we did for
`SupportFormHelper`, and add a `components` folder or similar? Idk, not
sure yet!
2024-12-01 09:26:40 -08:00
252f4f1df1 Add errors helper to support form builder
It still has no good CSS to it, but that's okay, this is just to DRY it
up.
2024-11-30 11:46:19 -08:00
3cd02baa09 Add thumbnail_input method to support form builder
Just to clean up this relatively common input type!
2024-11-30 11:34:02 -08:00
8347633a84 Add SupportFormBuilder to make the support form templates nicer
Instead of hand-rolling HTML, this offers helpers like `f.field`, to
help ensure the HTML is consistent, and to keep the templates more
focused on the unique form elements.
2024-11-30 11:26:23 -08:00
661a5385f4 Migrate pet state edit form to .support-form class
Most notable change here is extracting the pose option bubbles into a
`data-type="radio-grid"`, and pulling that into the `.support-form`
CSS. My rationale is that, unlike most fields, this field benefits from
being 100%-width, and I don't want to specify that as an override if I
can avoid it, because that's fragile-y.

Instead, I extract this into a generic type of field that
`.support-form` can use (it feels pretty reusable anyway!), and require
the caller to specify how many columns they want as `--num-columns`.
2024-11-30 10:49:47 -08:00
c27477fabe Refactor support-form CSS to be more reusable layout
Specifically, I'm going for a more-vertical layout, cuz I want to bring
PetState over to it, and the weird grid situation wasn't gonna fit the
big pose label radios.
2024-11-30 10:33:58 -08:00
c7bea666c9 Add the "body fit" field to the item editing page 2024-11-20 12:23:30 -08:00
f49f9f386d Add item editing fields to manually override an item to be an NC item 2024-11-20 12:13:33 -08:00
3937ba354f Add edit page for items, to set modeling status for done/glitchy items 2024-11-20 12:07:25 -08:00
388bb9a251 Oops, fix mistakes when extracting support-form class
I didn't include the alt styles call site when making the commit, and
also I named the file differently than other nearby files are named!
2024-11-20 11:24:56 -08:00
217d25edab Handle new colors/species in the Rainbow Pool
Oh right, yeah, we like to do things gracefully around here when
there's no corresponding color/species record yet!

Paying more attention to this, I'm thinking like… it could be a cool
idea to, in modeling, *create* the new color/species record, and just
not have all the attributes filled in yet? Especially now that we're
less dependent on attributes like `standard` to be set for correct
functioning.

But for now, we follow the same strategy we do elsewhere in the app: a
pet type can have `color_id` and `species_id` that don't correspond to
a real record, and we cover over that smoothly.
2024-11-15 19:56:07 -08:00
9e3ce74ed5 Auto-focus series name when labeling alt styles
Helpful when doing a bunch in a row (like today's big release!)
2024-11-14 17:14:03 -08:00
e4e81f0694 Update modeling bug announcement, now that things are working again
Also, while we're here! To restore the lost data, I:

1. Downloaded this scheduled public data backup, which was taken
   thankfully the day before we updated modeling code!
   https://impress.openneo.net/public-data/2024-11-03T08_15_02Z-scheduled.sql.gz
2. Trimmed it just to the section about the `parents_swf_assets` table:
   dropping it, then rebuilding it from scratch.
3. Ran this modified backup SQL dump on the production server.
4. Ran the code from `db/migrate/20241001052510_add_cached_fields_to_items.rb`
   to bring items' cached fields back into the correct state.

I also had to fix some errors in the item data that prevented some
items from passing the latest validations:

```rb
Item.where(rarity: "").update_all(rarity: "???")
Item.where(description: "").update_all(description: "???")
Item.where(zones_restrict: "").update_all(zones_restrict: "00000
00000000000000000000000000000000000000000000000")
```
2024-11-06 14:34:15 -08:00
3ac89e830e Announcement about modeling being broken 2024-11-06 11:55:05 -08:00
c78d45a0b5 Copy edit on pet styles
The NC Pet Styles sentence getting broken across two lines I think
makes it too hard to notice.

Design-wise, it would be nice to just call better attention to this
feature altogether in some higher-level design-language-y way, but!
Whatever!
2024-10-22 16:48:37 -07:00
930bfca028 Add creation date to alt styles listings
Copied from how pet types do it!
2024-10-22 16:46:55 -07:00
29aa769bda Oops, tiny copy edit for alt styles page
Right, missed this when renaming them, lol!
2024-10-22 16:44:42 -07:00
66438eae1a Add mode to keep labeled alt styles until they're all labeled
If you check this box, it'll keep you in a mode where saving an alt
style redirects you to the *next* one that needs labeling, until
they're all done. Useful for big drops!
2024-10-22 16:39:25 -07:00
83e5ad6bcc Update alt styles copy to adjust for them not all being Nostalgic now 2024-10-18 17:29:48 -07:00
23c083ff1d Use "real" series name field when editing alt styles
Just a little improvement to the form, so when there's no series name,
the text field is empty—even though in most contexts we *pretend* it's
"<New?">
2024-10-18 17:13:16 -07:00
50c9ba53e7 Add announcement explaining alt style bugs
so people know it's fixed and can model them now lol
2024-10-18 17:04:44 -07:00
7891acd3b1 Oops, missed a spot for Modeling -> Rainbow Pool link updates
Whoops, clicking the *paint brush image* still linked to the Modeling
Hub, instead of the Rainbow Pool. Fixed!
2024-10-12 14:17:49 -07:00
16deee94e4 Remove now-unused pet state show page 2024-10-11 17:48:23 -07:00
1a0fb68b1c Add more explanation copy to Rainbow Pool pages 2024-10-11 17:38:34 -07:00
4f9fbc1ac0 Improve pet type "Added" timestamp styles 2024-10-11 16:24:47 -07:00
5648f55d2c Add date to pet types in Rainbow Pool 2024-10-11 16:00:07 -07:00
6934b636fb Update Pet Styles copy 2024-10-11 15:50:31 -07:00
83fe0d20e0 Add Rainbow Pool breadcrumbs to Pet Styles page 2024-10-11 15:42:19 -07:00
1626f0706c Move Alt Styles into /rainbow-pool URLs, say "Pet Styles" more in text 2024-10-11 15:37:37 -07:00
7fad6abfed Add homepage link to Rainbow Pool, and move Modeling Hub to footer 2024-10-11 15:27:36 -07:00
7c1b3ca447 Add "no results" output for Rainbow Pool filters with no results 2024-10-11 15:13:22 -07:00
be0faaa36e Improve top nav support on mobile for responsive design pages
Before this change, pages that opt in with `use_responsive_design`
would often have the top nav be real cluttered for logged-in users. (I
think I happened to first test this responsive design without being
logged in on my dev box, oops!) Because the home link and `#userbar`
were absolutely positioned on the page, they would frequently overlap.

Here, I stop doing our old tricks to make the top nav load last on the
page. (This was to get "main content" loading faster, which I think is
a. not as relevant today with more commonly faster connections, and b.
was a bit naive to think that it'd be helpful to have to wait a long
time to _navigate_ if a page is unexpectedly large.)

These tricks used to leave some padding at the top of the `#container`,
which these elements would then visually fill via `position: absolute`
once they load.

Next, I update the CSS (for the responsive design pages only) to use
the new `#main-nav` container to lay them out in Flexbox: all in one
row if possible, or wrapped if needed.

Some designs hide stuff like this into a hamburger menu or such when
the screen gets small. I haven't done that here! No specific reason,
I'm just not sold that it's that much better, or worth the trouble.

I tested this on the following combinations:
1. Logged out, homepage
2. Logged in, homepage
3. Logged out, `/items`
4. Logged in, `/items`
5. Logged out, `/items/89487-Dyeworks-Purple-Haunted-Sky-Background`
6. Logged in, `/items/89487-Dyeworks-Purple-Haunted-Sky-Background`

Hope it's solid! 🤞
2024-10-05 17:52:38 -07:00
f87f4e61b3 Add extra support info to Rainbow Pool pet types
Easy-to-notice hints for which pet types need more labeling!
2024-10-04 19:24:40 -07:00
dfca88bed3 Oops, use the Rainbow Pool list styles under "Other" show/hide 2024-10-04 18:46:53 -07:00
1d51e28144 Post perf upgrades announcement (and job-hunting ask 💖️) 2024-10-03 15:09:38 -07:00
860b8eef72 Remove not-very-useful caching for homepage modeling
Huh, I hadn't realized that like, we'd already set up the controller to
always *run* basically all of the modeling logic, and the caching in
the view layer wasn't saving us any queries anymore. Kinda silly!

Remove the caching call, just to simplify the codebase (I like to avoid
caching things that don't specifically need it!).

And hey, love that the modeling code in the controller is now *way*
faster to run! You love to see it!
2024-10-02 18:26:49 -07:00
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