Skip to content

Updated TripView to Display day data when individual trip data for a … - #91

Merged
schmidtwmark merged 3 commits into
schmidtwmark:mainfrom
chetanjain2099:main
Jul 30, 2026
Merged

Updated TripView to Display day data when individual trip data for a …#91
schmidtwmark merged 3 commits into
schmidtwmark:mainfrom
chetanjain2099:main

Conversation

@chetanjain2099

Copy link
Copy Markdown
Contributor

Overview

Dual-mode period navigation system to TripDetailsView to better handle different regional API data structures.

Key Changes

  • Dual-Mode Navigation: Automatically detects if the data is EU-based (daily summaries) or Other (per-trip data) using the isDailySummaryData check.
    • EU Mode: Navigates week-by-week.
    • Other Mode: Navigates day-by-day.
  • Period Navigator UI: Added a sleek periodNavigatorView with left/right chevrons and a dynamic date label to show the current selected period.
  • Swipe Gestures: Implemented a DragGesture on the list so users can intuitively swipe left/right to move back and forth in time.
  • Chart Synchronization: The energy usage charts (both total and stacked breakdown) now react and animate cleanly when the selected period changes.

Testing

  • Verified swipe gestures update the periodOffset correctly.
  • Verified EU data filters correctly by week (Monday-Sunday).
  • Verified non-EU data filters correctly by day.
IMG_5097 IMG_5098

@chetanjain2099

chetanjain2099 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

Updated the code to work with the changes made to BetterBlueKit and added Inline daily trip details and true analytics for the day's details, based on information from individual trips. I'm not sure about the UI look; please make the changes.

IMG_5139

@schmidtwmark
schmidtwmark merged commit 4c0c8a4 into schmidtwmark:main Jul 30, 2026
1 check passed
schmidtwmark added a commit that referenced this pull request Jul 30, 2026
Follow-ups to the merged period-navigation work:

- Weekly vs per-trip mode now keys off the data model — the client's
  .info capability or all-zero summary durations — instead of checking
  whether every trip starts at exactly midnight, which a real 12:00 AM
  trip (or a timezone shift) could flip.
- The back chevron stops at the earliest fetched trip instead of paging
  into empty weeks forever.
- Replaced the 467-line commented-out preview block (stale pre-rename
  API, leftover swipe gesture) with live previews that reuse the real
  TripDetailRow, including an EU day-summary row with drill-down pills.
- TripInfoPillView formatted distances with the user's preferred unit as
  the SOURCE unit, printing EU km values under a mi label; format from
  the trip's own units.
- Drill-down speed conversion goes through Distance.Units instead of a
  hardcoded 0.621371 and an abbreviation string compare.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

2 participants