Repository navigation
Add Exercise opens clean after an exercise was added - #165
Open
daniel-bernardino747 wants to merge 1 commit into
Open
daniel-bernardino747 wants to merge 1 commit into
daniel-bernardino747 wants to merge 1 commit into
Conversation
The picker keeps its search and filters in sessionStorage so that re-opening it mid-workout doesn't lose them. After an add, though, the next open is for a different exercise, and it started with the last one's search and filters to clear by hand. They are now dropped when the picker closes after at least one add. Closing without adding keeps them, and the picker still stays open with its filters while several exercises are added in a row.
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.
Closes #161
Summary
The picker's search and filters are dropped when it closes after at least one add, so the next open starts clean. Closing without adding keeps them, and the picker still stays open with its filters while several exercises are added in a row.
Changes
src/components/exercises/ExercisePicker.svelte: anonDestroythat removes the saved filters when something was added in that sessionCHANGELOG.md: entry under UnreleasedNo visual or style changes. The same picker is used in the Workout Editor, where it behaves the same way.
Screenshots
Reopening Add Exercise after adding Bench Press with "press" + Chest:
How to test
Notes
This is only a suggestion. Feel free to use all of it, part of it or none of it.
I used AI (Claude Code) to help write these changes; I reviewed and tested them myself.