Fix issues list responsiveness on small screens#3413
Conversation
WalkthroughThe PR modifies the IssuesTable component to improve responsive behavior on small screens by adding right padding to the title cell and replacing flexible text truncation with CSS line-clamping (limited to 2 lines) and fixed height constraints. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
frontend/src/components/IssuesTable.tsx (1)
146-152: Label overflow not addressed per PR objectives.Issue
#3367specifies that labels should be truncated to prevent overflow on small screens, but individual label<span>elements have no max-width or truncation constraints. A long label name will still extend to the container edge.Consider adding truncation to the label spans on mobile:
Suggested approach
<span key={label} - className="inline-flex items-center rounded-md bg-gray-100 px-2 py-0.5 text-xs text-gray-700 lg:rounded-lg lg:border lg:border-gray-400 lg:bg-transparent lg:hover:bg-gray-200 dark:bg-gray-800 dark:text-gray-300 dark:lg:border-gray-300 dark:lg:hover:bg-gray-700" + className="inline-flex max-w-[120px] items-center truncate rounded-md bg-gray-100 px-2 py-0.5 text-xs text-gray-700 lg:max-w-none lg:truncate-none lg:rounded-lg lg:border lg:border-gray-400 lg:bg-transparent lg:hover:bg-gray-200 dark:bg-gray-800 dark:text-gray-300 dark:lg:border-gray-300 dark:lg:hover:bg-gray-700" > {label} </span>Adjust
max-w-[120px]as appropriate for your design. You may also want a Tooltip for truncated labels.
🧹 Nitpick comments (1)
frontend/src/components/IssuesTable.tsx (1)
124-130: Consider removing fixed height and redundantoverflow-hidden.A few observations on the truncation approach:
h-12fixed height is fragile — it assumes exactly 2 lines fit in 48px. Single-line titles will have extra whitespace, and any font/line-height changes could break the layout.
overflow-hiddenis redundant — Tailwind'sline-clamp-2already includesoverflow: hidden.Let
line-clamp-2handle the height dynamically for more robust behavior.Suggested change
<button type="button" onClick={() => handleIssueClick(issue.number)} - className="line-clamp-2 h-12 cursor-pointer overflow-hidden text-left text-sm font-medium text-blue-600 hover:underline lg:max-w-md dark:text-blue-400" + className="line-clamp-2 cursor-pointer text-left text-sm font-medium text-blue-600 hover:underline lg:max-w-md dark:text-blue-400" >
|
Hi i runed make check-test locally and all tests are passing on my side. |
|
kasya
left a comment
There was a problem hiding this comment.
@anurag2787 this looks good! Thanks!



Proposed change
This PR improves the responsiveness of the Issues list page on small screens.
Resolves #3367
Checklist
make check-testlocally: all warnings addressed, tests passed