Skip to content

Units selection#558

Draft
codebymini wants to merge 2 commits intodevfrom
units-selection
Draft

Units selection#558
codebymini wants to merge 2 commits intodevfrom
units-selection

Conversation

@codebymini
Copy link
Collaborator

Summary

This PR centralizes glucose unit and metric preferences, adds a reusable units onboarding flow, and updates stats and setup screens to use the new configuration model. It also documents commit message conventions in the README.

What changed

  • Added a centralized UnitSettingsStore for glucose units and metric display preferences
  • Introduced reusable units configuration UI and a dedicated onboarding screen
  • Updated Nightscout and Dexcom setup flows to support units onboarding
  • Updated stats views and formatters to use the new unit and metric settings
  • Added support for exporting the new unit and metric preferences
  • Documented commit message guidelines and best practices in the README
Screenshot 2026-03-20 at 14 32 35 Screenshot 2026-03-20 at 14 32 56 Screenshot 2026-03-20 at 14 33 03

- Introduced UnitSettingsStore to centralize unit and metric settings management.
- Added new enums for glucose display units, time in range modes, glycemic metrics, and variability metrics.
- Updated StatsData to calculate and store coefficient of variation.
- Refactored Localizer to utilize UnitSettingsStore for unit conversions and formatting.
- Enhanced Nightscout and Dexcom settings views to support unit configuration and onboarding.
- Created UnitsConfigurationView for reusable unit and metric settings.
- Updated AggregatedStatsView and SimpleStatsViewModel to reflect new unit settings.
- Modified TIRView and its ViewModel to use UnitSettingsStore for thresholds and display.
- Removed legacy storage references for unit settings in favor of the new centralized approach.
- Added export functionality for new unit and metric settings in Nightscout settings.
@codebymini codebymini marked this pull request as draft March 20, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant