Skip to content

feat: migrate to Material 3 Expressive APIs#4934

Merged
jamesarich merged 1 commit intomainfrom
feat/expressive
Mar 26, 2026
Merged

feat: migrate to Material 3 Expressive APIs#4934
jamesarich merged 1 commit intomainfrom
feat/expressive

Conversation

@jamesarich
Copy link
Copy Markdown
Collaborator

This commit updates the project to use the new Material 3 Expressive APIs, including the migration to MaterialExpressiveTheme and the implementation of standardized floating action button components.

Specific changes include:

  • Theme & Infrastructure:
    • Replaced MaterialTheme with MaterialExpressiveTheme in AppTheme and enabled the expressive motionScheme.
    • Added @OptIn(ExperimentalMaterial3ExpressiveApi::class) across various UI components in the node and core:ui modules.
  • Component Updates:
    • MenuFAB: Refactored the custom FAB implementation to use the new FloatingActionButtonMenu, FloatingActionButtonMenuItem, and ToggleFloatingActionButton components.
    • MainAppBar: Migrated to the new TopAppBar structure, utilizing the dedicated subtitle slot.
    • Typography: Updated several text styles from titleMedium to titleMediumEmphasized for better visual hierarchy in metric logs and node items.
  • Animations & Layout:
    • Updated NodeListScreen to use Modifier.animateFloatingActionButton() for handling FAB visibility during scroll and connection state changes.
    • Simplified layout logic in MetricLogItem and HostMetricsItem to align with expressive design patterns.

This commit updates the project to use the new Material 3 Expressive APIs, including the migration to `MaterialExpressiveTheme` and the implementation of standardized floating action button components.

Specific changes include:
- **Theme & Infrastructure**:
    - Replaced `MaterialTheme` with `MaterialExpressiveTheme` in `AppTheme` and enabled the expressive `motionScheme`.
    - Added `@OptIn(ExperimentalMaterial3ExpressiveApi::class)` across various UI components in the `node` and `core:ui` modules.
- **Component Updates**:
    - **MenuFAB**: Refactored the custom FAB implementation to use the new `FloatingActionButtonMenu`, `FloatingActionButtonMenuItem`, and `ToggleFloatingActionButton` components.
    - **MainAppBar**: Migrated to the new `TopAppBar` structure, utilizing the dedicated `subtitle` slot.
    - **Typography**: Updated several text styles from `titleMedium` to `titleMediumEmphasized` for better visual hierarchy in metric logs and node items.
- **Animations & Layout**:
    - Updated `NodeListScreen` to use `Modifier.animateFloatingActionButton()` for handling FAB visibility during scroll and connection state changes.
    - Simplified layout logic in `MetricLogItem` and `HostMetricsItem` to align with expressive design patterns.

Signed-off-by: James Rich <[email protected]>
@github-actions github-actions bot added the enhancement New feature or request label Mar 26, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 18.97%. Comparing base (c259c76) to head (a169017).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4934      +/-   ##
==========================================
- Coverage   19.06%   18.97%   -0.10%     
==========================================
  Files         572      572              
  Lines       18774    18774              
  Branches     2790     2790              
==========================================
- Hits         3580     3562      -18     
- Misses      14670    14688      +18     
  Partials      524      524              
Flag Coverage Δ
host-unit 18.97% <ø> (-0.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...lin/org/meshtastic/core/ui/component/MainAppBar.kt 0.00% <ø> (ø)
...kotlin/org/meshtastic/core/ui/component/MenuFAB.kt 0.00% <ø> (ø)
...nMain/kotlin/org/meshtastic/core/ui/theme/Theme.kt 0.00% <ø> (ø)
...org/meshtastic/feature/node/list/NodeListScreen.kt 0.00% <ø> (ø)
...g/meshtastic/feature/node/metrics/DeviceMetrics.kt 0.00% <ø> (ø)
.../meshtastic/feature/node/metrics/HostMetricsLog.kt 0.00% <ø> (ø)
...tastic/feature/node/metrics/MetricLogComponents.kt 0.00% <ø> (ø)
.../org/meshtastic/feature/node/metrics/PaxMetrics.kt 0.00% <ø> (ø)
...rg/meshtastic/feature/node/metrics/PowerMetrics.kt 0.00% <ø> (ø)
...g/meshtastic/feature/node/metrics/SignalMetrics.kt 0.00% <ø> (ø)

... and 3 files with indirect coverage changes

@jamesarich jamesarich added this pull request to the merge queue Mar 26, 2026
Merged via the queue into main with commit 141b54f Mar 26, 2026
13 of 15 checks passed
@jamesarich jamesarich deleted the feat/expressive branch March 26, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant