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

UI: Refactor DateTime selection to use serialized model #401

Conversation

ksharma-xyz
Copy link
Owner

@ksharma-xyz ksharma-xyz commented Nov 30, 2024

TL;DR

Updated the date/time selector to pass structured data instead of formatted strings between screens.

What changed?

  • Modified DateTimeSelectorScreen to pass DateTimeSelectionItem objects instead of formatted strings
  • Added JSON serialization/deserialization support for DateTimeSelectionItem
  • Updated TimeTableScreen and TimeTableDestination to handle the new structured data format
  • Added a TODO for handling initial date/time data in the selector screen

How to test?

  1. Navigate to the time table screen
  2. Click on the date/time selector
  3. Select different dates and times
  4. Verify the selected date/time appears correctly on the time table screen
  5. Verify the selection persists after configuration changes

Why make this change?

Using structured data instead of formatted strings provides better type safety and flexibility in handling date/time selections. This change also makes it easier to modify the date/time display format without changing the underlying data structure.

Copy link
Owner Author

ksharma-xyz commented Nov 30, 2024

@ksharma-xyz ksharma-xyz changed the title Navigation: pass DateTimeSelectionItem object so it can be used for api calls or other decision making process UI: Refactor DateTime selection to use serialized model Nov 30, 2024
@ksharma-xyz ksharma-xyz marked this pull request as ready for review November 30, 2024 05:18
@ksharma-xyz ksharma-xyz merged commit 0f4a628 into main Nov 30, 2024
2 checks passed
Copy link
Owner Author

Merge activity

  • Nov 30, 12:27 AM EST: A user merged this pull request with Graphite.

@ksharma-xyz ksharma-xyz deleted the 11-30-navigation_pass_datetimeselectionitem_object_so_it_can_be_used_for_api_calls_or_other_decision_making_process branch November 30, 2024 05:27
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