Skip to content

Fix apps FAB overlap with navigation bar#388

Merged
rainxchzed merged 2 commits into
mainfrom
issue-380-ui-improvement
Apr 3, 2026
Merged

Fix apps FAB overlap with navigation bar#388
rainxchzed merged 2 commits into
mainfrom
issue-380-ui-improvement

Conversation

@Jassem-sendi
Copy link
Copy Markdown
Collaborator

@Jassem-sendi Jassem-sendi commented Apr 2, 2026

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Improved floating action button positioning to correctly account for system navigation bar insets, ensuring proper spacing and visibility on all devices.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 2, 2026

Walkthrough

The FloatingActionButton in AppsScreen was updated to apply system navigation bar inset padding before the existing bottom padding calculation. This ensures the button respects system navigation bar boundaries in addition to the app's bottom navigation height.

Changes

Cohort / File(s) Summary
FloatingActionButton Layout Update
feature/apps/presentation/src/commonMain/kotlin/zed/rainxch/apps/presentation/AppsRoot.kt
Added navigationBarsPadding() modifier to FloatingActionButton before the existing bottomNavHeight padding. This accounts for system navigation bar insets in button positioning. Import added for the new modifier.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A button floats with grace so fine,
Now padded safe from nav's design,
The system bars no longer hide,
Our floating friend has room to glide! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Fix apps FAB overlap with navigation bar' directly and clearly describes the main change in the PR—applying navigationBarsPadding() to fix the FloatingActionButton overlapping with the navigation bar.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-380-ui-improvement

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 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, but SnackbarHost only uses bottomNavHeight + 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

📥 Commits

Reviewing files that changed from the base of the PR and between ce9e1bc and 45ec879.

📒 Files selected for processing (1)
  • feature/apps/presentation/src/commonMain/kotlin/zed/rainxch/apps/presentation/AppsRoot.kt

@rainxchzed rainxchzed merged commit 6e8a833 into main Apr 3, 2026
1 check was pending
@rainxchzed rainxchzed deleted the issue-380-ui-improvement branch April 3, 2026 02:06
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