Skip to content

feat: searchable dropdowns for every move list - #4

Merged
TechLuddite merged 1 commit into
mainfrom
claude/move-list-dropdown-search-2zhu4e
Aug 4, 2026
Merged

TechLuddite merged 1 commit into
mainfrom
claude/move-list-dropdown-search-2zhu4e

Conversation

@TechLuddite

Copy link
Copy Markdown
Owner

Adds the same in-dropdown search the Pokémon pickers have to every move list dropdown.

What changed

  • Generalised the searchable Pokémon picker in components.jsx into a shared SearchPick that supports grouped options (headings render like optgroups, non-selectable).
  • Added MoveSelect on top of it: damaging moves listed with their power, status moves grouped under a "Status moves" heading, and an optional — empty — entry for clearing a slot (hidden while searching, so typing only ever matches real moves).
  • Swapped both move dropdown sites over: the calculator's Move field (DamageCalc.jsx) and all four per-Pokémon move slots in the sim team builder (BattleSim.jsx).
  • PokemonSelect's API and behaviour are unchanged; search still matches on the move's name only, not the power suffix.

Checks

  • npm run test:run — 93 tests green
  • npm run build — green, CNAME intact in dist/

🤖 Generated with Claude Code

https://claude.ai/code/session_01ASCtdEn3r6CCiF9pwcw5sZ


Generated by Claude Code

Generalise the Pokémon picker into a shared SearchPick and add a
MoveSelect on top of it: damaging moves with power up top, status moves
grouped underneath, and an optional empty slot for the team builder.
The calculator's move field and all four sim team-slot pickers now open
with a search box, same as the Pokémon dropdowns.
@TechLuddite
TechLuddite merged commit bbf2397 into main Aug 4, 2026
2 checks passed
TechLuddite pushed a commit that referenced this pull request Aug 4, 2026
Two things Joseph asked for: a way to tell us when a move works differently
from the real game, and a changelog he can actually read.

What's new (src/features/News.jsx, src/data/changelog.js)
- every update written up in plain words — what it means in a battle, not
  what changed in the code
- a `credit` line for whoever spotted it, because being named in the
  changelog is the best part of reporting something
- an amber dot on the tab until this build's entry has been read, remembered
  in localStorage like the rest of the app's state

Report (src/features/Report.jsx, src/lib/feedback.js)
- pick what kind of thing it is, optionally pick the move it's about, write
  it up, and press send: it opens GitHub with the issue already filled in
- a copy button for when whoever is holding the tablet isn't logged in
- a preview of exactly what gets sent, since this is a child's app and
  "what am I about to publish" should never be a mystery
- no backend and nothing about the user collected — just the text typed, the
  move picked, and which version of the lab it came from

feedback.js is tested rather than trusted: a report saying "Fire Spin & Wrap
does 1/8 + a bit? see #4, 100% of max HP" has to survive being turned into a
URL, and an over-long report is cut deliberately and says so instead of being
mangled by the browser.

The tab row now splits: the four battling tabs on the left, these two over on
the right, a shade quieter. It wraps as a pair on a phone rather than
stranding one per line.

Also: MoveSelect takes an emptyLabel so the optional move picker can say
"no move in particular" instead of the team builder's "— empty —".

177 tests pass. Verified in a real browser at desktop and phone widths.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017SGWh8kJjQsy4QB9pigonf
TechLuddite added a commit that referenced this pull request Aug 4, 2026
Two things Joseph asked for: a way to tell us when a move works differently
from the real game, and a changelog he can actually read.

What's new (src/features/News.jsx, src/data/changelog.js)
- every update written up in plain words — what it means in a battle, not
  what changed in the code
- a `credit` line for whoever spotted it, because being named in the
  changelog is the best part of reporting something
- an amber dot on the tab until this build's entry has been read, remembered
  in localStorage like the rest of the app's state

Report (src/features/Report.jsx, src/lib/feedback.js)
- pick what kind of thing it is, optionally pick the move it's about, write
  it up, and press send: it opens GitHub with the issue already filled in
- a copy button for when whoever is holding the tablet isn't logged in
- a preview of exactly what gets sent, since this is a child's app and
  "what am I about to publish" should never be a mystery
- no backend and nothing about the user collected — just the text typed, the
  move picked, and which version of the lab it came from

feedback.js is tested rather than trusted: a report saying "Fire Spin & Wrap
does 1/8 + a bit? see #4, 100% of max HP" has to survive being turned into a
URL, and an over-long report is cut deliberately and says so instead of being
mangled by the browser.

The tab row now splits: the four battling tabs on the left, these two over on
the right, a shade quieter. It wraps as a pair on a phone rather than
stranding one per line.

Also: MoveSelect takes an emptyLabel so the optional move picker can say
"no move in particular" instead of the team builder's "— empty —".

177 tests pass. Verified in a real browser at desktop and phone widths.


Claude-Session: https://claude.ai/code/session_017SGWh8kJjQsy4QB9pigonf

Co-authored-by: Claude <noreply@anthropic.com>
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