Conversation
Truncated text on prompt container to one line. This avoids text cutting off on android
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
CDVolvik
left a comment
There was a problem hiding this comment.
setSingleLineCentered on main only flips gravity. A single-line centered EditText will still wrap/clip the hint without maxLines = 1 and ellipsize = END. Those two lines are the usual Android fix for the placeholder getting cut.
I do not have an Android emulator in this session, so this is a source read, not a device repro. Title uses Fix(Android): — merged PRs here are fix(scope):.
What Changed
Changed prompt composer placeholder text to display as single line on android
Why
The placeholder text in the prompt composer, was showing as multiple lines which caused text to clip due to the container's fixed height.
UI Changes
Before:
After:
Checklist
Note
Low Risk
Small Android-only layout tweak in the native composer view; no auth, data, or shared API changes.
Overview
Fixes Android prompt composer placeholder clipping when the field is collapsed (
singleLineCentered).setSingleLineCenteredalready switched vertical gravity; it now also setsmaxLinesto 1 andellipsizetoENDwhile centered, and restores unlimited lines with no ellipsize when expanded. Long placeholder copy stays on one line with an ellipsis instead of wrapping inside the fixed-height pill.No JS or prop contract changes—the existing
singleLineCentered={!isExpanded}usage inThreadComposerandNewTaskDraftScreenpicks up the behavior.Reviewed by Cursor Bugbot for commit a603a6a. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix text clipping in Android prompt input box placeholder by restricting centered editor to single line
When the editor is in centered mode,
T3ComposerEditorView.setCenterednow setsmaxLines = 1andellipsize = TextUtils.TruncateAt.ENDto prevent placeholder text from being clipped. When not centered,maxLinesis reset toInt.MAX_VALUEand ellipsize is cleared.Macroscope summarized 75ad990.