fix(leaderboard): drop clan tags from 1v1 ranked and align the pinned… - #4713
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughThe ranked 1v1 leaderboard no longer exposes or displays clan tags. Its sticky ranking entry is now rendered as a pinned table-footer row, with related overlay and spacing logic removed. Tests verify that API-provided clan tags are discarded. ChangesLeaderboard update
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
4ab9894 to
33e8d50
Compare
… row 1v1 ranked is an individual ladder, and the tag the API reports is whichever one the player last happened to use in any game mode — so it does not belong on this board. Removed from the rows, from the pinned "your ranking" bar, and from the view model, which is used only by this component. The pinned bar was also an overlay laid out by hand (flex boxes with px-6/ml-4/w-20) rather than following the table, so it never lined up with the rows it sits under: the player name was 25px left of the Player column and the bar was 8px taller than a row, while the Elo value floated at the far right under the Win/Loss header. Hand-picked padding cannot fix this — the table is `table-fixed w-full`, so the resolved column widths grow with the modal and no fixed offset matches at more than one size. It is now the table's own sticky <tfoot>, mirroring the existing sticky <thead>. Sharing the table means the columns cannot drift and the row follows horizontal scrolling: below the colgroup's 34rem the table scrolls sideways, and an overlay outside .scroll-container did not move with it — at 420px wide, scrolling right desynced the pinned row by 126px and pushed its Win/Loss cell to x=545 against a container edge of 419, where it could not be reached. Being in flow also removes the pb-16 spacer that kept the overlay off the last row. The container's bottom border is gone so the pinned row sits flush against that edge. The border is unchanged from main, but the row is now solid bg-blue-600 rather than bg-blue-600/90 over a backdrop blur — backdrop filters on a table row are unreliable and a sticky row has to be opaque — and the brighter blue turned that dark hairline into an apparent outline. Measured in a headless browser: columns align to the pixel at 420/700/1600 wide, before and after scrolling fully right; the row stays pinned to the container bottom mid-scroll and at the end; it is exactly one row tall; and its bottom inset against the container is now 0px. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
33e8d50 to
1a40b8b
Compare
Celant
left a comment
There was a problem hiding this comment.
Reviewed the diff and verified the structural claims against main. All 13 checks are green.
The reasoning in the description holds up under checking, which is worth saying explicitly:
- The schema removal is safe.
PlayerLeaderboardEntryreally does have no consumer outside this component — the only other file mentioning it isApiSchemas.tswhere it's declared. And removing this one usage doesn't orphanRequiredClanTagSchema; it still has five other usages acrossApiSchemas.tsandClanApiSchemas.ts. - The column structure is consistent. colgroup 5 / thead 5 / tbody 5 / tfoot 5, and the colgroup's
4+12+6+6+6does come to the 34rem quoted in the description. Nothing to drift. - Moving to a
<tfoot>is the right call for the reason given —table-fixed w-fullresolves column widths against the container, so no separately-positioned element can track them across sizes. The horizontal-scroll case is the one that makes it not merely tidier but actually correct.
Two things below: one layout consequence I think is a small regression, and a missing test. Neither is blocking.
Description:
Two changes to the 1v1 Ranked leaderboard.
Clan tags removed
1v1 ranked is an individual ladder, and the tag the API returns is whichever one the player last happened to use in any game mode — it says nothing about the ranked results being listed. Dropped from the rows, from the pinned "your ranking" bar, and from the view model (
PlayerLeaderboardEntry, which is used only by this component).The pinned bar now lines up with the table
It was an overlay laid out by hand — flex boxes with
px-6/ml-4/w-20— instead of following the table it sits under. Measured in a headless browser at 1600px wide:Hand-picked padding cannot fix this: the table is
table-fixed w-full, so the resolved column widths grow with the modal and no fixed offset matches at more than one width.It is now the table's own sticky
<tfoot>, mirroring the<thead>that is already sticky. Sharing the table means the columns cannot drift, and the row follows horizontal scrolling — which matters below the colgroup's 34rem total, where the table scrolls sideways and an overlay outside.scroll-containerdid not move with it. At 420px wide, scrolling fully right desynced the pinned row by 126px and pushed its Win/Loss cell to x=545 against a container edge of 419, where it could not be reached at all. Thanks to the Codex bot for catching that one.Being in flow also removes the
pb-16spacer that existed only to keep the overlay off the last row.Verified in a headless browser: columns align to the pixel at 420 / 700 / 1600px wide, both unscrolled and scrolled fully right; the row stays pinned to the container bottom mid-scroll and at the end; and it is exactly one row tall.
The container's bottom border is dropped so the pinned row sits flush against that edge. That border is unchanged from
main, but the row is now solidbg-blue-600instead ofbg-blue-600/90over a backdrop blur —backdrop-filteron a table row is unreliable and a sticky row has to be opaque — and against the brighter blue the dark hairline read as a stray outline. Its bottom inset against the container measures 0px now, against 1px before.One judgment call worth a look: now that the columns line up, the bar also fills the Games and Win/Loss cells. Aligning the columns and then leaving two of them blank looked worse than filling them, and every value is already in
currentUserEntry. Easy to blank them again if you'd rather.before:

had a double hbar?
columns didnt align:

after:
Please complete the following:
No new user-facing strings — the bar reuses the existing
leaderboard_modal.your_ranking,leaderboard_modal.eloandleaderboard_modal.ratiokeys, soen.jsonis unchanged.Please put your Discord username so you can be contacted if a bug or regression is found:
w.o.n