Extract the style tiles from the PosePicker into their own module #37
Loading…
Reference in a new issue
No description provided.
Delete branch "armin-bot/impress:claude/style-tiles"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The first of four steps toward moving NC Pet Styles out of the pose picker popover and into wardrobe search. This one only moves code: the popover looks and behaves the same.
The style grid's pieces lived privately in
PosePicker.js. They now live inWardrobePage/StyleTiles.js, so the search panel can use them next (#38).What moved, and what's new
StyleTile(wasStyleOption). New, unused by the popover: optionalshowLabels(two short lines under the picture) andonDeselect(clicking the selected tile takes it off).StyleTileGroups, the color-grouped grid, with the tile size, gap and sticky-header offset as props. Tile size can be responsive.useStyleHoverPreview, the hover-to-preview rules as a hook: mouse only, the 200ms settle, and ending the preview when the grid hides or unmounts.One behavior change: the filter matches more words
The style filter now also matches the species name and "nc pet style token". So "nostalgic aisha" finds 51 of Aisha's 143 styles, and "token" finds all of them. To support that,
/species/:id/alt-styles.jsonincludes the species (id, name, human name), the same way it already includes the color.Screenshots
The popover before and after, on a Faerie Aisha. A pixel diff shows only image antialiasing differences.
Testing
bundle exec rspec: 4 failures inspec/models/alt_style_spec.rb(canonical_pet_type), which fail the same way onmainin my environment.yarn lintand Prettier are clean.🤖 Generated with Claude Code
https://claude.ai/code/session_014PWWczDoFB58ZYFZ68WxeS
armin-bot referenced this pull request2026-11-17 12:21:11 -08:00