Highlight own player name and team in lobby modal#3468
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughLobby UI now highlights the current client: player rows and team cards get conditional border/background classes; two private helpers check current-player membership; CSS adds a Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📝 Coding Plan
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: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/client/components/LobbyPlayerView.ts`:
- Around line 243-246: Player item classes in LobbyPlayerView conditionally add
the "border border-sky-500/40" only for the current player, causing inconsistent
borders on team card player items; update the template class string (the
fragment that uses this.isCurrentPlayer(p)) so the border classes are present in
both branches (or move "border border-sky-500/40" outside the conditional and
only toggle the bg classes), ensuring the same border appears for current and
non-current player items while preserving the conditional background change.
- Around line 127-130: The current player row adds a visible border while
non-current rows don't, causing a 2px layout shift; in the class string built in
LobbyPlayerView (where the template uses this.isCurrentPlayer(client) to choose
classes) ensure the non-current branch includes a transparent border (e.g., add
"border border-transparent" alongside "bg-gray-700/70") so both branches have
the same border footprint and prevent layout shifts.
In `@src/client/styles.css`:
- Around line 305-308: The .player-tag.current-player rule adds a 1px border
causing a layout shift because .player-tag has no border; update the base
.player-tag style to include a matching 1px border that is transparent (e.g.,
border: 1px solid transparent) so toggling .current-player only changes
color/opacity and not the element size; target the .player-tag selector to make
this change so .player-tag.current-player can simply override the border color.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 0a393c3d-2635-4c37-ae41-98f975633533
📒 Files selected for processing (2)
src/client/components/LobbyPlayerView.tssrc/client/styles.css
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
Description:
This PR highlights own username and own team in lobby modal, to make it easy for players to track themselves.
It's also useful when your username gets changed by the profanity filter.
Based on this Discord suggestion
Screenshots
FFA (Public):
Teams (Public):
FFA (Private):
Teams (Private):
Please complete the following:
Please put your Discord username so you can be contacted if a bug or regression is found:
deshack_82603