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: Split DateTime selector into separate components #396

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

ksharma-xyz
Copy link
Owner

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

TL;DR

Split the DateTimeSelector component into separate files and enhanced the DateTimeSelectorScreen with improved functionality.

What changed?

  • Separated DateTimeSelector into individual component files:
    • IconButton.kt
    • RadioButton.kt
    • TimePicker.kt
  • Added onDateTimeSelected callback to DateTimeSelectorScreen
  • Enhanced SelectedDateTimeRow with proper spacing and text formatting
  • Added dateTimeText parameter to display selected date and time
  • Improved layout and padding in DateTimeSelectorScreen

How to test?

  1. Navigate to the DateTimeSelectorScreen
  2. Verify the time picker displays the current time
  3. Test the Reset functionality in SelectedDateTimeRow
  4. Confirm the date/time text displays correctly
  5. Verify proper spacing and layout of all components

Why make this change?

This refactoring improves code organization by separating concerns into individual files, making the codebase more maintainable and easier to test. The enhanced functionality in DateTimeSelectorScreen provides better user feedback and interaction options.

Copy link
Owner Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ksharma-xyz ksharma-xyz changed the title Refactor components into separate files UI: Split DateTime selector into separate components Nov 29, 2024
@ksharma-xyz ksharma-xyz marked this pull request as ready for review November 29, 2024 11:03
Copy link
Owner Author

ksharma-xyz commented Nov 29, 2024

Merge activity

  • Nov 29, 6:03 AM EST: A user started a stack merge that includes this pull request via Graphite.
  • Nov 29, 6:03 AM EST: A user merged this pull request with Graphite.

@ksharma-xyz ksharma-xyz merged commit cfb671b into main Nov 29, 2024
2 checks passed
@ksharma-xyz ksharma-xyz deleted the 11-29-refactor_components_into_separate_files branch November 29, 2024 11:03
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