Skip to content

feat: add warmup sets before an exercise in a workout - #120

Open
T1mo7hy wants to merge 21 commits into
LibreFitOrg:mainfrom
T1mo7hy:feature/warmup-sets
Open

feat: add warmup sets before an exercise in a workout#120
T1mo7hy wants to merge 21 commits into
LibreFitOrg:mainfrom
T1mo7hy:feature/warmup-sets

Conversation

@T1mo7hy

@T1mo7hy T1mo7hy commented Jul 10, 2026

Copy link
Copy Markdown

This PR adds warmups to workouts.

Currently there is only one warmup "type", but more can easily be added.

Warmups can be added from the "More options" button on the exercise card.

Issue #98

T1mothy added 21 commits July 10, 2026 13:57
…et.kt to include a possible WarmupId instead of ExerciseId
…UiWarmup and UiWarmupWithSets.

Also updated UiSet.kt to follow Set with an optional warmupId for linking to warmups instead of exercises.

Includes adding warmupsWithSets for UiWorkoutWithExercisesAndSets.kt.
… and warmups using their wrapper UiWorkoutItem classes
Includes "Warmup", "Target", "Add warmup", the default warmup mode "40/60/70"
…iExerciseWithSets whilst retaining full functionality.

This is mostly done with drop-in replacements, but filtering by class (UiWarmupItem or UiExerciseItem) for specific functions like updateExerciseSetMode or updateWarmupSetMode
…replaced with "workout items" and warmups by properly renaming temporary variables. (Basically cleaning up my laziness).
Update saving workout with exercises and sets to include saving warmups with the exercises
…th have the same id as they are in different tables.

Warmups are prefixed with "w" and exercises with "e"
…at the screen view models can be guaranteed to be initalised with the correct exercises and warmups.

@IamDg IamDg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

Thank you for your contribution and pretty big PR!

I looked at the code and ran the debug apk. As far as I understood, the idea is to add warmups as card alongside exercise card, right?

Let me propose this other idea inspired from other workouts apps: instead of adding warmups as "exercises", what about adding them as sets? I think they would be more intuitive for the user and simpler for us to implement.

Here's an image from another workout app to give a better view:

Let me know what do you think!

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.

2 participants