Add evolution chain navigation with e/E keys - #6
Open
rae89 wants to merge 3 commits into
Open
Conversation
… loading Decouple evolution chain fetching from load_detail so left/right arrow navigation stays fast. The chain now loads asynchronously after the detail arrives. Add e/E keybindings to navigate forward/backward through the evolution chain with wrap-around support. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ing and constructors, add test helpers - Move duplicate capitalize() from 3 UI files to shared pub fn in ui/mod.rs - Add filter_pokemon_list() to deduplicate filtered_list() and modal_filtered_list() - Have App::new() delegate to new_with_team_data() to eliminate duplicated field init - Add test_summary(), test_detail(), test_pokemon_list() helpers to reduce test boilerplate - Simplify evolution chain test construction using make_chain() Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
load_detailso left/right arrow navigation stays fast — chain loads asynchronously after detail arrivese/Ekeybindings to navigate forward/backward through the evolution chain with wrap-aroundevolution_chain_species()helper to flatten chains (including branching ones like Eevee) into a navigable species list[←→] Navand[e/E] EvokeybindingsRefactor
capitalize()from 3 UI files into sharedpub fninui/mod.rsfiltered_list()andmodal_filtered_list()via sharedfilter_pokemon_list(query)methodApp::new()delegate tonew_with_team_data()to eliminate 30 lines of duplicated field initializationtest_summary(),test_detail(),test_pokemon_list()test helpers to reduce boilerplate (~400 lines removed)make_chain()helperTest plan
cargo buildpassescargo test— all 101 tests passcargo clippy— no warningseon Bulbasaur → loads Ivysaur →e→ Venusaur →e→ wraps to BulbasaurEgoes backward through the chaine/Edoes nothing), Eevee (navigates through all eeveelutions)🤖 Generated with Claude Code