Skip to content

🔧 fix: search sheet overlapped by keyboard#266

Open
rbelem wants to merge 1 commit into
shub39:devfrom
rbelem:fix/search-overlapped-by-keyboard
Open

🔧 fix: search sheet overlapped by keyboard#266
rbelem wants to merge 1 commit into
shub39:devfrom
rbelem:fix/search-overlapped-by-keyboard

Conversation

@rbelem
Copy link
Copy Markdown
Contributor

@rbelem rbelem commented May 19, 2026

ModalBottomSheet renders in a Popup window which doesn't receive IME insets, so imePadding() was always 0 inside it. Replaced with custom inline bottom sheet rendered in the activity layout so IME insets work properly. Also fixed back press to dismiss sheet when keyboard hidden.

Summary by CodeRabbit

  • Bug Fixes

    • Improved keyboard interaction and visibility handling in the search interface
    • Enhanced keyboard dismissal behavior when navigating the search sheet
  • UI/UX Improvements

    • Refined search sheet animation and overlay styling for a smoother user experience

Review Change Stack

ModalBottomSheet renders in a Popup window which doesn't receive IME
insets, so imePadding() was always 0 inside it. Replaced with custom
inline bottom sheet rendered in the activity layout so IME insets work
properly. Also fixed back press to dismiss sheet when keyboard hidden.
Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

rbelem has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 19, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1b71368c-40e1-4005-9112-c19e198b3331

📥 Commits

Reviewing files that changed from the base of the PR and between 5838ce3 and 32dd36b.

📒 Files selected for processing (3)
  • app/src/main/AndroidManifest.xml
  • app/src/main/java/com/shub39/rush/app/App.kt
  • app/src/main/java/com/shub39/rush/presentation/searchsheet/SearchSheet.kt
💤 Files with no reviewable changes (1)
  • app/src/main/java/com/shub39/rush/app/App.kt

📝 Walkthrough

Walkthrough

SearchSheet is refactored from Material 3 ModalBottomSheet to a custom AnimatedVisibility overlay with IME-aware keyboard handling. The App.kt callsite is updated to omit the removed sheetState parameter, and AndroidManifest.xml enables soft-input resizing for MainActivity.

Changes

SearchSheet IME Overlay Refactor and Manifest Configuration

Layer / File(s) Summary
SearchSheet refactored to custom overlay with IME handling
app/src/main/java/com/shub39/rush/presentation/searchsheet/SearchSheet.kt
SearchSheet migrates from ModalBottomSheet to AnimatedVisibility containing a scrim and bottom-aligned Surface with imePadding. Imports updated to include animation transitions, IME helpers (imePadding, isImeVisible), heightIn, and Color. BackHandler now checks WindowInsets.isImeVisible to conditionally hide keyboard or dismiss the sheet. Search field, results list, and content layout preserved with updated modifiers and keyboard focus behavior. Preview call updated to omit sheetState argument.
App.kt callsite update for SearchSheet
app/src/main/java/com/shub39/rush/app/App.kt
rememberModalBottomSheetState import removed and SearchSheet invocation updated to omit the sheetState argument, matching the new function signature.
Manifest soft-input mode configuration
app/src/main/AndroidManifest.xml
MainActivity gains android:windowSoftInputMode="adjustResize" to enable system-level soft-input resizing behavior supporting the new IME-aware overlay.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A sheet that once stood modal and tall,
Now floats with grace, responsive to all—
The keyboard dances with imePadding's care,
While AnimatedVisibility fills the air!
Back-handler and scrim work hand in glove,
Soft input resized with manifest love. 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 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 (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly addresses the main change: replacing ModalBottomSheet with a custom implementation to fix keyboard overlap issues.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@rbelem
Copy link
Copy Markdown
Contributor Author

rbelem commented May 19, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 19, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@shub39
Copy link
Copy Markdown
Owner

shub39 commented May 19, 2026

I don't think a custom implementation is needed here. I can't reproduce the issues with searchsheet this is supposed to fix

@rbelem
Copy link
Copy Markdown
Contributor Author

rbelem commented May 23, 2026

I don't think a custom implementation is needed here. I can't reproduce the issues with searchsheet this is supposed to fix

These are the screenshot sequence of the issue.

Screenshot_20260523_064623_Rush.png

Screenshot_20260523_064645_Rush.png

Screenshot_20260523_064656_Rush.png

@rbelem
Copy link
Copy Markdown
Contributor Author

rbelem commented May 23, 2026

With the fix.

Screenshot_20260523_153448_Rush Debug.png

Screenshot_20260523_153858_Rush Debug.png

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