Skip to content

fix(ADFA-2148): Do not truncate swipe hint text#1336

Open
dara-abijo-adfa wants to merge 1 commit into
stagefrom
ADFA-2148-fix-truncated-text
Open

fix(ADFA-2148): Do not truncate swipe hint text#1336
dara-abijo-adfa wants to merge 1 commit into
stagefrom
ADFA-2148-fix-truncated-text

Conversation

@dara-abijo-adfa
Copy link
Copy Markdown
Contributor

Remove maxLines from swipe hint text to fix truncated text

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 26, 2026

Review Change Stack

📝 Walkthrough

Release Notes

  • Fixed: Removed maxLines constraint from swipe hint text to prevent truncation of hint messages
  • Changed: Updated layout_editor_build_status.xml to use wrap_content for root ConstraintLayout and child TextView elements instead of fixed dimensions
    • Root layout height: 56dp → wrap_content
    • statusText height: → wrap_content
    • swipe_hint height: → wrap_content

Potential Risks

  • Layout consistency risk: Changing from fixed heights (56dp) to wrap_content may cause variable spacing and alignment issues if the swipe hint text varies significantly in length
  • UI regression risk: Removing maxLines without enforcing a maximum could allow very long hint text to consume excessive screen space and break the UI layout
  • Recommend: Consider setting an appropriate maxLines value with ellipsize behavior as an alternative to completely removing the constraint, or verify that swipe hint text length is controlled elsewhere in the codebase

Walkthrough

Updated layout_editor_build_status.xml to adapt container and text view sizing from fixed dimensions to flexible wrap_content, removing height constraints and max line limits to allow dynamic layout adjustment.

Changes

Build Status Layout Sizing

Layer / File(s) Summary
Build status layout sizing adjustments
app/src/main/res/layout/layout_editor_build_status.xml
Root ConstraintLayout height changed from fixed 56dp to wrap_content. statusText and swipe_hint TextView elements changed to wrap_content height; swipe_hint maxLines constraint removed.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested reviewers

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

Poem

A layout once rigid, now flows like a stream,
From fixed 56dp to wrap_content dream,
The hints and the text now dance to their height,
No maxLines to bind them—they're finally free and bright! 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: removing maxLines to prevent truncation of swipe hint text, which matches the primary modification in the layout file.
Description check ✅ Passed The description is directly related to the changeset, explicitly mentioning the removal of maxLines from swipe hint text to fix truncation.
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 ADFA-2148-fix-truncated-text

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.

🧹 Nitpick comments (1)
app/src/main/res/layout/layout_editor_build_status.xml (1)

40-52: ⚡ Quick win

Validate swipe_hint rendering with the longest @string/msg_swipe_up localizations
Dropping android:maxLines should address truncation, but msg_swipe_up length varies across locales (longest observed ~157 chars in values-bn-rIN, then ~133 in values-hi-rIN, and ~123 in values-ru-rRU). Test layout_editor_build_status.xml in those languages to ensure the text wraps cleanly (no truncation/overlap) and the combined height with statusText still fits within the parent constraints.

🤖 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/layout_editor_build_status.xml` around lines 40 - 52,
The swipe_hint TextView can get truncated by tight constraints for long
localizations; update layout_editor_build_status.xml so the TextView with id
swipe_hint does not have an android:maxLines limiting wrapping (remove any
maxLines), keep width="0dp" and height="wrap_content", and relax its vertical
constraint by removing app:layout_constraintBottom_toBottomOf="parent" (leave it
constrained to statusText via
app:layout_constraintTop_toBottomOf="`@id/statusText`" or use a vertical chain) so
it can grow with long strings; then test in values-bn-rIN, values-hi-rIN and
values-ru-rRU and adjust constraints if the combined height of swipe_hint and
statusText exceeds the parent.
🤖 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.

Nitpick comments:
In `@app/src/main/res/layout/layout_editor_build_status.xml`:
- Around line 40-52: The swipe_hint TextView can get truncated by tight
constraints for long localizations; update layout_editor_build_status.xml so the
TextView with id swipe_hint does not have an android:maxLines limiting wrapping
(remove any maxLines), keep width="0dp" and height="wrap_content", and relax its
vertical constraint by removing app:layout_constraintBottom_toBottomOf="parent"
(leave it constrained to statusText via
app:layout_constraintTop_toBottomOf="`@id/statusText`" or use a vertical chain) so
it can grow with long strings; then test in values-bn-rIN, values-hi-rIN and
values-ru-rRU and adjust constraints if the combined height of swipe_hint and
statusText exceeds the parent.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 92094083-7bf3-486b-991b-ec0118782c0e

📥 Commits

Reviewing files that changed from the base of the PR and between 1d7fe53 and a23196f.

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

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