fix(ADFA-3837): Show input field above keyboard#1291
Conversation
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 Walkthrough
WalkthroughThe 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. ChangesBottom sheet scrolling support
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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.
Actionable comments posted: 1
🧹 Nitpick comments (2)
app/src/main/res/layout/fragment_git_bottom_sheet.xml (2)
58-69: ⚡ Quick winUse
0dpforemptyViewheight instead ofmatch_parent.In ConstraintLayout, when a view is constrained on both top and bottom, the height should be set to
0dp(match_constraint) rather thanmatch_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 tradeoffConsider 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
📒 Files selected for processing (1)
app/src/main/res/layout/fragment_git_bottom_sheet.xml
Resolve issue with commit inputs - summary and description being hidden under the keyboard or overlapping with other widgets when the keyboard is open.