Commit Graph

34 Commits

Author SHA1 Message Date
Roland Geider
ba16a84de8 Rework the ingredient form
This makes it more user-friendly and doesn't completely break down when
ingredients had longer named units

Closes #1390
2026-10-24 17:09:43 +02:00
Roland Geider
554a54e31b Finish the material_ui migration 2026-09-26 22:38:40 +02:00
Roland Geider
2d9b8cadb6 Reorder imports
dart fix --apply --code=directives_ordering
2026-09-03 20:42:06 +02:00
pankaj-basnet
f7930ce68b fix: remove material_ui imports where not needed 2026-09-01 21:12:14 +05:45
pankaj-basnet
fee0079dc9 material ui: post-flutter-3.47 imports, dart fix applied 2026-09-01 21:08:51 +05:45
Roland Geider
b76f6a1c8a Split up the measurement chart layer 2026-08-25 14:18:25 +02:00
Roland Geider
185e5341ba Merge remote-tracking branch 'origin/master' into feature/release-2.7 2026-08-21 22:37:02 +02:00
Roland Geider
2c26c93d68 Merge remote-tracking branch 'origin/master' into fix/build-phase-ui-side-effects 2026-08-21 18:01:56 +02:00
Roland Geider
34b9b97081 Allow disabling the average and the trend lines 2026-08-20 18:56:51 +02:00
Ben Tucker
fe33f693a8 fix(core): make UI side effects and provider reads safe during build
Errors handled while the widget tree is building crashed or wedged the
app in three related ways:

- FlutterError.onError showed dialogs and snackbars synchronously.
  Pushing a route mid-build trips the navigator's !_debugLocked
  assertion, and because the one-dialog guard was set before showDialog
  threw, its release never attached: every later error dialog was then
  silently suppressed while nothing was on screen, leaving a blank,
  unresponsive app until restart. Snackbars crashed outright via the
  messenger's setState.
- The sync status and barcode dialogs did ref.read inside their route
  builders, which run during build. With the provider chain dirty (any
  token refresh dirties wgerBase -> auth), the read flushed it there and
  Riverpod scheduled a scope refresh mid-build. The barcode builder also
  created its search future inline, re-firing the search on every dialog
  rebuild.
- Provider create bodies that widgets watch during build read providers
  synchronously: the dashboard's routine hydration chain crashed on cold
  start right after a token refresh, and TrophyStateNotifier.build()
  has the same shape in the post-login window, where invalidation order
  left networkStatusProvider dirty while its dependents rebuilt.

lib/core/build_safety.dart adds the two idioms as helpers: runAfterFrame
defers UI side effects past the build phase, yieldPastBuild yields
provider create bodies past their synchronous phase (a microtask, not a
timer, since widget tests assert !timersPending at teardown). The error
dialog guard is released when the context is gone or the push fails, the
snackbar helpers re-resolve the messenger inside the callback, the
dialog builders snapshot their providers in the tap handler, and
post-login invalidation runs leaf-first. Regression tests cover each
shape.
2026-08-16 17:29:43 -05:00
Roland Geider
2374e1b0ba Replace flutter_svg_icons with a local SvgIcon widget 2026-08-15 21:52:07 +02:00
Roland Geider
3b54903fea Keep global symbols when stripping the Apple release builds
Closes #1315 (more like a workaround)
2026-08-13 19:32:15 +02:00
Roland Geider
3c4cc4e770 Move the chart maths out of the widgets
These changes mirror the structure in the react app
2026-08-07 11:12:46 +02:00
Roland Geider
473ffbe235 Drop entries from the measurement category model 2026-08-06 22:09:38 +02:00
Roland Geider
a0fddd62c9 Tidy up the measurement and health helpers 2026-08-06 21:11:09 +02:00
Roland Geider
82be49c8a0 Add per-category chart settings (trend, average window) 2026-08-05 21:29:31 +02:00
Roland Geider
e68bde2c9c Merge branch 'master' into feature/health-sync
# Conflicts:
#	lib/main.dart
#	macos/Flutter/GeneratedPluginRegistrant.swift
#	test/features/account/widgets/settings_test.dart
2026-08-04 13:59:53 +02:00
Roland Geider
1af9471ef4 Replace more hard coded colors with theme generated ones 2026-08-04 11:41:17 +02:00
Roland Geider
2c63aa0e21 Replace more hard coded colors with theme generated ones 2026-08-04 11:35:32 +02:00
Roland Geider
07aa325ec5 Generate chart colors from the scheme instead of a fixed palette 2026-08-04 11:24:10 +02:00
Roland Geider
33750a19b1 Paint the macro gauges in the theme's primary color 2026-08-04 00:20:21 +02:00
Roland Geider
6cabbebb1b Move the body weight provider next to the measurements 2026-08-02 19:24:07 +02:00
Roland Geider
d2ad8e9ef4 Remove unused strings 2026-07-31 20:23:18 +02:00
Roland Geider
458b3d5be4 Show the weight development on the nutrition plan detail screen 2026-07-31 18:39:18 +02:00
Roland Geider
9561f95696 Show the daily range of aggregated measurements as a band 2026-07-31 16:14:15 +02:00
Roland Geider
6d0352a42c Track the entry unit in extra_data and convert on display 2026-07-30 18:54:13 +02:00
Roland Geider
b86c1e7e0e Store body weight in the official measurements category 2026-07-30 17:28:01 +02:00
Roland Geider
fb43a9fdd2 Allow setting the meal when logging individual ingredients 2026-07-30 12:30:02 +02:00
Roland Geider
290b991311 Consolidate snackbar calls code into a helper 2026-07-01 22:46:26 +02:00
Roland Geider
0d198745ec Consolidate formatting code into a helper 2026-07-01 22:37:37 +02:00
Roland Geider
434ec11fed Localize the date-range form validators
The translations were taken from the react repo
2026-07-01 22:30:30 +02:00
Roland Geider
60c9f67282 Move shared infra to lib/core/ 2026-07-01 20:28:06 +02:00
Roland Geider
a46bd22025 Move account feature to lib/features/account/ 2026-07-01 18:28:10 +02:00
Roland Geider
33fbe279ca Move nutrition feature to lib/features/nutrition/ 2026-07-01 17:57:49 +02:00