Commit Graph

636 Commits

Author SHA1 Message Date
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
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
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
Roland Geider
92aee1228e Properly filter hidden widgets 🙄 2026-01-19 16:39:06 +01:00
Roland Geider
f5a591a3b7 Add trophies to configurable dashboard lists 2026-01-17 14:01:17 +01:00
Roland Geider
36bf6aa8fc Merge branch 'master' into feature/trophies
# Conflicts:
#	lib/main.dart
#	lib/screens/dashboard.dart
2026-01-17 13:50:18 +01:00
Roland Geider
b81331609a Also allow changing the order of the dashboard widgets
This makes the behaviour more consistent and allows users to remove widgets
they won't be using, like the trophies
2026-01-17 13:43:28 +01:00
Roland Geider
5574f74a2f Move dashboard visibility settings to own screen
This seems cleaner and can be opened from other places
2026-01-17 12:50:07 +01:00
Roland Geider
3664da4f78 Merge branch 'master' into fork/dhituval/issue852/hide-diet-plan 2026-01-16 23:06:11 +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
6620a83baa Improve html error detection
In case the header is not correctly set, try to detect html error messages
from the content itself
2026-01-14 14:59:07 +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
4782c72934 Recreate generated files 2026-01-13 16:26:17 +01:00
Roland Geider
cbdc4a0c56 Increase page size for languages, no need to use pagination for this
Categories and muscles will probably never get so big, but it doesn't do any
harm doing it as well.
2026-01-12 21:59:52 +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
536f18805b Load context data for PR trophies
This allows us to show for which sets the user achieved new PRs
2025-12-21 20:40:20 +01:00
Roland Geider
0774571fbc Fix test 2025-12-20 21:34:33 +01:00
Roland Geider
36a3e7ef4a Add overview page for the trophies 2025-12-20 21:25:18 +01:00
Roland Geider
9e4897f516 Add smoke test for DashboardTrophiesWidget 2025-12-20 19:40:49 +01:00
Roland Geider
b9fd061d33 Add dashboard widget and rework the provider 2025-12-20 02:06:08 +01:00
Roland Geider
5d39ae5088 Start adding support for trophies 2025-12-20 00:55:33 +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
40837ad1b3 Add tests 2025-12-18 11:31:58 +01:00
Roland Geider
d187324a25 Properly handle null values
Basically all the fields can be nullable, so we need to set them if
we want to avoid LateInitialisation errors.
2025-12-18 10:58:40 +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
Diya Hituvalli
fa00cad406 added test stubs 2025-12-08 15:13:21 -05: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