Add an NC Pet Styles mode to wardrobe search #38

Merged
matchu merged 4 commits from armin-bot/impress:claude/pet-styles-search into main 2026-11-17 13:12:50 -08:00
Contributor

Adds an NC Pet Styles mode to wardrobe search. The pose picker's Styles tab opens right over the pet, so the style you hover to preview is hidden behind the popover you're hovering in. In search, the preview pane stays uncovered.

Screenshots

Hovering a style previews it, with a pill over the pet Typing filters the grid by name, color or species
The search panel showing style tiles grouped by color; the pet on the left shows the hovered style, with a "Previewing · Fluttering Faerie" pill above it The grid filtered to "nostalgic", with Nostalgic Faerie Ice worn and named in the caption bar
Phone width At phone width, the grid is the lower pane with the pet above it, and a tapped style is worn

What changes for users

  • Getting there. Typing the start of "styles", "pet" or "tokens" in the search field offers an NC Pet Styles filter, after any NC/NP/PB suggestions. The advanced search suggestions offer it too. It shows in the field's left addon, like the zone and NC/NP filters.
  • The grid. Tiles are about 72px (64px on phones), grouped by color with the pet's color first. Two short lines under each name it: the series ("Nostalgic") and the Prismatic variant ("Pink"). Typed text filters by name, color and species.
  • Wearing. Clicking a tile wears it. Clicking the worn tile, or pressing Space on it, takes it off. There's no Default tile.
  • Previewing. With a mouse, resting on a tile for 200ms previews it on the pet. A "Previewing" pill over the pet names the style. Leaving the grid, typing or picking ends the preview. Touch has no preview: a tap wears.
  • Caption bar. Pinned to the bottom, it names the hovered style, or else the worn one. For a worn, named style it links to the token's item page. The hovered style gets "Click to wear" instead of a link: moving down to a link would leave the grid and end the hover.
  • Keyboard. Down from the field moves to the worn style, or the first one. Arrow keys move between styles (and wear them, as in the popover), without wrapping at the ends: Up or Left from the first style goes back to the field, like item search. Escape goes back to the field too. Scrolling by keyboard keeps the focused tile clear of the caption bar.

The pose picker's Styles tab is unchanged for now. Step 3 of the plan slims it to a row that opens this mode.

Under the hood

  • filterToItemKind: "STYLE" is the new query value. In that mode, zone and own/want suggestions are hidden, and the style suggestion is hidden while those filters are set. Own/want for styles is a later follow-up.
  • SearchPanel renders the new StyleSearchResults for STYLE, which filters the species' styles in the browser from the same /species/:id/alt-styles.json the wardrobe already loads. No server change.
  • previewAltStyleId moved from WardrobePreviewAndControls up to WardrobePage, so search and the pose picker share it.
  • A few named styles have no series yet, so the server's series is the <New?> placeholder. Their tiles show the style's name instead.

Testing

yarn lint and Prettier are clean. There's no JS test runner, so I checked these in Chromium against a local server with public data, using a Faerie Aisha (143 styles):

  • The suggestion appears for "styl", and picking it shows 143 tiles with the "NC Pet Styles" addon.
  • Hovering previews on the pet and shows the pill. Clicking wears it (style= lands in the URL), the pill goes away, and the picker button reads "Fluttering".
  • Clicking the worn tile again takes it off. Space on the worn tile takes it off, and Space again puts it back on.
  • "nostalgic pink" shows 2 tiles. "zzz" shows "No styles match “zzz”."
  • Down from the field focuses the first tile. ArrowRight moves and wears. Escape returns to the field, and a second Escape returns to the outfit list.
  • Phone emulation (iPhone 13): tapping wears, and no preview or pill sticks.
  • Switching species to Acara mid-preview clears the pill, and the grid reloads with Acara's 98 styles, Faerie first.
  • Up from the first tile returns to the field without wearing anything. Right on the last tile stays put. Walking 40 tiles with the arrow keys keeps each focused tile above the caption bar.
  • With only 2 matches, the caption bar still sits at the bottom of the panel.
  • "nc" suggests only "Neocash items"; "st", "pe", "token" and "styl" offer NC Pet Styles. Ordinary item search ("hat") looks unchanged.

