Skip to content
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

Flexible routines #682

Open
wants to merge 88 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
7db93f0
Start implementing new flexible routines
rolandgeider Oct 30, 2024
a79b6d6
Start implementing new flexible routines
rolandgeider Oct 30, 2024
9ff2bba
Load the new DayData entries and the regular data objects from struct…
rolandgeider Oct 30, 2024
abf9413
Start rendering the new routines
rolandgeider Nov 2, 2024
05b13d8
Further work on rendering the new routines
rolandgeider Nov 7, 2024
415daf1
Workaround for duplicate exercises in the DB
rolandgeider Nov 10, 2024
5c94737
Rename provider
rolandgeider Nov 10, 2024
12f22d2
Rename widget folder
rolandgeider Nov 10, 2024
47e36ef
More refactoring of routine screens and widgets
rolandgeider Nov 10, 2024
cd4a848
Remove the CustomScrollView
rolandgeider Nov 10, 2024
a35336f
Allow editing the fit in week toggle as well as start and end dates
rolandgeider Nov 12, 2024
1d93b2f
Refactor forms into individual files
rolandgeider Nov 12, 2024
9e9fa6b
Allow setting the day order per drag and drop
rolandgeider Nov 12, 2024
d76fcdc
Allow editing the currently selected day
rolandgeider Nov 12, 2024
4d4120c
Select newly created day for editing
rolandgeider Nov 12, 2024
bf73afd
Allow deleting days from a routine
rolandgeider Nov 12, 2024
056ed2b
Allow day objects to load slots
rolandgeider Nov 12, 2024
aa8c344
Allow reordering of slots
rolandgeider Nov 12, 2024
4b5ce9b
Remove reorderable from routine view widget
rolandgeider Nov 13, 2024
277628f
Merge branch 'master' into feature/flexible-routines
rolandgeider Nov 14, 2024
23119e6
Allow users to reorder the days and the slots within the days
rolandgeider Nov 15, 2024
04c6d6c
Save values to server
rolandgeider Nov 15, 2024
ffa87f6
Refactor update logic
rolandgeider Nov 16, 2024
c5f4eec
Extract exercise autocompleter to its own widget
rolandgeider Nov 16, 2024
e6e0ed3
Properly set or remove newly created objects
rolandgeider Nov 16, 2024
a4f334e
Allow deleting slots
rolandgeider Nov 16, 2024
f7461ab
Polish the crud workflow
rolandgeider Nov 16, 2024
7499033
Remove unused strings
rolandgeider Nov 16, 2024
8020bd2
More polish and i18n work
rolandgeider Nov 16, 2024
be28c27
Give feedback to the user when the form is being saved
rolandgeider Nov 16, 2024
aa6468e
Use a slider to select the number of sets
rolandgeider Nov 16, 2024
7794948
Cleanup
rolandgeider Nov 17, 2024
04e112d
Fix some widgets, polishing, renaming
rolandgeider Nov 20, 2024
f6bae10
Merge branch 'master' into feature/flexible-routines
rolandgeider Jan 5, 2025
ae4d223
WIP: Make gym mode display the exercises
rolandgeider Jan 5, 2025
ad5d1be
Pass the necessary IDs to the gym mode and load the rest of the data
rolandgeider Jan 5, 2025
b66aa74
Some polishing, adding missing fields and other QoL
rolandgeider Jan 5, 2025
ca6c682
Remove more unused code
rolandgeider Jan 5, 2025
1ad5948
Start implementing the expanded mode on the slot entry form
rolandgeider Jan 5, 2025
fde14c3
Merge branch 'master' into feature/flexible-routines
rolandgeider Jan 5, 2025
fd1ee42
fix: improve Gym Mode navigation and state persistence
Jackpkn Jan 6, 2025
5f89ab4
Add missing max fields to the slot entry form
rolandgeider Jan 6, 2025
4a60018
Fix tests
rolandgeider Jan 6, 2025
ede90b7
Remove unused code
rolandgeider Jan 6, 2025
462cc95
Fix test
rolandgeider Jan 6, 2025
d7094c3
Add target fields to workout log
rolandgeider Jan 6, 2025
b0e1da4
Some renaming for consistency
rolandgeider Jan 6, 2025
7aca931
Merge remote-tracking branch 'upstream/master' into fix/gym-mode-stat…
Jackpkn Jan 7, 2025
6bfcb3e
Round the value of the slider
rolandgeider Jan 7, 2025
6e7284e
Update the routine test data
rolandgeider Jan 7, 2025
6d97005
Update the routine test data
rolandgeider Jan 7, 2025
deaee53
Fix test
rolandgeider Jan 7, 2025
b421120
Also read max sets and mar rir from the API
rolandgeider Jan 8, 2025
5a39c6c
Rename some functions, a bit of cleanup
rolandgeider Jan 10, 2025
5d542c5
Use updated name of repetition in API response
rolandgeider Jan 14, 2025
abac774
Merge branch 'master' into feature/flexible-routines
rolandgeider Jan 18, 2025
392dc69
Merge branch 'fork/Jackpkn/fix/gym-mode-state-persistence-riverpod' i…
rolandgeider Jan 18, 2025
f5ab51f
Repetitions are not integers anymore
rolandgeider Jan 18, 2025
c397e10
Fix tests
rolandgeider Jan 18, 2025
9bb3567
Add day id to the gym state provider
rolandgeider Jan 18, 2025
9ab55a6
Save iteration and slot entry id to the logs
rolandgeider Jan 18, 2025
757eb4b
Almost everything is nullable in the Log
rolandgeider Jan 18, 2025
654fe61
Rename some more files
rolandgeider Jan 18, 2025
3a398d0
Simplify arguments for routine objects and add a smoke test
rolandgeider Jan 18, 2025
a770c97
Add smoke test for the routine edit form
rolandgeider Jan 21, 2025
eff176f
Merge branch 'master' into feature/flexible-routines
rolandgeider Jan 24, 2025
079db5d
Recreate generated files
rolandgeider Jan 24, 2025
1e94395
Replace day list
rolandgeider Jan 24, 2025
ce9c225
Don't break from the loop immediately
rolandgeider Jan 24, 2025
ffe5867
Add simple tests for SlotEntryForm
rolandgeider Jan 24, 2025
b4ff0b7
Some cleanup, renaming, reformating
rolandgeider Jan 24, 2025
4d55f8c
Add some more tests
rolandgeider Jan 24, 2025
4196157
Update goldens
rolandgeider Jan 24, 2025
58d6031
Merge branch 'master' into feature/flexible-routines
rolandgeider Jan 25, 2025
bc841d9
Merge remote-tracking branch 'origin/feature/flexible-routines' into …
rolandgeider Jan 25, 2025
9ea580a
Skip golden comparison when running on a non-linux platform
rolandgeider Jan 25, 2025
202349c
Make workout log charts work again
rolandgeider Jan 25, 2025
60c06b9
Update goldens
rolandgeider Jan 25, 2025
4b1dec2
Add some more tests
rolandgeider Jan 25, 2025
69ffdcf
Don't overflow the set representation
rolandgeider Jan 25, 2025
13998ec
Don't load the routine every time the log page are accessed
rolandgeider Jan 25, 2025
c093550
Load the session data from the new API as well
rolandgeider Jan 25, 2025
3c2e8fa
Merge remote-tracking branch 'origin/feature/flexible-routines' into …
rolandgeider Jan 25, 2025
123b45e
Update goldens
rolandgeider Jan 26, 2025
b4f8a59
Add the newly created session to the routine
rolandgeider Jan 26, 2025
6869dc9
Use logging package for debug messages in routines provider
rolandgeider Jan 26, 2025
51ed2ef
Format numeric log values
rolandgeider Jan 26, 2025
7c6fbeb
Show workout session information
rolandgeider Jan 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Almost everything is nullable in the Log
  • Loading branch information
