Commit Graph

75 Commits

Author SHA1 Message Date
Roland Geider
7e7b441faa Properly handle localized inputs in further forms 2026-05-20 21:36:49 +02:00
Roland Geider
c93f03fa0b Replace pumpAndSettle with pump where possible 2026-05-07 12:27:33 +02:00
Roland Geider
164d553fde Improve the exercise search autocompleter
Closes #1182
Co-authored-by: Pankaj Basnet <165250380+pankaj-basnet@users.noreply.github.com>
2026-05-03 17:54:07 +02:00
Roland Geider
bceae559f7 Merge branch 'master' into feature/version-2.5 2026-04-14 12:10:20 +02:00
Roland Geider
10a28ac479 Merge pull request #1175 from efrahim20319/fix/1149-log-missing-unit-defaults
fix: use unit IDs directly in Log.fromSetConfigData to prevent null on save
2026-04-13 19:57:49 +02:00
Nsimba Tamaku
fd8545f997 fix: use unit IDs directly in Log.fromSetConfigData to prevent null on save
When adding an extra exercise during a workout, addExerciseAfterPage()
creates a SetConfigData with no unit objects loaded. Log.fromSetConfigData
was using the weightUnit/repetitionUnit setters which overwrite the default
IDs with null when the objects are null, causing the server to reject the
request with a ValidationError ("Repetitions unit must be present").

Fixes #1149

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 17:10:59 +01:00
Roland Geider
44af2ecaf2 Merge branch 'feature/exercise-variations' into feature/version-2.5
# Conflicts:
#	lib/models/exercises/exercise_submission.dart
#	lib/providers/add_exercise.dart
2026-04-13 16:37:07 +02:00
Roland Geider
0c5d9b83b6 Commit missing mock file 2026-04-13 16:32:08 +02:00
Roland Geider
40dbe842cd Move the variation to a field in the exercise 2026-04-13 12:58:17 +02:00
Roland Geider
9f41695e65 Merge branch 'feature/nutrition-units' into feature/version-2.5
# Conflicts:
#	test/nutrition/goldens/nutritional_plan_2_one_meal_with_ingredients.png
#	test/nutrition/goldens/nutritional_plan_3_both_meals_with_ingredients.png
2026-04-10 10:38:31 +02:00
Roland Geider
fc214e31b9 Updated goldens 2026-04-10 10:29:45 +02:00
Roland Geider
9971acbe5f Use correct mock file 2026-04-10 10:12:28 +02:00
Roland Geider
e9661f585b Updated goldens 2026-04-09 12:51:45 +02:00
Roland Geider
ed8203de09 Expose units in the nutritional plan 2026-03-31 11:46:38 +02:00
Roland Geider
fee01c6163 Fix screenshot tests 2026-03-30 00:04:32 +02:00
Roland Geider
85b261fad7 Group slots in the UI with the same exercise
This allows the user to add different slots (sets) to an exercise, like
10 x 10kg, 8 x 12kg, 6 x 15kg. Also note that this is purely a UI change,
as it was already possible to simply add the same exercise again.
2026-03-29 20:46:13 +02:00
Roland Geider
ae89b5c6ea Commit generated files 2026-03-02 20:18:32 +01:00
Roland Geider
86ce2fc9d6 Split up the widgets in log_page.dart file 2026-02-20 11:58:47 +01:00
Roland Geider
8f34306eea Rename test 2026-02-11 13:37:33 +01:00
Roland Geider
54c6ce0175 Refactor the log entry form in the gym mode.
Previously due to rebuilds the form would e.g. not stay open after
selecting a new unit (which would also not change)
2026-02-11 13:37:33 +01:00
Roland Geider
a367678b91 Properly filter dayData entries
This is needed when the "needs logs to advance" toggle is active