A fresh-eyes review pass found the keyboard and layout issues above, now fixed. Not yet checked: a screen reader, and Firefox. (Space-to-remove has a guard for browsers that click on keyup, but I could only test Chromium.)

🤖 Generated with Claude Code

https://claude.ai/code/session_014PWWczDoFB58ZYFZ68WxeS

Adds an **NC Pet Styles** mode to wardrobe search. The pose picker's Styles tab opens right over the pet, so the style you hover to preview is hidden behind the popover you're hovering in. In search, the preview pane stays uncovered. ## Screenshots | Hovering a style previews it, with a pill over the pet | Typing filters the grid by name, color or species | |---|---| | ![The search panel showing style tiles grouped by color; the pet on the left shows the hovered style, with a "Previewing · Fluttering Faerie" pill above it](https://code.openneo.net/attachments/d52dd5ea-64da-401c-a1cd-70b560733445) | ![The grid filtered to "nostalgic", with Nostalgic Faerie Ice worn and named in the caption bar](https://code.openneo.net/attachments/36774dc6-c595-4060-81ac-18b0af28b531) | <details><summary>Phone width</summary> <img src="https://code.openneo.net/attachments/9e0ecfdb-f7cd-4830-bf7a-29fc00f22c8e" width="390" alt="At phone width, the grid is the lower pane with the pet above it, and a tapped style is worn"> </details> ## What changes for users - **Getting there.** Typing the start of "styles", "pet" or "tokens" in the search field offers an **NC Pet Styles** filter, after any NC/NP/PB suggestions. The advanced search suggestions offer it too. It shows in the field's left addon, like the zone and NC/NP filters. - **The grid.** Tiles are about 72px (64px on phones), grouped by color with the pet's color first. Two short lines under each name it: the series ("Nostalgic") and the Prismatic variant ("Pink"). Typed text filters by name, color and species. - **Wearing.** Clicking a tile wears it. Clicking the worn tile, or pressing Space on it, takes it off. There's no Default tile. - **Previewing.** With a mouse, resting on a tile for 200ms previews it on the pet. A "Previewing" pill over the pet names the style. Leaving the grid, typing or picking ends the preview. Touch has no preview: a tap wears. - **Caption bar.** Pinned to the bottom, it names the hovered style, or else the worn one. For a worn, named style it links to the token's item page. The hovered style gets "Click to wear" instead of a link: moving down to a link would leave the grid and end the hover. - **Keyboard.** Down from the field moves to the worn style, or the first one. Arrow keys move between styles (and wear them, as in the popover), without wrapping at the ends: Up or Left from the first style goes back to the field, like item search. Escape goes back to the field too. Scrolling by keyboard keeps the focused tile clear of the caption bar. The pose picker's Styles tab is unchanged for now. Step 3 of the plan slims it to a row that opens this mode. ## Under the hood - `filterToItemKind: "STYLE"` is the new query value. In that mode, zone and own/want suggestions are hidden, and the style suggestion is hidden while those filters are set. Own/want for styles is a later follow-up. - `SearchPanel` renders the new `StyleSearchResults` for `STYLE`, which filters the species' styles in the browser from the same `/species/:id/alt-styles.json` the wardrobe already loads. No server change. - `previewAltStyleId` moved from `WardrobePreviewAndControls` up to `WardrobePage`, so search and the pose picker share it. - A few named styles have no series yet, so the server's series is the `<New?>` placeholder. Their tiles show the style's name instead. ## Testing `yarn lint` and Prettier are clean. There's no JS test runner, so I checked these in Chromium against a local server with public data, using a Faerie Aisha (143 styles): - [x] The suggestion appears for "styl", and picking it shows 143 tiles with the "NC Pet Styles" addon. - [x] Hovering previews on the pet and shows the pill. Clicking wears it (`style=` lands in the URL), the pill goes away, and the picker button reads "Fluttering". - [x] Clicking the worn tile again takes it off. Space on the worn tile takes it off, and Space again puts it back on. - [x] "nostalgic pink" shows 2 tiles. "zzz" shows "No styles match “zzz”." - [x] Down from the field focuses the first tile. ArrowRight moves and wears. Escape returns to the field, and a second Escape returns to the outfit list. - [x] Phone emulation (iPhone 13): tapping wears, and no preview or pill sticks. - [x] Switching species to Acara mid-preview clears the pill, and the grid reloads with Acara's 98 styles, Faerie first. - [x] Up from the first tile returns to the field without wearing anything. Right on the last tile stays put. Walking 40 tiles with the arrow keys keeps each focused tile above the caption bar. - [x] With only 2 matches, the caption bar still sits at the bottom of the panel. - [x] "nc" suggests only "Neocash items"; "st", "pe", "token" and "styl" offer NC Pet Styles. Ordinary item search ("hat") looks unchanged. A fresh-eyes review pass found the keyboard and layout issues above, now fixed. Not yet checked: a screen reader, and Firefox. (Space-to-remove has a guard for browsers that click on keyup, but I could only test Chromium.) 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_014PWWczDoFB58ZYFZ68WxeS
Extract the style tiles from the PosePicker into their own module
Some checks failed
CI / rspec (pull_request) Failing after 7m56s
CI / deploy (pull_request) Has been skipped
a2209391ba
The NC Pet Styles grid is moving into wardrobe search, so its pieces need
to work outside the PosePicker's popover. This moves them into
StyleTiles.js, with no visible change to the popover:

