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 TitleBar back button implementation #548

Merged

Conversation

ksharma-xyz
Copy link
Owner

@ksharma-xyz ksharma-xyz commented Jan 18, 2025

TL;DR

Simplified title bar navigation by introducing a standardized back button component.

What changed?

  • Moved back button implementation from individual screens to the TitleBar component
  • Replaced navAction parameter with onNavActionClick callback in TitleBar
  • Created a reusable NavActionButton component with consistent styling and behavior
  • Removed redundant back button implementations from ServiceAlert, DateTimeSelector, Settings, ThemeSelection, and TimeTable screens

Why make this change?

  • Reduces code duplication across multiple screens
  • Ensures consistent back button behavior and appearance throughout the app
  • Improves maintainability by centralizing navigation UI logic
  • Simplifies screen implementations by abstracting navigation details

@ksharma-xyz ksharma-xyz changed the title Add reusable title bar navigation action button UI: Refactor TitleBar back button implementation Jan 18, 2025
@ksharma-xyz ksharma-xyz force-pushed the 01-18-add_reusable_title_bar_navigation_action_button branch from 0c88782 to d916a4c Compare January 19, 2025 01:53
@ksharma-xyz ksharma-xyz marked this pull request as ready for review January 19, 2025 01:53
@ksharma-xyz ksharma-xyz enabled auto-merge (squash) January 19, 2025 01:53
@ksharma-xyz ksharma-xyz merged commit 5c99cfc into main Jan 19, 2025
4 checks passed
@ksharma-xyz ksharma-xyz deleted the 01-18-add_reusable_title_bar_navigation_action_button branch January 19, 2025 02:04
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.

1 participant