Fix apps FAB overlap with navigation bar#388
Conversation
WalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
feature/apps/presentation/src/commonMain/kotlin/zed/rainxch/apps/presentation/AppsRoot.kt (2)
303-307: Consider applying consistent inset handling to SnackbarHost.The FAB now uses
navigationBarsPadding()to avoid overlap with the system navigation bar, butSnackbarHostonly usesbottomNavHeight + 16.dp. If the system navigation bar inset fix is needed for the FAB, snackbars may also be partially obscured on devices with gesture navigation.♻️ Suggested fix for consistency
snackbarHost = { SnackbarHost( hostState = snackbarHostState, - modifier = Modifier.padding(bottomNavHeight + 16.dp), + modifier = Modifier + .navigationBarsPadding() + .padding(bottom = bottomNavHeight + 16.dp), ) },🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@feature/apps/presentation/src/commonMain/kotlin/zed/rainxch/apps/presentation/AppsRoot.kt` around lines 303 - 307, The SnackbarHost modifier currently only applies Modifier.padding(bottomNavHeight + 16.dp) which can let the system navigation bar overlap the snackbar; update the SnackbarHost usage (symbols: SnackbarHost, snackbarHostState, bottomNavHeight) to include system inset handling by chaining Modifier.navigationBarsPadding() before or alongside the existing padding (e.g., navigationBarsPadding() then padding(bottom = bottomNavHeight + 16.dp)) so the snackbar is pushed above the navigation bar consistently with the FAB.
520-522: LazyColumn trailing spacer may also need navigation bar inset adjustment.For consistency with the FAB fix, the trailing spacer should account for the system navigation bar if content can scroll behind it.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@feature/apps/presentation/src/commonMain/kotlin/zed/rainxch/apps/presentation/AppsRoot.kt` around lines 520 - 522, The trailing Spacer in AppsRoot.kt (inside the LazyColumn item using Spacer(Modifier.height(bottomNavHeight + 32.dp))) doesn't account for the system navigation bar inset; update the height calculation to include the navigation bar bottom inset so scrollable content won't be obscured — e.g. add the WindowInsets.navigationBars bottom inset (converted to dp) to the existing bottomNavHeight + 32.dp calculation or use WindowInsets.navigationBars.asPaddingValues() when computing the final spacer height so the Spacer respects the system navigation bar; locate the Spacer in the LazyColumn and adjust where bottomNavHeight is used to include the navigation bar inset.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In
`@feature/apps/presentation/src/commonMain/kotlin/zed/rainxch/apps/presentation/AppsRoot.kt`:
- Around line 303-307: The SnackbarHost modifier currently only applies
Modifier.padding(bottomNavHeight + 16.dp) which can let the system navigation
bar overlap the snackbar; update the SnackbarHost usage (symbols: SnackbarHost,
snackbarHostState, bottomNavHeight) to include system inset handling by chaining
Modifier.navigationBarsPadding() before or alongside the existing padding (e.g.,
navigationBarsPadding() then padding(bottom = bottomNavHeight + 16.dp)) so the
snackbar is pushed above the navigation bar consistently with the FAB.
- Around line 520-522: The trailing Spacer in AppsRoot.kt (inside the LazyColumn
item using Spacer(Modifier.height(bottomNavHeight + 32.dp))) doesn't account for
the system navigation bar inset; update the height calculation to include the
navigation bar bottom inset so scrollable content won't be obscured — e.g. add
the WindowInsets.navigationBars bottom inset (converted to dp) to the existing
bottomNavHeight + 32.dp calculation or use
WindowInsets.navigationBars.asPaddingValues() when computing the final spacer
height so the Spacer respects the system navigation bar; locate the Spacer in
the LazyColumn and adjust where bottomNavHeight is used to include the
navigation bar inset.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: a9c32999-200e-4252-bf69-12c4e1176fe6
📒 Files selected for processing (1)
feature/apps/presentation/src/commonMain/kotlin/zed/rainxch/apps/presentation/AppsRoot.kt
Summary by CodeRabbit
Release Notes