Followup leaderboard fix... (for mobile)#3281
Conversation
WalkthroughTwo leaderboard table components received layout adjustments. The second column in LeaderboardClanTable was changed to a fixed width of 5rem, and the corresponding column in LeaderboardPlayerList was set to 12rem. These are styling-only changes with no modifications to data handling or control flow. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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.
🧹 Nitpick comments (1)
src/client/components/leaderboard/LeaderboardClanTable.ts (1)
206-206: Add overflow protection to the clan tag cell.Clan tags are capped at 5 characters by the backend (Util.ts), but the current cell has no
truncateoroverflow-hiddenguard. Withtable-layout: fixed, the 5rem column can fit the max 5-character tag in most cases, but explicit overflow protection prevents silent text spillover. This matches the pattern used on the player-name cell in LeaderboardPlayerList.ts.Suggested fix
- <td class="py-3 px-4 font-bold text-blue-300"> + <td class="py-3 px-4 font-bold text-blue-300 overflow-hidden"> <div - class="px-2.5 py-1 rounded bg-blue-500/10 border border-blue-500/20 inline-block" + class="px-2.5 py-1 rounded bg-blue-500/10 border border-blue-500/20 inline-block max-w-full truncate" > ${clan.clanTag} </div> </td>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/client/components/leaderboard/LeaderboardClanTable.ts` at line 206, The clan-tag column in LeaderboardClanTable (the <col style="width: 5rem" /> and the corresponding clan tag cell) lacks overflow protection; update the clan tag cell rendering in the LeaderboardClanTable component to match the player-name pattern in LeaderboardPlayerList.ts by wrapping the clan tag text in a container or adding classes that enforce truncation and hidden overflow (e.g., the same "truncate" / "overflow-hidden" utility classes used for the player-name cell) so the 5-character tag cannot spill out when table-layout: fixed is applied.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/client/components/leaderboard/LeaderboardClanTable.ts`:
- Line 206: The clan-tag column in LeaderboardClanTable (the <col style="width:
5rem" /> and the corresponding clan tag cell) lacks overflow protection; update
the clan tag cell rendering in the LeaderboardClanTable component to match the
player-name pattern in LeaderboardPlayerList.ts by wrapping the clan tag text in
a container or adding classes that enforce truncation and hidden overflow (e.g.,
the same "truncate" / "overflow-hidden" utility classes used for the player-name
cell) so the 5-character tag cannot spill out when table-layout: fixed is
applied.
Description:
Column widths were off for some reason, I thought they were fixed...
So here is a followup PR
Previous:
Now:
Please complete the following:
Please put your Discord username so you can be contacted if a bug or regression is found:
FloPinguin