Repository navigation
fix(collection): stop the shiny filter button from resizing when toggled - #390
Merged
Merged
Conversation
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
marked this pull request as ready for review
October 2, 2026 07:58
8 of 10 tasks
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Toggling the shiny-only filter in the dex/collection toolbar swaps its SF Symbol
(
sparkle→sparkles) and font weight (.regular→.bold). That change inglyph 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
Imagea fixed16x16frame (sized to fit the larger, boldsparklesglyph without clipping) so the button's footprint is identical inboth 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
UI changes
Checklist
swift buildandswift testpass locallyTest plan
swift build— passesswift test— 1384 tests executed, 0 failures (15 pre-existing skips)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.🤖 Generated with Claude Code