fix: wire the Welcome Plans button to the WorkoutPlansScreen#968
Merged
Conversation
|
@Anexus5919 is attempting to deploy a commit to the somiljain2024-4175's projects Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
Author
|
@Somil450 @diksha78dev Kindly have a review on this pr. Thanks! |
The Plans button called an empty onViewWorkoutPlans handler, and WorkoutPlansScreen existed but was never imported or rendered, so the button did nothing. Add a workoutPlans screen (lazy-loaded, with a welcome transition), route the button to it, and render WorkoutPlansScreen with the active-plan state. Export ActivePlan so App can type that state.
21c1e49 to
7cef592
Compare
Contributor
Author
|
@Somil450 @diksha78dev Kindly have a review on this pr. Thanks! |
Contributor
Author
|
This failing check is from |
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.
📌 Related Issue
Fixes #883
📝 Description
The Welcome "Plans" button called an empty
onViewWorkoutPlanshandler, andWorkoutPlansScreen(added by #708) existed but was never imported or rendered, with noScreenvalue, no transition, and no render block. The button did nothing and the screen was unreachable.🔹 What has been changed?
workoutPlansscreen to theScreenunion andSCREEN_TRANSITIONS(reachable fromwelcome, returns towelcome).WorkoutPlansScreenand routed the button:onViewWorkoutPlans={() => navigateTo("workoutPlans")}.WorkoutPlansScreenwithactivePlan/setActivePlanstate; exportedActivePlanfrom the component soAppcan type that state.🔹 Why are these changes needed?
addXP/onStartWorkoutprops are intentionally omitted (onStartWorkoutis declared but unused in the component, anduseLevelingexposes no amount-based XP method), so they are left for a follow-up rather than faking a mapping.🛠️ Type of Change
🧪 Testing
✅ Tests Performed
npx tsc --noEmitandnpx eslintclean for the changed files.navigateTo("workoutPlans")-> rendersWorkoutPlansScreen-> back returns towelcome.🔹 Note on automated tests
No committed test: App-level routing of a lazy-loaded screen is not covered by the repo's frontend test setup; verified by
tsc/eslintand tracing the path.🌐 Browsers Tested
Not applicable here (routing wiring; verified via static analysis).
📷 Screenshots / Demo (if applicable)
A screenshot of the Welcome screen's "Plans" button could be added to show the entry point.
📋 Checklist
💬 Additional Notes
Branched from
upstream/main; merges cleanly with the current base.