Skip to content

Add Material 3 NavigationBar and NavigationBarItem as content emitters#632

Merged
mrmans0n merged 1 commit into
mrmans0n:mainfrom
Noahs212:add-m3-navigation-bar-emitters
May 18, 2026
Merged

Add Material 3 NavigationBar and NavigationBarItem as content emitters#632
mrmans0n merged 1 commit into
mrmans0n:mainfrom
Noahs212:add-m3-navigation-bar-emitters

Conversation

@Noahs212
Copy link
Copy Markdown

Add Material 3 NavigationBar and NavigationBarItem to ComposableEmittersList. These are the Material 3 equivalents of NavigationRail / NavigationRailItem (already listed in the Material 2 section) and the Material 2 BottomNavigation (already listed in the Accompanist section). Mirrors the shape of #613, which added the Material 3 dividers.

Without these entries, MultipleContentEmitters and ModifierNotUsedAtRoot rely on the containsComposablesWithModifiers() fallback in KtCallExpression.emitsContent — which only matches when the call site passes a modifier argument. Calls like NavigationBar { … } (no explicit modifier forwarded) currently slip through. Adding the names to the emitters list closes that gap.

@mrmans0n mrmans0n merged commit 14b3900 into mrmans0n:main May 18, 2026
mrmans0n pushed a commit that referenced this pull request May 19, 2026
Add the following Material 3 chips to `ComposableEmittersList`:
`AssistChip`, `ElevatedAssistChip`, `FilterChip`, `ElevatedFilterChip`,
`InputChip`, `SuggestionChip`, `ElevatedSuggestionChip`. Mirrors the
shape of #613 (Material 3 dividers) and #632 (Material 3 `NavigationBar`
/ `NavigationBarItem`).

Without these entries, `MultipleContentEmitters` and
`ModifierNotUsedAtRoot` rely on the `containsComposablesWithModifiers()`
fallback in `KtCallExpression.emitsContent`, which only matches when the
call site passes a `modifier` argument. Calls like `AssistChip { ... }`
(no explicit modifier forwarded) currently slip through. Adding the
names to the emitters list closes that gap.
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.

2 participants