- StyleTile (was StyleOption), now with optional labels under the picture
  and an `onDeselect` for clicking the selected style to take it off.
- StyleTileGroups, the color-grouped grid, with the tile size, gap and
  sticky header offset as props.
- useStyleHoverPreview, the hover-to-preview rules as a hook: the settle
  delay, mouse-only, and cleanup when hidden or unmounted.
- The naming, matching, grouping and lazy-image helpers.

The filter also matches the species name and "nc pet style token" now,
so searches like "nostalgic aisha" or "token" find styles. For that, the
alt styles JSON includes the species, like it already does the color.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014PWWczDoFB58ZYFZ68WxeS
The PosePicker's Styles tab opens right over the pet, so the style you're
hovering to preview is hidden behind the very popover you're hovering in.
This adds styles to item search instead, where the preview pane is left
uncovered:

- The search field offers an "NC Pet Styles" filter (for words like
  "styles", "pet" or "tokens"), shown in the same addon as other filters.
- In that mode, the search panel shows a grid of style tiles instead of
  item results: grouped by color with the pet's own first, filtered by
  the typed text, with two short labels under each tile.
- Clicking a tile wears it, and clicking (or pressing Space on) the worn
  tile takes it off. Down from the search field moves into the grid, the
  arrow keys move between styles, and Escape goes back up.
- Resting the mouse on a tile previews it on the pet, and a "Previewing"
  pill over the pet makes it clear the outfit hasn't changed. To share the
  preview between search and the PosePicker, WardrobePage owns that state
  now.
- A caption bar along the bottom names the hovered or worn style, with a
  link to the worn style's token item page.

The PosePicker's Styles tab stays for now; a later change slims it down to
point here instead. The flagged SearchFooter skips item search in this
mode, so it shows no results rather than wrong ones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014PWWczDoFB58ZYFZ68WxeS
Label styles with no known series by their name, not "<New?>"
Some checks failed
CI / rspec (pull_request) Has been cancelled
CI / deploy (pull_request) Has been cancelled
c737333c4f
A few styles have a full name, but no series name yet, so the server
sends its "<New?>" placeholder as the series. Under a tile, show the
style's name instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014PWWczDoFB58ZYFZ68WxeS
armin-bot force-pushed claude/pet-styles-search from c737333c4f
Some checks failed
CI / rspec (pull_request) Has been cancelled
CI / deploy (pull_request) Has been cancelled
to 15ac44c855
All checks were successful
CI / rspec (pull_request) Successful in 1m57s
CI / deploy (pull_request) Has been skipped
2026-11-17 13:05:49 -08:00
Compare
matchu merged commit 3e85e4eeae into main 2026-11-17 13:12:50 -08:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
OpenNeo/impress!38
No description provided.