Repository navigation
Show the weekly plan rest day on home - #290
Merged
Merged
Conversation
Owner
|
Thanks for the PR and the tests, really clear work. I'd already fixed this on my side in the same batch, so I'm merging it but keeping my version to avoid duplicating it. Really appreciate it! |
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.
On a day the weekly plan leaves empty, the home card showed "Today's focus" with a suggested muscle group, so it looked like a training day while Routines said rest.
Now it shows "Rest day" with the next planned routine ("Next: Push"), labelled Weekly plan, like the rotation rest day does. That only happens when nothing is planned for today and nothing was trained today, and only if the weekly plan has a routine somewhere in the next 7 days. Without any plan, home still shows today's focus. Rotation behaves as before.
The new
restUpcominggetter in routines_state.dart covers both cases, and the home card uses it.Added 4 tests in test/weekly_plan_test.dart: an empty day points to the next planned routine; there's no rest card with a routine today, after training today, or without a plan; moving today's routine to another day leaves today as rest; the rotation rest day still works. They don't compile without the change.
flutter analyzeshows no new issues andflutter testpasses. I haven't checked it on a phone.Closes #284