Conversation
WalkthroughA UI refinement of the game mode selector adjusts grid layout dimensions, simplifies special lobby card rendering, reorders quick action items, and reduces the maximum container width constraint across the layout. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 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.
Pull request overview
Adjusts the UI layout to make the main content column narrower and rebalances the Game Mode Selector grid arrangement.
Changes:
- Reduced the main layout’s max width on large screens.
- Tweaked the Game Mode Selector grid proportions/height and rearranged lobby card placement.
- Simplified the “special” lobby card title handling and removed the related i18n key.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/client/components/MainLayout.ts | Narrows the large-screen max content width. |
| src/client/GameModeSelector.ts | Rebalances grid sizing and changes special/FFA card placement and special title rendering. |
| resources/lang/en.json | Removes the mode_selector.special_title translation key tied to prior special card title rendering. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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/GameModeSelector.ts`:
- Around line 97-105: The large-screen grid currently always forces two rows and
a fixed height, causing compressed cards when special is absent; update the
template that renders the container (the element with class "grid ...
lg:grid-rows-2 lg:h-[22rem]") to choose classes based on the presence of the
special variable: if special is truthy keep "lg:grid-rows-2" and the taller
"lg:h-[22rem]" and render the special card with the existing lg:row-span-2
(renderSpecialLobbyCard), otherwise use "lg:grid-rows-1" and a shorter height
(or no fixed height) so that renderLobbyCard (used for ffa via
renderLobbyCard(ffa, getLobbyTitle(ffa)) and teams) fill the space normally;
ensure the conditional class logic is applied where the grid string is
constructed so layout adjusts when special is missing.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 46c940bf-4d0f-444f-9ad8-c5494700050a
📒 Files selected for processing (3)
resources/lang/en.jsonsrc/client/GameModeSelector.tssrc/client/components/MainLayout.ts
💤 Files with no reviewable changes (1)
- resources/lang/en.json
| class="grid grid-cols-1 lg:grid-cols-[2fr_1fr] lg:grid-rows-2 gap-4 lg:h-[22rem]" | ||
| > | ||
| ${ffa | ||
| ${special | ||
| ? html`<div class="lg:row-span-2"> | ||
| ${this.renderLobbyCard(ffa, this.getLobbyTitle(ffa))} | ||
| ${this.renderSpecialLobbyCard(special)} | ||
| </div>` | ||
| : nothing} | ||
| ${ffa ? this.renderLobbyCard(ffa, this.getLobbyTitle(ffa)) : nothing} | ||
| ${teams |
There was a problem hiding this comment.
Handle the no-special case in the large-screen grid.
On Line 97, the layout always forces two rows with fixed height. When special is missing (Lines 99-103), the second row is empty and FFA/Teams cards render compressed. Please make rows/height conditional on special.
💡 Proposed fix
- <div
- class="grid grid-cols-1 lg:grid-cols-[2fr_1fr] lg:grid-rows-2 gap-4 lg:h-[22rem]"
- >
+ <div
+ class="grid grid-cols-1 lg:grid-cols-[2fr_1fr] gap-4 ${special ? "lg:grid-rows-2 lg:h-[22rem]" : "lg:grid-rows-1"}"
+ >🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/client/GameModeSelector.ts` around lines 97 - 105, The large-screen grid
currently always forces two rows and a fixed height, causing compressed cards
when special is absent; update the template that renders the container (the
element with class "grid ... lg:grid-rows-2 lg:h-[22rem]") to choose classes
based on the presence of the special variable: if special is truthy keep
"lg:grid-rows-2" and the taller "lg:h-[22rem]" and render the special card with
the existing lg:row-span-2 (renderSpecialLobbyCard), otherwise use
"lg:grid-rows-1" and a shorter height (or no fixed height) so that
renderLobbyCard (used for ffa via renderLobbyCard(ffa, getLobbyTitle(ffa)) and
teams) fill the space normally; ensure the conditional class logic is applied
where the grid string is constructed so layout adjusts when special is missing.
Description:
changes layout to make special to be main card, reverts to 20cm
Please complete the following:
Please put your Discord username so you can be contacted if a bug or regression is found:
w.o.n