-
Notifications
You must be signed in to change notification settings - Fork 0
Add rounds and numeric duration/distance to HIIT workouts in blockTemplates.ts #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Deploying with
|
Status | Name | Latest Commit | Preview URL | Updated (UTC) |
---|---|---|---|---|
✅ Deployment successful! View logs |
unbroken | fc15a43 | Commit Preview URL Branch Preview URL |
Sep 13 2025, 03:11 PM |
Co-authored-by: Bruno-366 <81762173+Bruno-366@users.noreply.github.com>
@copilot can you update the types for hiit workouts to allow for either "duration" or "distance" and update src/blockTemplates.ts accordingly? "duration" or "distance" should be numbers not strings. for hiit workouts "duration" is in seconds and "distance" is in meters (for liss workouts i guess it would be minutes and kilometers respectively) |
- Modified CardioWorkout interface to support optional duration and distance as numbers - For HIIT workouts: duration in seconds, distance in meters - For LISS workouts: duration in minutes, distance in kilometers - Updated all HIIT workouts in blockTemplates.ts to use numeric values: - Reset-20: duration: 20/15 (seconds) with rounds - Hill Sprints: rounds only (no duration/distance) - GC 9: distance: 100 (meters) with rounds - 600m Resets: distance: 600 (meters) with rounds - Tempo Run: distance: 5000 (meters) - Updated CardioWorkouts.svelte to display proper units based on workout type - Preserved existing LISS timer functionality Co-authored-by: Bruno-366 <81762173+Bruno-366@users.noreply.github.com>
I've updated the types and blockTemplates as requested! The changes include: Type System:
All HIIT workouts updated:
The UI now displays proper units (seconds/meters for HIIT, minutes/km for LISS) and all existing functionality is preserved. Commit: fc15a43 |
This PR adds rounds functionality to HIIT workouts and updates the type system to support numeric duration/distance values as requested. HIIT workouts can now specify the number of rounds in addition to duration or distance, providing better clarity for interval-based exercises.
Changes Made
Type System Updates:
CardioWorkout
interface intypes.ts
to support:duration?: number
(seconds for HIIT, minutes for LISS)distance?: number
(meters for HIIT, kilometers for LISS)rounds?: number
field for interval trackingTraining Templates Updated:
Updated all HIIT workout definitions in
blockTemplates.ts
to use numeric values:duration: 20
(seconds) andduration: 15
(seconds) with roundsrounds
only (3, 5, 7 rounds)distance: 100
(meters) with 10 roundsdistance: 600
(meters) with 6 roundsdistance: 5000
(meters for continuous runs)UI Enhancement:
CardioWorkouts.svelte
to display duration/distance with proper unitsExamples
Before:
After:
The UI now clearly shows duration/distance with appropriate units and rounds information for better workout guidance.
Makes progress on #42.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.