Skip to content

Comments

Fix scrolling UI error in PersonalID fragments#3556

Draft
OrangeAndGreen wants to merge 1 commit intomasterfrom
CCCT-2197-scrolling_fix
Draft

Fix scrolling UI error in PersonalID fragments#3556
OrangeAndGreen wants to merge 1 commit intomasterfrom
CCCT-2197-scrolling_fix

Conversation

@OrangeAndGreen
Copy link
Contributor

https://dimagi.atlassian.net/browse/CCCT-2197

Product Description

Fixes a bug in the PersonalID fragments where on some devices the UI would shrink too much vertically when the keyboard appears.
Demo of the bug

Technical Summary

Trusting IME offset bottom instead of taking the max with system bar insets.

Feature Flag

None

Safety Assurance

Safety story

Tested locally, pending other dev testing to verify on devices that displayed the error.

Automated test coverage

None

QA Plan

None yet

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 20, 2026

📝 Walkthrough

Walkthrough

The bottom padding calculation in the setupKeyboardScrollListener method of BasePersonalIdFragment.kt was simplified to consider only the Input Method Editor (IME) bottom inset, removing the previous logic that accounted for the maximum of IME bottom and system bars bottom. The change affects only the padding calculation; all other keyboard handling and scrolling behavior remains unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 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 (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fix scrolling UI error in PersonalID fragments' directly matches the main change: fixing a keyboard-related UI shrinking bug in PersonalID fragments.
Description check ✅ Passed The description covers Product Description, Technical Summary, and Safety Assurance sections from the template, though QA Plan and some safety details are incomplete.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch CCCT-2197-scrolling_fix

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
app/src/org/commcare/fragments/personalId/BasePersonalIdFragment.kt (1)

16-16: ⚠️ Potential issue | 🟡 Minor

Remove unused import kotlin.math.max

The max(...) call was dropped on line 76, leaving this import dead. ktlint will flag it under the no-unused-imports rule.

🔧 Proposed fix
-import kotlin.math.max

As per coding guidelines, ktlint compliance is required for **/*.kt files. Running ktlint path/to/BasePersonalIdFragment.kt (or ktlint --format) will surface and auto-remove this.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/src/org/commcare/fragments/personalId/BasePersonalIdFragment.kt` at line
16, Remove the unused import kotlin.math.max from BasePersonalIdFragment (file
contains class BasePersonalIdFragment) because the max(...) call was removed;
open BasePersonalIdFragment.kt, delete the import line "import kotlin.math.max"
(or run ktlint --format on that file) to satisfy ktlint no-unused-imports rule
and re-run linters to confirm.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@app/src/org/commcare/fragments/personalId/BasePersonalIdFragment.kt`:
- Line 16: Remove the unused import kotlin.math.max from BasePersonalIdFragment
(file contains class BasePersonalIdFragment) because the max(...) call was
removed; open BasePersonalIdFragment.kt, delete the import line "import
kotlin.math.max" (or run ktlint --format on that file) to satisfy ktlint
no-unused-imports rule and re-run linters to confirm.

@OrangeAndGreen OrangeAndGreen added the skip-integration-tests Skip android tests. label Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant