Skip to content

ADFA-4051: Invisible symbol input view#1358

Open
dara-abijo-adfa wants to merge 4 commits into
stagefrom
ADFA-4051-invisible-symbol-input-view
Open

ADFA-4051: Invisible symbol input view#1358
dara-abijo-adfa wants to merge 4 commits into
stagefrom
ADFA-4051-invisible-symbol-input-view

Conversation

@dara-abijo-adfa
Copy link
Copy Markdown
Contributor

  • Show the symbols input view whenever the keyboard is open
  • Remove the DrawerLayout background showing above the keyboard

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 2, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 340480fe-dc25-4ff6-954a-6d2c292b5976

📥 Commits

Reviewing files that changed from the base of the PR and between 714694a and 4075965.

📒 Files selected for processing (2)
  • app/src/main/java/com/itsaky/androidide/activities/editor/FullscreenManager.kt
  • app/src/main/java/com/itsaky/androidide/ui/EditorBottomSheet.kt
🚧 Files skipped from review as they are similar to previous changes (2)
  • app/src/main/java/com/itsaky/androidide/ui/EditorBottomSheet.kt
  • app/src/main/java/com/itsaky/androidide/activities/editor/FullscreenManager.kt

📝 Walkthrough
  • Features & Improvements:

    • Symbol input view now displays whenever the soft keyboard is open, improving symbol entry while editing.
    • DrawerLayout background no longer appears above the keyboard, removing a visual artifact.
    • Bottom sheet behavior adapts to keyboard visibility in fullscreen: collapses when the keyboard is open, hides when the keyboard is closed.
    • Keyboard inset handling improved to account for both IME and system bar insets when adjusting content card height.
  • Technical Changes:

    • BaseEditorActivity: refactored onApplyWindowInsets() to pass IME and system bar insets into handleKeyboardInsets(); uses BottomSheetBehavior.STATE_COLLAPSED/STATE_HIDDEN constants and updates back-press/initial setup logic to collapse the bottom sheet when appropriate.
    • FullscreenManager: sets bottom sheet target state based on keyboard visibility (uses KeyboardUtils) instead of always hiding on fullscreen.
    • EditorBottomSheet: applyPeekHeight() simplified to set peekHeight = 0 only when search mode is active (removed dependency on IME visibility).
  • ⚠️ Potential Risks & Considerations:

    • State-management complexity: conditional COLLAPSED vs HIDDEN logic adds multiple code paths and may cause unintended interactions (e.g., during rapid keyboard show/hide).
    • UI transition edge cases: removing IME dependency from peekHeight may change perceived polish during keyboard transitions across different keyboards/devices.
    • Untested scenarios: multi-window, configuration changes, and inconsistent system keyboard reports could reveal edge-case bugs.
    • Testing priority: thoroughly exercise keyboard show/hide sequences, search mode transitions, fullscreen entry/exit, and back-button behavior to ensure consistent bottom-sheet state.

Walkthrough

Bottom-sheet state handling and keyboard-inset computation were refactored: constants imported for collapsed/hidden states, onApplyWindowInsets now passes IME and system-bar insets to compute content height, fullscreen and IME visibility choose collapsed vs hidden states, and peekHeight is set to 0 only for search mode.

Changes

Keyboard-Aware Bottom Sheet State Management

Layer / File(s) Summary
Constants import and state consolidation
app/src/main/java/com/itsaky/androidide/activities/editor/BaseEditorActivity.kt
BaseEditorActivity imports STATE_COLLAPSED and STATE_HIDDEN and uses them for back-press handling, hideBottomSheet(), and delayed setup.
Window inset / keyboard height refactor
app/src/main/java/com/itsaky/androidide/activities/editor/BaseEditorActivity.kt
onApplyWindowInsets now forwards IME and system-bar insets to handleKeyboardInsets, which computes content card height using IME bottom inset minus system-bar height.
IME visibility-driven sheet transitions
app/src/main/java/com/itsaky/androidide/activities/editor/BaseEditorActivity.kt
When IME visibility toggles and fullscreen is active, editorBottomSheet?.state is set to STATE_COLLAPSED (keyboard visible) or STATE_HIDDEN (keyboard hidden).
Fullscreen keyboard-aware sheet behavior
app/src/main/java/com/itsaky/androidide/activities/editor/FullscreenManager.kt
Adds KeyboardUtils import; entering fullscreen selects STATE_COLLAPSED if keyboard visible or STATE_HIDDEN if not, and updates bottomSheetBehavior.state only when it differs.
Search mode peek-height logic
app/src/main/java/com/itsaky/androidide/ui/EditorBottomSheet.kt
applyPeekHeight() sets behavior.peekHeight = 0 only when isSearchModeActive is true (no longer depends on IME visibility).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • Daniel-ADFA
  • itsaky-adfa
  • jomen-adfa

Poem

🐰 I nudge the sheet with gentle paws,

When keys appear I press pause,
Collapsed or hidden — I decide,
Insets trimmed so views fit wide,
A hopping fix with tiny applause.

🚥 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
Title check ✅ Passed The title references 'Invisible symbol input view' which aligns with the PR objectives to show the symbols input view and remove the DrawerLayout background above the keyboard.
Description check ✅ Passed The description directly addresses the PR objectives: showing the symbols input view when keyboard is open and removing the DrawerLayout background above the keyboard.
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 ADFA-4051-invisible-symbol-input-view

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.

Actionable comments posted: 2

🤖 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.

Inline comments:
In
`@app/src/main/java/com/itsaky/androidide/activities/editor/FullscreenManager.kt`:
- Around line 231-232: FullscreenManager.applyFullscreen currently unsafely
casts contentBinding.root.context to Activity for
KeyboardUtils.isSoftInputVisible; instead unwrap the view context by walking
ContextWrapper (while ctx is ContextWrapper set ctx = ctx.baseContext) until you
find an Activity, or accept/pass the owning Activity into FullscreenManager and
use that; then call KeyboardUtils.isSoftInputVisible(activity). Reference:
FullscreenManager.applyFullscreen, contentBinding.root.context, and
KeyboardUtils.isSoftInputVisible; add android.content.ContextWrapper import if
unwrapping.

In `@app/src/main/java/com/itsaky/androidide/ui/EditorBottomSheet.kt`:
- Line 357: Replace the float-to-int conversion for the bottom sheet peek height
to use rounding instead of truncation: locate the assignment to
behavior.peekHeight in EditorBottomSheet (the line using isSearchModeActive and
collapsedHeight) and change the conversion of collapsedHeight to use
roundToInt() so it matches other uses in this file and avoids off-by-one pixel
errors.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0f081816-93e2-4a58-a5e3-27481c74f805

📥 Commits

Reviewing files that changed from the base of the PR and between 1793332 and 714694a.

📒 Files selected for processing (3)
  • app/src/main/java/com/itsaky/androidide/activities/editor/BaseEditorActivity.kt
  • app/src/main/java/com/itsaky/androidide/activities/editor/FullscreenManager.kt
  • app/src/main/java/com/itsaky/androidide/ui/EditorBottomSheet.kt

Comment thread app/src/main/java/com/itsaky/androidide/activities/editor/FullscreenManager.kt Outdated
Comment thread app/src/main/java/com/itsaky/androidide/ui/EditorBottomSheet.kt Outdated
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