Robust long-text handling on app rows, repo headers, announcements (refs #538)#564
Conversation
Issue #538 (UI part): long app names, repo names, owner handles, and version labels could blow up the layout — pushing siblings off-screen, wrapping awkwardly under the action button, or stacking 4-5 lines deep on apps with verbose versionName schemes. Hardened the three highest-traffic offenders: - AppItemCard (apps screen): appName max 2 lines, repoOwner 1 line with weight(fill = false), version label (both isUpdateAvailable and idle branches) max 2 lines, inline variant tag 1 line. - AppHeader (details screen): repository.name max 2 lines, author byline 1 line, both ellipsised. Required adding the TextOverflow import. - AnnouncementCard: announcement title capped at 3 lines so an unusually long advisory title can't push the body, action row, or acknowledge button off-screen. CompactAppRow, RepositoryCard, SkippedUpdatesRoot were already protected and don't need touching. Refs #538.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughThis PR adds consistent text overflow handling across three UI components by constraining text elements to maximum line counts and applying ellipsis overflow. The changes add TextOverflow imports and configure line limits on announcement titles, app headers, and app list item cards to prevent layout overflow and uncontrolled text expansion. ChangesText Overflow Constraints Across Components
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
What this PR fixes
Refs #538 (UI portion).
Long app names, repo names, owner handles, and version labels could break the layout — pushing siblings off-screen, wrapping awkwardly under the action button, or stacking 4–5 lines deep on apps with verbose versionName schemes (calver dates, multi-segment build identifiers, locale strings).
Hardened components
AppItemCard(apps screen)app.appName→maxLines = 2, overflow = Ellipsisapp.repoOwner→maxLines = 1, overflow = Ellipsis, givenweight(1f, fill = false)so it ellipsises before squeezing siblings.isUpdateAvailableand idle branches) →maxLines = 2, overflow = Ellipsis— accommodates1.8.6 → 1.8.7 (released yesterday)style strings without losing the tail.maxLines = 1, overflow = Ellipsis.fillMaxWidth()and the inner Row getsfillMaxWidth()so the weight allocation is unambiguous.AppHeader(details screen)repository.name→maxLines = 2, overflow = Ellipsis. Long repo names likeawesome-cross-platform-multimedia-toolkit-xno longer push the fork badge off the right edge.maxLines = 1, overflow = Ellipsis.import androidx.compose.ui.text.style.TextOverflow.AnnouncementCardmaxLines = 3, overflow = Ellipsis. Three lines is the comfort ceiling — a single critical advisory shouldn't be able to push the body, action row, or acknowledge button off-screen.import androidx.compose.ui.text.style.TextOverflow.Already protected (no changes needed)
CompactAppRow— already usesmaxLines = 1, overflow = Ellipsison appName / repoOwner / version label.RepositoryCard— already protects every dynamic field on the discovery card.SkippedUpdatesRoot— already protects appName / skippedTag / installedVersion.InspectRow(APK Inspect sheet) — intentionally unprotected because the SHA-256 fingerprint is meant to wrap fully so users can verify it.Test plan
Summary by CodeRabbit