Design branch - #19
Merged
Merged
Conversation
Aredarn
commented
Aug 11, 2026
Owner
- Added better visuals
- Added back buttons
…d enhanced haptic feedback.
This commit refactors multiple screens to use a unified `ScreenScaffold` and `pressable` interaction model, replacing standard clickables with scaled, haptic-enabled components. It also includes UI refinements for list views and telemetric displays.
**Key Changes:**
* **Global UI Components:**
* Replaced `Modifier.clickable` with a custom `.pressable()` modifier across most screens (`TrackScreen`, `TrackListView`, `TimeAttackListView`, `DragScreen`, etc.) to provide consistent scaling and haptic feedback.
* Introduced `ScreenScaffold` to handle top bar integration and scroll-aware chrome transitions (`isScrolledUnderChrome`).
* Integrated `DraggableSheet` in `LapDetailScreen` for stats and lap picking, replacing standard `AnimatedVisibility` blocks.
* **Haptics & Motion:**
* Added specific haptic triggers for session events, confirmations (e.g., saving a track, deleting a vehicle), and selection changes.
* Updated the speedometer animation in `ESPConnectionTestScreen` to use a spring-based `Motion.standard()` for smoother transitions.
* **UI Refinements:**
* **Typography:** Introduced the `.atSize(sp)` extension for `TrackProType` to simplify font size overrides.
* **Track & Vehicle Lists:** Updated `TrackCard` and `VehicleCard` with improved layouts, delete button hit targets, and confirmed delete haptics.
* **Telemetric Screens:** Improved layout spacing and font scaling in `DragScreen` and `TimeAttackScreen` for better readability at high speeds.
* **Settings & Creator Screens:** Wrapped `SettingsScreen` and `CarCreatorScreen` in `ScreenScaffold` and fixed padding/scroll behaviors.
* **Technical Updates:**
* Downgraded `bytecodeTargetLevel` and `languageLevel` from 21 to 17 in `.idea` configuration files.
This commit integrates back navigation functionality by adding `onBack` callbacks to various screen composables and updating the `MainActivity` navigation graph to handle these interactions.
**Key Changes:**
* **Navigation Updates (`MainActivity.kt`):**
* Updated `composable` routes for `drag`, `esptest`, `track/{trackId}`, `vehicle/{vehicleid}`, `createvehicle`, and `timeattack` to pass `navController.popBackStack()` via the new `onBack` parameter.
* **List View Screens:**
* **`CarListView.kt`**, **`DragTimesList.kt`**, **`TimeAttackListView.kt`**, and **`TrackListView.kt`**: Added `onBack` lambda to `ScreenScaffold` to enable back navigation from these list views.
* **`CarViewScreen.kt`** & **`TimeAttackListItem.kt`**: Updated to accept and trigger an `onBack` callback, ensuring individual item detail views can return to the previous screen.
* **Telemetric & Functional Screens:**
* **`DragScreen.kt`** & **`TimeAttackScreen.kt`**: Updated `DragRaceScreen` and `TimeAttackScreenView` (including its portrait and landscape layouts) to support the `onBack` action within the `AppTopBar`.
* **`TrackScreen.kt`**: Modified `TrackScreen` and `TrackView` to propagate the `onBack` event to the top bar.
* **`ESPConnectionTestScreen.kt`**: Added back navigation support to the connection test utility.
* **`CarCreatorScreen.kt`**: Included `onBack` parameter in `CarCreationScreen` to allow users to cancel vehicle setup.
* **UI Component Adjustments:**
* Updated `AppTopBar` and `ScreenScaffold` usage across all modified files to explicitly handle the `onBack` event.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.