Skip to content

fix(ADFA-3837): Show input field above keyboard#1291

Merged
dara-abijo-adfa merged 2 commits into
stagefrom
bug/ADFA-3837-keyboard-overlaps-commit-ui
May 12, 2026
Merged

fix(ADFA-3837): Show input field above keyboard#1291
dara-abijo-adfa merged 2 commits into
stagefrom
bug/ADFA-3837-keyboard-overlaps-commit-ui

Conversation

@dara-abijo-adfa
Copy link
Copy Markdown
Contributor

Resolve issue with commit inputs - summary and description being hidden under the keyboard or overlapping with other widgets when the keyboard is open.

Screenshot 2026-05-12 at 14 29 17

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 12, 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: b0d0e92b-d972-4f07-a387-20ada76a7a15

📥 Commits

Reviewing files that changed from the base of the PR and between 17add36 and e2aedad.

📒 Files selected for processing (1)
  • app/src/main/res/layout/fragment_git_bottom_sheet.xml
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/src/main/res/layout/fragment_git_bottom_sheet.xml

📝 Walkthrough
  • Bug Fix

    • Fixed commit input fields being hidden or overlapped by the soft keyboard by making the Git bottom sheet content scrollable.
  • Technical details

    • Replaced root ConstraintLayout with a NestedScrollView (fillViewport="true") wrapping an inner ConstraintLayout to allow the sheet to scroll when the keyboard is shown.
    • Added a horizontal Guideline (≈45% height) to cap the file list (RecyclerView) and position commit input area.
    • Updated constraints for commit UI:
      • Commit summary and description positioned below the guideline and stacked to avoid overlap.
      • Author avatar aligned alongside the summary field.
      • Commit description → author warning → commit button → abort merge button → commit history button arranged with sequential constraints; commit history now uses vertical bias for bottom alignment.
    • Changed view heights to match_parent where appropriate to stabilize layout behavior with the keyboard.
  • ⚠️ Risks & best-practice notes

    • Potential nested-scrolling conflicts: Introducing a NestedScrollView can cause unexpected scroll behavior if the parent container (e.g., CoordinatorLayout, ViewPager2) also handles scrolling.
    • Bottom sheet gesture/behavior interaction: Verify NestedScrollView does not interfere with bottom sheet drag/expand/collapse interactions.
    • Performance: Increased layout complexity and added scrolling wrappers may affect layout inflation or measurement on lower-end devices—benchmark if necessary.
    • Testing required: Validate keyboard behavior across device sizes, orientations, IME types, and navigation modes to ensure no regressions.

Walkthrough

The git bottom sheet layout is refactored from a static ConstraintLayout to a scrollable NestedScrollView hierarchy. A Guideline partitions the RecyclerView from the commit input section. Component constraints are updated to work within the new scrollable container and guideline-based positioning.

Changes

Bottom sheet scrolling support

Layer / File(s) Summary
Scrollable layout with constraint restructuring
app/src/main/res/layout/fragment_git_bottom_sheet.xml
NestedScrollView root with inner padded ConstraintLayout replaces the static top-level ConstraintLayout. A horizontal Guideline caps the RecyclerView height. RecyclerView and emptyView constraints are restructured for the scrollable container. Commit input section components are repositioned using guideline-based top constraints and vertical stacking chains (commitSummaryLayout to Guideline, commitDescriptionLayout and authorWarning stacked, commitButton constrained by authorWarning, btnAbortMerge constrained by commitButton, commitHistoryButton constrained top and bottom with vertical bias).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

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

Poem

🐰 I hopped through XML to make room to scroll,
Swapped Constraint roots for a NestedScroll goal.
A Guideline stands steady, lists stretch and play,
Commit fields stack neatly, no overflow astray.
Hooray — layouts hop lighter today!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: fixing keyboard overlap by showing input fields above the keyboard. It directly relates to the layout restructuring in the changeset.
Description check ✅ Passed The description is directly related to the changeset, explaining the problem being solved (commit inputs hidden under keyboard) and including visual evidence of the issue, which aligns with the layout changes made.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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
  • Commit unit tests in branch bug/ADFA-3837-keyboard-overlaps-commit-ui

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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: 1

🧹 Nitpick comments (2)
app/src/main/res/layout/fragment_git_bottom_sheet.xml (2)

