Skip to content

Fix SAC date format#273

Merged
ericgriffin merged 4 commits into
submersion-app:mainfrom
mgoodness:fix-sac-date-format
May 20, 2026
Merged

Fix SAC date format#273
ericgriffin merged 4 commits into
submersion-app:mainfrom
mgoodness:fix-sac-date-format

Conversation

@mgoodness
Copy link
Copy Markdown
Contributor

@mgoodness mgoodness commented Apr 29, 2026

  • feat(statistics): add date field to RankingItem class
  • fix(statistics): format best/worst SAC dates according to user preference

Summary

Closes #159

Changes

  • Add a date field to the RankingItem class & set it when retrieving best/worst SAC dives
  • Apply the UnitFormatter to best/worst SAC dives when building the gas statistics page

Test Plan

  • flutter test passes
  • flutter analyze passes
  • Manual testing on: MacOS

Screenshots

Screenshot 2026-04-29 at 15 13 17

Before:
Screenshot 2026-04-29 at 15 13 02
Screenshot 2026-04-29 at 15 12 39

After:
Screenshot 2026-04-29 at 15 04 22
Screenshot 2026-04-29 at 15 04 45

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...istics/presentation/pages/statistics_gas_page.dart 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@mgoodness
Copy link
Copy Markdown
Contributor Author

mgoodness commented May 7, 2026

Happy to have Claude generate additional test coverage (here and/or in my other PR) if that's desired. The Integration Test failure seems to have been a caching issue. I can try to address that in the workflow, too. I work with GH Actions for a living 😄.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the SAC “best/worst” record date display in the gas statistics page so it honors the user’s configured date format. It does so by passing the underlying DateTime through UnitFormatter.formatDate(...) instead of hardcoding day/month/year.

Changes:

  • Add a date field to RankingItem and populate it when fetching best/worst SAC record dives.
  • Update the gas statistics SAC record cards to format the record date via UnitFormatter.formatDate(...).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
lib/features/statistics/presentation/pages/statistics_gas_page.dart Uses UnitFormatter.formatDate(...) for best/worst SAC record subtitles.
lib/features/statistics/data/repositories/statistics_repository.dart Extends RankingItem with a date field and sets it when mapping SAC record query results.

@mgoodness mgoodness force-pushed the fix-sac-date-format branch from c97fbf9 to 05da8ab Compare May 15, 2026 00:58
Copy link
Copy Markdown
Member

@ericgriffin ericgriffin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@ericgriffin ericgriffin merged commit f5eb86c into submersion-app:main May 20, 2026
13 of 14 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Submersion Release Tracker May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Statistics - Air Consumption - SAC Rate Records - Date Format

3 participants