Skip to content

Feat/reset picks button - #44

Open
9DYnastY wants to merge 4 commits into
InlitX:mainfrom
9DYnastY:feat/reset-picks-button
Open

9DYnastY wants to merge 4 commits into
InlitX:mainfrom
9DYnastY:feat/reset-picks-button

Conversation

@9DYnastY

Copy link
Copy Markdown
Contributor

Summary

  1. Clear / Restore Picks Button (as requested in Feat/exercise selection improvements #24)
  2. Simplified Chinese Localization for 1.2.0 Rings: Completes Chinese exercise names and step-by-step instructions in catalog_zh.dart for the 14 new gymnastics ring exercises introduced in 1.2.0.
  3. Language Picker Sheet Fix: Added isScrollControlled: true and SingleChildScrollView to the language bottom sheet in SettingsScreen so all 6 supported languages fit cleanly without being clipped on smaller screens.

Key Changes

  • WorkoutState: Added clearPicks(), resetDefaultPicks(), and toggleResetPicks().
  • TrainScreen: Added the reset button in Step 2 search bar with dynamic styling matching active picks state.
  • catalog_zh.dart: Added Chinese entries for 14 ring exercises (rNG1dip ~ rNGemus) in kExerciseNameZh and kExerciseStepsZh.
  • settings_screen.dart: Enabled scrolling and full-height support for language selection bottom sheet.
  • Tests:
    • test/flow_test.dart: Unit tests for state transitions of toggleResetPicks().
    • test/train_step2_test.dart: Widget test for button display, dynamic colors, and tap behavior.
    • test/i18n_test.dart & test/exercise_alias_test.dart: All passed.

Verification

  • flutter test: All tests passed.

…election

In step 2 of workout creation (TrainScreen review), users are presented with a default selection of exercises based on the selected muscles.

Currently, clearing all picks to build a workout from scratch requires deselecting each exercise individually. Conversely, if a user wants to restore the default recommendations, they have to navigate back and forth.

This commit adds a reset/clear button (using arrowCounterClockwise) in the search bar row:
- When picks are not empty: tapping clears all picks
- When picks are empty: tapping restores the default recommended picks
- State helpers: WorkoutState.clearPicks(), resetDefaultPicks(), toggleResetPicks()
- Includes unit tests in flow_test.dart and widget test in train_step2_test.dart
- Added 14 new gymnastics ring exercise names to kExerciseNameZh in catalog_zh.dart.
- Added corresponding full 5-step instructions to kExerciseStepsZh in catalog_zh.dart.
- Now all 543 catalog exercises have 100% complete names and steps in Simplified Chinese.
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.

1 participant