Skip to content

Design branch - #19

Merged
Aredarn merged 2 commits into
mainfrom
design_branch
Aug 11, 2026
Merged

Design branch#19
Aredarn merged 2 commits into
mainfrom
design_branch

Conversation

@Aredarn

@Aredarn Aredarn commented Aug 11, 2026

Copy link
Copy Markdown
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.
@Aredarn
Aredarn merged commit 366e54c into main Aug 11, 2026
1 of 2 checks passed
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