Commit Graph

198 Commits

Author SHA1 Message Date
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
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
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
559eb26631 Make the app work better on wider screens 2025-12-01 13:44:25 +01:00
Roland Geider
142799d870 Fix localization 2025-11-27 13:28:20 +01:00
Roland Geider
ecd0b6c6b4 Add overview page when a workout has been completed 2025-11-26 20:17:02 +01:00
Roland Geider
9f66815e10 Merge branch 'master' into feature/gym-mode
# Conflicts:
#	lib/widgets/routines/gym_mode/navigation.dart
#	pubspec.lock
#	test/exercises/contribute_exercise_image_test.mocks.dart
#	test/exercises/contribute_exercise_test.mocks.dart
#	test/nutrition/nutritional_meal_form_test.mocks.dart
#	test/nutrition/nutritional_plan_form_test.mocks.dart
2025-11-19 19:18:45 +01:00
Roland Geider
fc881c4929 Properly handle timezones
This should (hopefully 🤞) take care of problems saving entries with timezone
information.
2025-11-18 16:30:52 +01:00
Roland Geider
742d8dac88 Properly render the current progression of the workout 2025-11-14 21:39:53 +01:00
Roland Geider
93a11a16e4 Recreate generated files and reformat the repo
Seems the default dart formatting rules changed recently, and this was causing
huge diffs in branches
2025-10-09 17:39:02 +02:00
Roland Geider
8199205b02 Don't dump all the debug info to the error reporting 2025-10-08 14:42:58 +02:00
Roland Geider
c63057fe35 Reuse AddExerciseTextArea in the image form 2025-10-08 14:05:50 +02:00
Roland Geider
0add2a6bd1 Extract url validator to its own file 2025-10-08 14:03:25 +02:00
Roland Geider
1a78011a7d Refactor image handling in the exercise submission process
Now the images are kept in a single list, instead of having two for
the files themselves and the metadata.
2025-10-08 12:45:37 +02:00
Roland Geider
960abc9bec Merge branch 'master' into feature/exercise-submission 2025-09-28 14:38:22 +02:00
Roland Geider
84c29eb209 Use the regular ingredient endpoint, instead of the special search one 2025-09-24 01:35:03 +02:00
Roland Geider
a7ee4ff5b3 Merge pull request #855 from wger-project/nutrition-plan-stats
Nutrition plan stats
2025-09-22 16:19:04 +02:00
Roland Geider
9ea8362d20 Show an overview with the new exercise data before saving
Also, correctly parse all validation errors that might be returned by the server
2025-09-19 16:59:18 +02:00
Roland Geider
711d7c0aba Update exercise submission model and related files
This now uses the combined endpoint, which creates the different objects
itself within a transaction, ensuring that no orphans can be created.
2025-09-18 21:57:27 +02:00
Roland Geider
4c34f91028 Merge pull request #905 from wger-project/feature/better-logging
Save the application logs locally
2025-09-16 15:21:51 +02:00
Roland Geider
9b3957fe35 Use "clock" for mocking dates and datetimes
This should make the tests a bit more robust, specially in CI since these
tended to fail depending on how long and when the tests run. Also, rework
a bit the way the start and end dates in sessions were being handled and
initialised
2025-09-16 14:45:16 +02:00
Roland Geider
d9b4d66c0f Add tests for interpolation logic 2025-09-12 15:03:33 +02:00
Roland Geider
0fd2af030d Merge branch 'refs/heads/master' into nutrition-plan-stats 2025-09-12 14:05:38 +02:00
Roland Geider
8574bcad19 Allow the error widget to scroll for longer error messages 2025-09-07 15:25:50 +02:00
Roland Geider
5a4d4c7208 Save the application logs
This allows us to show the logs to the user and also send them along with any
bug reports. This is a simple system that just keeps the last entries in memory
and nothing is stored permanently, but that's ok for our use case and can be
changed in the future if the need arises.
2025-09-06 22:08:35 +02:00
Roland Geider
c89ccb630c Use max pagination size when loading data
This is a workaround for #867, but not a real solution
2025-09-06 00:50:00 +02:00
Roland Geider
4dff6ea2b1 Fix import so that "isSameDayAs" becomes available again 2025-09-04 14:36:50 +02:00
Roland Geider
0f44e0b25f Refactor the general error popup
This should make it clearer where the messages and titles come from
2025-09-04 14:34:52 +02:00
Roland Geider
ac043baa68 Merge branch 'master' into nutrition-plan-stats
# Conflicts:
#	lib/models/nutrition/nutritional_plan.g.dart
#	lib/widgets/measurements/charts.dart
#	lib/widgets/measurements/entries.dart
#	lib/widgets/weight/weight_overview.dart
2025-09-03 15:25:17 +02:00
Roland Geider
1dc3776e7e Improve video error handling
Users now see a smaller error message in the exercise description, instead
of the big general popup.
2025-09-02 14:49:28 +02:00
Roland Geider
99580490d3 Fix typo
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-28 22:25:11 +02:00
Roland Geider
92295c54b8 Merge branch 'master' into fix/timezone-problems 2025-08-28 22:19:31 +02:00
Dieter Plaetinck
d4a272ce8c use interpolation for higher accuracy
used on:
* overall delta's in the NP list
* the NP and last30day charts (and their overall delta's)

We display them on the respective charts to make it
more consistent, but in this case, we add a small tooltip indicator to
avoid user confusion
2025-06-28 21:52:23 +02:00
Roland Geider
8ae889a1ea Improve decimal input handling
We now use TextInputType.numberWithOptions(decimal: true) which seems to have
a more consistent behaviour under android and iOS. Also, we now use NumberFormat
to parse the inputs according to the user's locale.
2025-06-27 13:24:53 +02:00
Roland Geider
70fba34f0c Better handling of time zones
We now send the current time zone to the server when serializing datetime objects.
This was causing entries to be saved some hours wrong or depending on the time, on
a different day.
2025-05-26 11:13:53 +02:00
Roland Geider
cce0b94edc Cleanup 2025-05-23 18:44:29 +02:00
Roland Geider
0d36fe4bc3 Polish the add plate widget 2025-05-23 17:41:08 +02:00
Roland Geider
ac13381bcf Some refactoring 2025-05-23 11:06:37 +02:00
Roland Geider
9934209b7c Merge branch 'master' into fork/AyushJagaty/plate-46-calc
# Conflicts:
#	AUTHORS.md
#	ios/Podfile.lock
#	lib/main.dart
#	lib/providers/user.dart
#	lib/widgets/workouts/gym_mode.dart
#	test/nutrition/goldens/nutritional_plan_1_default_view.png
#	test/nutrition/goldens/nutritional_plan_2_one_meal_with_ingredients.png
#	test/nutrition/goldens/nutritional_plan_3_both_meals_with_ingredients.png
#	test/routine/gym_mode_screen_test.dart
2025-05-22 15:27:39 +02:00
Roland Geider
e5427dc103 Merge branch 'master' into fork/Shininess8816/calendarFix
# Conflicts:
#	lib/helpers/consts.dart
2025-05-22 14:35:32 +02:00
Roland Geider
f18af2ed65 Move milliseconds factor to a constant
This makes it less likely to run into weird bugs if we need to tweak
the value in the future.
2025-05-22 14:34:36 +02:00
burny0202
2ade2013dc Interval of 1000 hard crashes, and 1000000 does not. Changing to last date also stops it hitting the 0 difference. Removed unused currentDate #788 2025-05-18 10:36:24 +01:00
Roland Geider
c2608af569 Don't throw an exception for untranslated strings
These are "dynamic" translations that come from the server. If they are not known
locally, we should just show them to the user as-is.
2025-05-16 15:16:22 +02:00
Roland Geider
2c6ecc0b92 Add resistance band to list of equipment 2025-05-14 17:15:31 +02:00
Roland Geider
116888d824 Also add link to exercise submission screen 2025-05-11 17:00:17 +02:00
Roland Geider
f091694b47 Extract common urls to consts.dart 2025-05-09 22:37:06 +02:00
Roland Geider
f8000a5454 Catch and handle WgerHttpException specially
This shows the server errors directly in the form, instead of a modal dialog
(which is the default for all the other forms and places that throw the exception)
2025-05-09 13:54:58 +02:00
Roland Geider
013721ba71 Refactor WgerHttpException
We can now use a widget to show any errors returned by WgerHttpException. This has
to be added on a form-by-form basis, otherwise, the general error handling shows
the results in a modal dialog
2025-05-08 22:06:48 +02:00
Roland Geider
7e0910b56b Handle network connectivity a bit different
When the server is not reachable, we show a slightly different error message
and remove the option to automatically create an issue.
2025-05-08 15:07:12 +02:00
Roland Geider
5e22d69bb1 Improve error handling and logging
Now we process and catch all errors that might happen in the application, instead
of silently ignoring them. These errors are shown in a better error dialog, that
shows the details to the user and allows to create an issue on GitHub with the
error and traceback data already filled in.
2025-05-07 18:19:15 +02:00