Commit Graph

664 Commits

Author SHA1 Message Date
Roland Geider
2dbdf996e5 Replace the deprecated /api/v2/exercise/search endpoint
We can simply use the regular "exerciseinfo" endpoint, like we do for
ingredients. We still call fetchAndSetExercise for them, which is not
efficient, but
2026-04-14 13:40:26 +02:00
Roland Geider
bceae559f7 Merge branch 'master' into feature/version-2.5 2026-04-14 12:10:20 +02:00
Roland Geider
22af0ef9ff Show vegetarian and nutriscore badge in the ingredient autocompleter 2026-04-14 00:11:03 +02:00
Roland Geider
d343e5cdf9 Add missing nutriscore info to the ingredient model
Also, make the vegan and vegetarian flags nullable, since not all products
have this information at all
2026-04-14 00:10:27 +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
435a7c6f85 Cleanup 2026-04-13 18:02:30 +02: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
4b02ee54cd Make min server version tests more robust 2026-04-10 11:06:28 +02:00
Roland Geider
659b3da422 Updated goldens 2026-04-10 10:40:40 +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
bdc5e541e2 Merge branch 'feature/markdown-exercises' into feature/version-2.5 2026-04-10 10:35:34 +02:00
Roland Geider
301c2e42ce Merge branch 'feature/add-warmup-type' into feature/version-2.5
# Conflicts:
#	test/core/validators_test.mocks.dart
2026-04-10 10:35:10 +02:00
Roland Geider
fc214e31b9 Updated goldens 2026-04-10 10:29:45 +02:00
Roland Geider
094259ff0c Fix test 2026-04-10 10:26:13 +02:00
Roland Geider
9971acbe5f Use correct mock file 2026-04-10 10:12:28 +02:00
Roland Geider
6e76cf6d66 Merge branch 'master' into fork/sg172003/feature/measurement-datetime-field 2026-04-09 23:49:13 +02:00
Roland Geider
8a19e398b0 Add time information to test measurement entries, update tests 2026-04-09 23:45:57 +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
cb6c0f9804 Merge pull request #1139 from NiazSagor/fix-redundant-loading
Prevent Redundant Loading in `NutritionalPlanScreen`
2026-03-28 20:46:38 +01:00
Madhav
54a6db2e4b test(auth): stabilize API token happy-path assertion 2026-03-13 17:08:19 +05:30
darshAnup24
d780050a98 Merge branch 'wger-project:master' into feature/min-server-version-check 2026-03-12 22:42:57 +05:30
Madhav
6f34c05ccb Add minimum server version check during login
The app already checks a minimum app version from the server, but the
opposite wasn't true — an app could connect to an older server with a
different API without any warning.

This adds a MIN_SERVER_VERSION constant in the app that is checked
against the server version (already fetched in AuthProvider) during
both login() and tryAutoLogin(). If the server is too old, the user
is silently logged out and returned to the auth screen to connect to
a compatible server.

Includes unit tests for version string parsing (including Python-style
pre-release versions like '2.5.0a2').

Closes #<issue-number>
2026-03-11 23:19:32 +05:30
Roland Geider
937734e4c4 Merge branch 'fork/saraswathirajkumar18/enhancement/persist-ingredient-filters'
# Conflicts:
#	pubspec.lock
2026-03-11 15:39:58 +01:00
Roland Geider
885d88180b Refactor ingredient filter provider
No need to hard code the preferences in main
2026-03-11 15:39:38 +01:00
Saraswathi
7449d1fedb ProviderContainer.test used for automatic disposal in test 2026-03-08 20:22:07 +05:30
Roland Geider
25d2353cd2 Limit the number of logs sent when reporting issues to github
This was reaching the GET parameter length, see #2246
2026-03-08 13:09:58 +01:00
Saraswathi
b0af26a89d add test for IngredientFiltersNotifier to verify state and storage updates 2026-03-08 00:09:33 +05:30
NiazSagor
9d1169b99c Add regression test for loading indicator in nutritional plan screen
Took 58 minutes
2026-03-05 20:37:24 +06:00
Roland Geider
07604ab57d Add "warmup" to list of slot entry types
https://github.com/wger-project/wger/issues/2157
2026-03-02 20:18:32 +01:00
Roland Geider
ae89b5c6ea Commit generated files 2026-03-02 20:18:32 +01:00
Roland Geider
51b65664cb Refactor language handling when searching ingredients
While this has technically nothing to do with the vegan flags, we can refactor the
language handling while we're at it. This should make the behaviour more transparent
to the user and could be expanded in the future if needed (manually selecting other
languages, etc.).
2026-02-27 12:31:52 +01:00
Roland Geider
92a43c6ca7 Add vegan and vegetarian fields and filters to the ingredient 2026-02-26 23:07:13 +01:00
Roland Geider
ef649ad439 Merge pull request #1122 from alexisbirling-boop/improve-product-not-found-dialog
Improve product not found dialog
2026-02-24 21:14:08 +01:00
Roland Geider
dee6c12cea Fixed i18n
and added a max allowed weight as well (but this should probably be done everywhere)
2026-02-24 21:08:37 +01:00
alexisbirling-boop
1ba38b7cf4 Merge branch 'wger-project:master' into improve-product-not-found-dialog 2026-02-24 14:50:41 -05:00
Roland Geider
86ce2fc9d6 Split up the widgets in log_page.dart file 2026-02-20 11:58:47 +01:00
AlexisBirling3
bcbcd1a2dc apply dart format 2026-02-17 15:27:18 -05:00
AlexisBirling3
65a7e5dd43 adds the tests for the modified widget in this issue 2026-02-17 15:12:02 -05: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
88168dc352 Some polishing, add simple test 2026-02-08 14:54:26 +01:00
Roland Geider
c2f138cf9f Increase timeout durations for API requests 2026-01-30 13:50:35 +01:00
Roland Geider
f06a15ebac Convert the reps and weight log widgets back to stateful.
This solves some problems with the keyboard focus changing or the quick-add
buttons for reps and weight. Also, add some tests for these.
2026-01-29 17:43:31 +01:00