fix(ADFA-3473): Resolve find in file dialog visibility issue#1295
Conversation
dara-abijo-adfa
commented
May 12, 2026
- Prevent the keyboard from overlapping the find in file dialog
- Hide bottom sheet peek when the keyboard is open
📝 WalkthroughRelease NotesFix: Find in File Dialog Keyboard Overlap Issue User-Facing Improvements
Technical Implementation
|
| Layer / File(s) | Summary |
|---|---|
Fullscreen state tracking and AppBar margin app/src/main/java/com/itsaky/androidide/activities/editor/FullscreenManager.kt |
isFullscreenState boolean tracks fullscreen status; default editor bottom margin changes from lazy to eager evaluation; AppBar offset listener conditionally adjusts container bottom margin only when not fullscreen. |
Bottom sheet IME and gesture inset behavior app/src/main/java/com/itsaky/androidide/ui/EditorBottomSheet.kt |
Gesture insets are unconditionally ignored; peek height is set to 0 when IME is visible, otherwise to collapsed height. Both setImeVisible and setOffsetAnchor enforce this behavior consistently. |
Overlapping view layout positioning app/src/main/java/com/itsaky/androidide/ui/SwipeRevealLayout.kt |
Overlapping child positioned using its measured height instead of parent-provided bottom boundary, narrowing vertical bounds to measured content. |
Search UI height and button styling editor/src/main/java/com/itsaky/androidide/editor/ui/EditorSearchLayout.kt, editor/src/main/res/layout/layout_find_in_file.xml |
Search UI root height changes from MATCH_PARENT to WRAP_CONTENT; all four search buttons (prev, next, replace, close) receive android:minWidth="0dp", android:paddingHorizontal="4dp", and explicit bottom constraints. |
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
- appdevforall/CodeOnTheGo#1114: Both PRs modify editor UI inset/behavior code (notably EditorBottomSheet and SwipeRevealLayout) impacting how insets, IME, and overlapping/swipe-reveal layout are handled.
- appdevforall/CodeOnTheGo#1101: Both PRs modify app-bar/immersive/fullscreen behavior affecting editor container bottom-margin and app-bar offset handling.
- appdevforall/CodeOnTheGo#1149: Both PRs modify editor fullscreen handling and state synchronization in FullscreenManager.
Suggested reviewers
- jatezzz
- itsaky-adfa
- jomen-adfa
- Daniel-ADFA
Poem
A hoppy fix for layout grace,
Gesture insets now in place,
Fullscreen state will find its way,
Buttons styled bright today. 🐰✨
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | Docstring coverage is 14.29% 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 |
|---|---|---|
| Title check | ✅ Passed | The title directly addresses the main objective of the PR: resolving visibility issues with the find in file dialog. |
| Description check | ✅ Passed | The description is clearly related to the changeset, detailing specific fixes for keyboard overlap and bottom sheet visibility. |
| 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 docstrings
- Create stacked PR
- Commit on current branch
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Commit unit tests in branch
bug/ADFA-3473-make-find-in-file-dialog-visible
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 @coderabbitai help to get the list of available commands and usage tips.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
app/src/main/java/com/itsaky/androidide/ui/EditorBottomSheet.kt (1)
345-367:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winRace condition:
setOffsetAnchorlistener can override IME-driven peek height.When
setOffsetAnchoris called while the IME is visible, theOnGlobalLayoutListener(line 352) unconditionally setspeekHeight = collapsedHeight.roundToInt(), overriding thepeekHeight = 0set bysetImeVisible. This would show the bottom sheet peek even when the keyboard is open, contradicting the PR objective.🐛 Proposed fix to respect IME visibility when setting peek height
override fun onGlobalLayout() { view.viewTreeObserver.removeOnGlobalLayoutListener(this) anchorOffset = view.height + SizeUtils.dp2px(1f) - behavior.peekHeight = collapsedHeight.roundToInt() + behavior.peekHeight = if (isImeVisible) 0 else collapsedHeight.roundToInt() behavior.expandedOffset = anchorOffset behavior.isGestureInsetBottomIgnored = true🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@app/src/main/java/com/itsaky/androidide/ui/EditorBottomSheet.kt` around lines 345 - 367, The OnGlobalLayoutListener inside setOffsetAnchor unconditionally resets behavior.peekHeight which can override the IME-driven peekHeight set by setImeVisible; modify the listener in setOffsetAnchor to check the current IME-visible state (e.g., a boolean field used by setImeVisible) before assigning behavior.peekHeight so that if IME is visible you do not set peekHeight (leave it as 0), but still update anchorOffset, behavior.expandedOffset, isGestureInsetBottomIgnored and padding/layout updates; reference setOffsetAnchor, the anonymous OnGlobalLayoutListener, anchorOffset and behavior.peekHeight when making the conditional change.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@app/src/main/java/com/itsaky/androidide/ui/EditorBottomSheet.kt`:
- Around line 345-367: The OnGlobalLayoutListener inside setOffsetAnchor
unconditionally resets behavior.peekHeight which can override the IME-driven
peekHeight set by setImeVisible; modify the listener in setOffsetAnchor to check
the current IME-visible state (e.g., a boolean field used by setImeVisible)
before assigning behavior.peekHeight so that if IME is visible you do not set
peekHeight (leave it as 0), but still update anchorOffset,
behavior.expandedOffset, isGestureInsetBottomIgnored and padding/layout updates;
reference setOffsetAnchor, the anonymous OnGlobalLayoutListener, anchorOffset
and behavior.peekHeight when making the conditional change.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 66dbb872-3a75-41b7-a09a-b94562bcfb7c
📒 Files selected for processing (5)
app/src/main/java/com/itsaky/androidide/activities/editor/FullscreenManager.ktapp/src/main/java/com/itsaky/androidide/ui/EditorBottomSheet.ktapp/src/main/java/com/itsaky/androidide/ui/SwipeRevealLayout.kteditor/src/main/java/com/itsaky/androidide/editor/ui/EditorSearchLayout.kteditor/src/main/res/layout/layout_find_in_file.xml