ADFA-3987 | Fix persistent space obscuring Find in File dialog#1313
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 Walkthrough
WalkthroughMoves find-in-file action buttons into a weighted horizontal LinearLayout, makes the actions container IME-aware by updating its bottom margin from an OnApplyWindowInsetsListener in EditorSearchLayout (with minor init and catch simplifications), and removes a hardcoded bottom margin from the editor container. ChangesFind-in-File IME Dynamic Bottom Margin
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 (1)
app/src/main/java/com/itsaky/androidide/activities/editor/EditorSearchVisibilityObserver.kt (1)
25-34: 💤 Low valueDoc comment claims recursive search but implementation is shallow.
The comment states "Recursively or directly finds the CodeEditorView" but the implementation only checks direct children (one level deep via
view.children.firstNotNullOfOrNull). This works for the current wrapper structure but the doc is misleading.📝 Suggested doc fix
/** - * Recursively or directly finds the [CodeEditorView] within the added view hierarchy. + * Finds the [CodeEditorView] either directly or as an immediate child of the added view. * Encapsulates the knowledge of how editors are wrapped in the UI layer. */🤖 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/activities/editor/EditorSearchVisibilityObserver.kt` around lines 25 - 34, The KDoc for findEditorView is incorrect: it claims a recursive search but the implementation only checks the view itself and its immediate children via view.children.firstNotNullOfOrNull; update the comment to accurately reflect the behavior (e.g., "Finds the CodeEditorView directly or among immediate children") so it matches the implementation, or alternatively implement true recursion by iterating children and calling findEditorView(child) for nested ViewGroups; reference the findEditorView function and the use of view.children.firstNotNullOfOrNull when making the 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.
Nitpick comments:
In
`@app/src/main/java/com/itsaky/androidide/activities/editor/EditorSearchVisibilityObserver.kt`:
- Around line 25-34: The KDoc for findEditorView is incorrect: it claims a
recursive search but the implementation only checks the view itself and its
immediate children via view.children.firstNotNullOfOrNull; update the comment to
accurately reflect the behavior (e.g., "Finds the CodeEditorView directly or
among immediate children") so it matches the implementation, or alternatively
implement true recursion by iterating children and calling findEditorView(child)
for nested ViewGroups; reference the findEditorView function and the use of
view.children.firstNotNullOfOrNull when making the change.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 83b677ac-f19c-4932-9d62-cea895b40e03
📒 Files selected for processing (10)
app/src/main/java/com/itsaky/androidide/activities/editor/BaseEditorActivity.ktapp/src/main/java/com/itsaky/androidide/activities/editor/EditorHandlerActivity.ktapp/src/main/java/com/itsaky/androidide/activities/editor/EditorOverlayInset.ktapp/src/main/java/com/itsaky/androidide/activities/editor/EditorSearchVisibilityObserver.ktapp/src/main/java/com/itsaky/androidide/activities/editor/FullscreenManager.ktapp/src/main/java/com/itsaky/androidide/ui/CodeEditorView.ktapp/src/main/java/com/itsaky/androidide/ui/EditorBottomSheet.ktapp/src/main/res/layout-land/content_editor.xmlapp/src/main/res/layout/content_editor.xmleditor/src/main/java/com/itsaky/androidide/editor/ui/EditorSearchLayout.kt
4553f5d to
849cbae
Compare
849cbae to
5c35d0a
Compare
dara-abijo-adfa
left a comment
There was a problem hiding this comment.
I'm raising this because I see changes in the find in file dialog.
The visibility issues with the dialog were fixed in #1295
I don't think the problem reported in the ticket is primarily with the dialog, but the extra space between the symbols view and the keyboard.
@jatezzz Could you provide more information on why those changes were needed?
Thanks.
Hi @dara-abijo-adfa, thanks for bringing that up! While #1295 addressed some visibility issues, it left a layout bug that is still present on stage. I've attached a quick video for context. You'll notice a big blank space between the search bar and the bottom sheet, as well as on top of the collapsed drawer. My changes in the find in file dialog are necessary to remove those hardcoded spaces. By wrapping the buttons and adding the Screen.Recording.2026-05-19.at.8.16.26.AM.mov |
Adjust action container margins dynamically based on IME visibility to save screen real estate.
5c35d0a to
711d62c
Compare
@jatezzz I think the main issue is the blank space above the collapsed drawer, and that also seems to be what’s causing the gap between the search dialog and the bottom sheet. It doesn’t appear to be related to the search dialog itself since the space is still visible even when the dialog isn’t open. That said, if you feel your changes are still necessary, I’m okay with that. |
Description
Fixed an issue where a persistent white space between the user keyboard and the code character toolbar wasted screen real estate and obscured the Find in File dialog in portrait mode. The layout has been updated to dynamically adjust the bottom margin when the keyboard (IME) is visible, ensuring the search input and action buttons remain fully accessible.
Details
LinearLayoutwithinlayout_find_in_file.xmlto manage their margins collectively.WindowInsetsCompatlistener inEditorSearchLayout.ktto detect when the keyboard (IME) is open and dynamically set the bottom margin of the actions container to0(orcollapsedSheetMarginwhen closed).layout_marginBottomfrom theeditor_containerincontent_editor.xml.Screen.Recording.2026-05-18.at.12.11.24.PM.mov
Ticket
ADFA-3987
Observation
Refactoring the individual action buttons into a
LinearLayoutwith weights simplifies the layout structure and makes it much easier to apply margin changes to the entire button group at once when the keyboard is toggled.