rolandgeider committed Jan 18, 2025
commit 757eb4b27db0ab6e85a8648da49ab0f5afe09196
20 changes: 10 additions & 10 deletions lib/models/workouts/log.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ class Log {
late int routineId;

@JsonKey(required: true)
late int iteration;
int? iteration;

@JsonKey(required: true, name: 'slot_entry')
late int slotEntryId;
int? slotEntryId;

@JsonKey(required: false)
String? rir;
Expand All @@ -52,10 +52,10 @@ class Log {
String? rirTarget;

@JsonKey(required: true, fromJson: stringToNum, name: 'repetitions')
late num? repetitions;
num? repetitions;

@JsonKey(required: true, fromJson: stringToNum, name: 'repetitions_target')
late num? repetitionsTarget;
num? repetitionsTarget;

@JsonKey(required: true, name: 'repetitions_unit')
late int repetitionsUnitId;
Expand All @@ -64,10 +64,10 @@ class Log {
late RepetitionUnit repetitionsUnitObj;

@JsonKey(required: true, fromJson: stringToNum, toJson: numToString)
late num weight;
late num? weight;

@JsonKey(required: true, fromJson: stringToNum, toJson: numToString, name: 'weight_target')
late num? weightTarget;
num? weightTarget;

@JsonKey(required: true, name: 'weight_unit')
late int weightUnitId;
Expand All @@ -81,15 +81,15 @@ class Log {
Log({
this.id,
required this.exerciseId,
required this.iteration,
required this.slotEntryId,
this.iteration,
this.slotEntryId,
required this.routineId,
required this.repetitions,
this.repetitions,
this.repetitionsTarget,
required this.repetitionsUnitId,
required this.rir,
this.rirTarget,
required this.weight,
this.weight,
this.weightTarget,
required this.weightUnitId,
required this.date,
Expand Down
4 changes: 2 additions & 2 deletions lib/models/workouts/log.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading