Skip to content

fix(collection): stop the shiny filter button from resizing when toggled - #390

Merged
chattymin merged 1 commit into
chattymin:mainfrom
IdoZ14:fix/shiny-filter-toggle-shift
Oct 5, 2026
Merged

chattymin merged 1 commit into
chattymin:mainfrom
IdoZ14:fix/shiny-filter-toggle-shift

Conversation

@IdoZ14

@IdoZ14 IdoZ14 commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Toggling the shiny-only filter in the dex/collection toolbar swaps its SF Symbol
(sparkle → sparkles) and font weight (.regular → .bold). That change in
glyph metrics shifted the button's own width, which in turn nudged the search
field and the sort menu next to it every time the filter was pressed.

Fix

Give the button's Image a fixed 16x16 frame (sized to fit the larger, bold
sparkles glyph without clipping) so the button's footprint is identical in
both states. The symbol swap and yellow highlight color change are unchanged.
No other toggle in the same toolbar (search field, clear button, sort menu)
swaps its own glyph/weight, so none of them have this issue.

Type of change

  • Bug fix
  • New feature
  • Refactor / cleanup
  • Documentation
  • Other:

UI changes

Before After
Shiny filter button (and the search field / sort menu beside it) shifts a couple of points when toggled on/off Toolbar row stays perfectly still when the shiny filter is toggled

Checklist

  • swift build and swift test pass locally
  • PR title and description are written in English
  • UI changes are described above (before/after — images optional)
  • No copyrighted assets, secrets, or private tooling references are committed (see CONTRIBUTING)
  • Tests were added or updated for this change (layout-only fix, not exercised by the existing test suite)

Test plan

  • swift build — passes
  • swift test — 1384 tests executed, 0 failures (15 pre-existing skips)
  • Manual: not run in this environment (no macOS app runtime available here). Reviewer/CI should toggle the shiny filter in the collection view and confirm the search field and sort menu no longer shift.

Screenshots

Rendered from the production SwiftUI views in an offscreen window with a real save file (dark mode, 2x). Top two rows: main, where the button grows from 45 to 50 px when toggled on and the search field shifts 1 px. Bottom two rows: this PR, where the button is 48 px (the search field's height) in both states.

Shiny toggle before and after

🤖 Generated with Claude Code

Toggling the shiny-only filter swaps the SF Symbol (sparkle/sparkles)
and font weight (regular/bold), which changes the glyph's intrinsic
size and shifts the button, the search field, and the sort menu next
to it. Give the icon a fixed 16x16 frame so the button's footprint is
identical in both states.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@IdoZ14
IdoZ14 marked this pull request as ready for review October 2, 2026 07:58
@chattymin
chattymin merged commit fc66c1e into chattymin:main Oct 5, 2026
2 checks passed
Strongorange added a commit to Strongorange/PokeTokenBar-windows that referenced this pull request Oct 19, 2026
Port macOS chattymin#329: a search box matching species names in every stored
language (case- and diacritic-insensitive, so 'flabebe' finds Flabebe)
plus Pokedex numbers with partial-digit matches ('25' finds chattymin#125); sort
options for the grid (number asc/desc, name, rarity) and the catch log
(most recent / oldest first with the raising row pinned, number, name,
rarity); and a shiny-only toggle whose fixed width keeps the row from
resizing when toggled (upstream chattymin#390). Empty search results show a
reset-filters button. DexQuery carries the one matcher and both sort
contracts; the engine rows now carry multilingual names for search.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants