Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort RouteList by create_time and handle "timeless" routes gracefully #138

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

coding-jaguar
Copy link

@coding-jaguar coding-jaguar commented Jan 21, 2025

Pull Request: Sort RouteList by create_time and Handle "Timeless" Routes Gracefully (Fixes #60)

Problem

With OpenPilot 0.9.7 removing RTC support, some routes lack time data This required:

  1. Showing "timeless" routes in the correct sequence using create_time.
  2. Hiding date/time for "timeless" routes to avoid invalid displays.

Solution

  1. Sort: Updated RouteList to display routes in descending order of create_time.
  2. UI Updates: For "timeless" routes:
    • Hid Date/Time: No valid time available.
    • Hid Duration & Engaged %: These rely on timing data, which is invalid for "timeless" routes.

Testing

  • Verified routes are ordered by create_time (newest first).
  • Confirmed "timeless" routes render correctly without date/time, duration, or engaged percentage.
  • Ensured all other routes display full details.

Feedback

  • Hiding duration and engaged percentage for "timeless" routes was an additional decision to ensure consistency. Feedback welcome on this approach.

Fixes

Closes #60.
proof

Copy link

github-actions bot commented Jan 21, 2025

deployed preview: https://138.connect-d5y.pages.dev

Welcome to new-connect! Make sure to:

  • read the contributing guidelines
  • mark your PR as a draft until it's ready to review
  • post the preview on Discord; feedback from users will speedup the PR review

Mobile

Desktop

@coding-jaguar coding-jaguar marked this pull request as draft January 22, 2025 14:04
@incognitojam incognitojam added the enhancement New feature or request label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle routes with no time
2 participants