58-69: ⚡ Quick win

Use 0dp for emptyView height instead of match_parent.

In ConstraintLayout, when a view is constrained on both top and bottom, the height should be set to 0dp (match_constraint) rather than match_parent. This follows Android best practices and ensures proper constraint-based sizing.

♻️ Proposed fix
         <TextView
             android:id="@+id/emptyView"
             android:layout_width="match_parent"
-            android:layout_height="match_parent"
+            android:layout_height="0dp"
             android:gravity="center"
             android:text="@string/no_uncommitted_changes"
🤖 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/res/layout/fragment_git_bottom_sheet.xml` around lines 58 - 69,
The TextView with id emptyView is constrained top and bottom but uses
android:layout_height="match_parent"; change android:layout_height to "0dp"
(match_constraint) to let ConstraintLayout size it correctly—locate the
<TextView android:id="@+id/emptyView"> element and replace the height attribute
accordingly.

51-56: ⚖️ Poor tradeoff

Consider making the guideline percentage responsive to screen size.

The hardcoded 45% partition might not provide an optimal experience across all device sizes. On smaller screens, 45% may be insufficient for the file list, while on tablets, it may allocate excessive space. Consider using dimension resources with size qualifiers (e.g., values/dimens.xml, values-sw600dp/dimens.xml) to adjust the percentage based on screen size.

🤖 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/res/layout/fragment_git_bottom_sheet.xml` around lines 51 - 56,
The guideline_percent value for the Guideline with id guideline_limit is
hardcoded to 0.45; make it responsive by moving the percent into a resource and
override it for different screen sizes: replace
app:layout_constraintGuide_percent="0.45" with a resource reference (e.g.,
`@fraction/guideline_limit_percent`) and add a fractions resource file
(values/fractions.xml) with guideline_limit_percent = 0.45 and an override in
values-sw600dp/fractions.xml (or other qualifiers) with a different fraction
(e.g., 0.35) so tablets and phones get appropriate splits.
🤖 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/res/layout/fragment_git_bottom_sheet.xml`:
- Around line 8-10: The inner ConstraintLayout currently uses
android:layout_height="wrap_content" which causes constraint resolution issues
when the parent NestedScrollView uses fillViewport="true"; update the
ConstraintLayout element in fragment_git_bottom_sheet.xml to use
android:layout_height="match_parent" so that views relying on available space
(e.g., emptyView and commitHistoryButton) and vertical bias layout constraints
resolve correctly.

---

Nitpick comments:
In `@app/src/main/res/layout/fragment_git_bottom_sheet.xml`:
- Around line 58-69: The TextView with id emptyView is constrained top and
bottom but uses android:layout_height="match_parent"; change
android:layout_height to "0dp" (match_constraint) to let ConstraintLayout size
it correctly—locate the <TextView android:id="@+id/emptyView"> element and
replace the height attribute accordingly.
- Around line 51-56: The guideline_percent value for the Guideline with id
guideline_limit is hardcoded to 0.45; make it responsive by moving the percent
into a resource and override it for different screen sizes: replace
app:layout_constraintGuide_percent="0.45" with a resource reference (e.g.,
`@fraction/guideline_limit_percent`) and add a fractions resource file
(values/fractions.xml) with guideline_limit_percent = 0.45 and an override in
values-sw600dp/fractions.xml (or other qualifiers) with a different fraction
(e.g., 0.35) so tablets and phones get appropriate splits.
🪄 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: b287ff1b-0f9c-4b92-9682-02040a2390ff

📥 Commits

Reviewing files that changed from the base of the PR and between dfb2648 and 17add36.

📒 Files selected for processing (1)
  • app/src/main/res/layout/fragment_git_bottom_sheet.xml

Comment thread app/src/main/res/layout/fragment_git_bottom_sheet.xml Outdated
Copy link
Copy Markdown
Collaborator

@jatezzz jatezzz left a comment

Choose a reason for hiding this comment

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

LGTM

@dara-abijo-adfa dara-abijo-adfa merged commit 3f8ac50 into stage May 12, 2026
2 checks passed
@dara-abijo-adfa dara-abijo-adfa deleted the bug/ADFA-3837-keyboard-overlaps-commit-ui branch May 12, 2026 16:58
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