See https://github.com/wger-project/wger/issues/2164
2026-02-09 22:49:30 +01:00
Roland Geider
c2f138cf9f Increase timeout durations for API requests 2026-01-30 13:50:35 +01:00
Roland Geider
ec153c51df i18n and other cleanup 2026-01-16 17:33:28 +01:00
Roland Geider
dce1b79683 Merge branch 'master' into feature/trophies
# Conflicts:
#	lib/providers/base_provider.dart
#	lib/providers/gym_state.dart
#	lib/providers/gym_state.g.dart
#	lib/widgets/routines/gym_mode/log_page.dart
#	test/core/settings_test.mocks.dart
#	test/exercises/contribute_exercise_image_test.mocks.dart
#	test/gallery/gallery_form_test.mocks.dart
#	test/gallery/gallery_screen_test.mocks.dart
#	test/measurements/measurement_provider_test.mocks.dart
#	test/nutrition/nutritional_plan_screen_test.mocks.dart
#	test/nutrition/nutritional_plans_screen_test.mocks.dart
#	test/routine/gym_mode/gym_mode_test.mocks.dart
#	test/routine/routine_screen_test.mocks.dart
#	test/routine/routines_provider_test.mocks.dart
#	test/routine/routines_screen_test.mocks.dart
#	test/user/provider_test.mocks.dart
#	test/weight/weight_provider_test.mocks.dart
#	test/widgets/routines/gym_mode/log_page_test.dart
2026-01-16 16:54:08 +01:00
Roland Geider
46fdf1efc7 Recreate generated files 2026-01-16 15:28:09 +01:00
Roland Geider
574ef3d0b5 Add simple retry logic to the base provider's fetch method
This should take care of simple transient errors, or other network hiccups
that might happen on the user's device.
2026-01-14 13:59:41 +01:00
Roland Geider
fb6a673503 Simplify code by adding new log provider
This makes the logic for copying or modifying the logs much easier. Also,
there were some user reports that the old logic sometimes behaved erratically
and old values were sometimes reverted.
2026-01-12 21:40:11 +01:00
Roland Geider
352a4b1c49 Also show the PR trophies in the regular log page 2026-01-10 16:40:58 +01:00
Roland Geider
52892db9b1 Allow passing the language to the fetch request
This allows us to use the trophy translations from the server.
2025-12-23 15:41:47 +01:00
Roland Geider
6a2158a397 Reload the session page in the gym mode
This makes sure that we have the current state and don't try to create a new session
which already exists
2025-12-18 11:59:26 +01:00
Roland Geider
077dcaf742 Handle HTML errors in WgerHttpException
These need to be handled separately when the server encounters an error and
returns HTML instead of JSON.
2025-12-17 18:59:45 +01:00
ImgBotApp
42be34f140 [ImgBot] Optimize images
*Total -- 90.75kb -> 59.89kb (34.01%)

/test/routine/gym_mode/goldens/gym_mode_progression_tab.png -- 6.36kb -> 1.90kb (70.06%)
/test/routine/goldens/routine_screen_detail.png -- 8.94kb -> 3.60kb (59.67%)
/test/nutrition/goldens/nutritional_plan_3_both_meals_with_ingredients.png -- 20.49kb -> 14.45kb (29.47%)
/test/nutrition/goldens/nutritional_plan_1_default_view.png -- 20.49kb -> 14.65kb (28.51%)
/test/nutrition/goldens/nutritional_plan_2_one_meal_with_ingredients.png -- 19.32kb -> 14.04kb (27.34%)
/test/routine/goldens/routine_logs_screen_detail.png -- 15.16kb -> 11.24kb (25.83%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
2025-12-04 11:27:16 +00:00
Roland Geider
06b32a2bd9 Better volume calculations, other cleanup 2025-12-04 12:14:57 +01:00
Roland Geider
02896013ba Updated goldens 2025-12-02 16:30:05 +00:00
Roland Geider
910e662243 Correctly show exercise overviews for supersets 2025-12-02 17:21:12 +01:00
Roland Geider
56cdffb010 Merge branch 'master' into feature/gym-mode
# Conflicts:
#	integration_test/3_gym_mode.dart
#	ios/Podfile.lock
#	lib/screens/gym_mode.dart
#	pubspec.yaml
2025-12-02 12:35:32 +01:00
Roland Geider
b01a0fe1f7 Updated goldens 2025-12-01 13:14:22 +00:00
Roland Geider
aeb01a517b Refactor widgets used in logs
We should try to reuse as many as possible in the end-of-gym-mode logs and in
the routine log page
2025-11-27 15:08:06 +01:00
Roland Geider
ecd0b6c6b4 Add overview page when a workout has been completed 2025-11-26 20:17:02 +01:00
Roland Geider
5f61af3b66 Update generated files 2025-11-20 23:01:20 +01:00
Roland Geider
3119429a02 Cleanup, tests, etc 2025-11-17 14:36:47 +01:00
Roland Geider
02a0f89807 update goldens 2025-11-16 18:34:13 +00:00
Roland Geider
8818bf3a5f Simplify test and add tag 2025-11-16 18:48:02 +01:00
Roland Geider
8aa0dea540 Fix tests 2025-11-16 17:17:14 +01:00
Roland Geider
a072692ddd Add smoke and golden test for gym progression tab 2025-11-15 18:40:43 +01:00
Roland Geider
a4909bd99c Rename some tests 2025-11-15 18:20:22 +01:00
Roland Geider
3273415cbd Fix test and move the files around a bit
The tests should mirror the structure of the regular application
2025-11-15 17:38:22 +01:00
Roland Geider
ec8578d43d Add some tests and fix a small bug in uuid handling 2025-11-15 15:59:24 +01:00
Roland Geider
f1f37d3e03 Allow swapping exercises in the gym mode 2025-11-15 01:32:59 +01:00
Roland Geider
66b18b6b3c Further refactoring the gym mode 2025-11-14 14:41:25 +01:00