Skip to content

Change layout slightly#3358

Closed
ryanbarlow97 wants to merge 1 commit intomainfrom
layoutchange
Closed

Change layout slightly#3358
ryanbarlow97 wants to merge 1 commit intomainfrom
layoutchange

Conversation

@ryanbarlow97
Copy link
Contributor

@ryanbarlow97 ryanbarlow97 commented Mar 5, 2026

Description:

changes layout to make special to be main card, reverts to 20cm

image

Please complete the following:

  • I have added screenshots for all UI updates
  • I process any text displayed to the user through translateText() and I've added it to the en.json file
  • I have added relevant tests to the test directory
  • I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced

Please put your Discord username so you can be contacted if a bug or regression is found:

w.o.n

Copilot AI review requested due to automatic review settings March 5, 2026 20:48
@ryanbarlow97 ryanbarlow97 requested a review from a team as a code owner March 5, 2026 20:48
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 5, 2026

Walkthrough

A 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

Cohort / File(s) Summary
Translation Strings
resources/lang/en.json
Removed the mode_selector.special_title translation key ("Special Mix"); no other translation changes.
Game Mode Selector Layout
src/client/GameModeSelector.ts
Modified grid structure from [3fr_2fr] to [2fr_1fr] with reduced height (28rem → 22rem); reordered special lobby rendering to use lg:row-span-2; simplified special lobby title rendering; repositioned ranked action card after "Create" action instead of before it.
Main Layout Container
src/client/components/MainLayout.ts
Reduced maximum width constraint from lg:max-w-[24cm] to lg:max-w-[20cm] for the inner content container.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

✨ A layout dance, refined with care,
Grid columns shift, responsive and fair,
Cards reorder, titles trim clean,
Narrower bounds for a smoother scene! 🎮

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Change layout slightly' is vague and generic, using non-descriptive language that doesn't convey the specific nature of the layout changes. Make the title more specific by describing the key change, such as 'Redesign game mode selector layout with special lobby as main card' or 'Update layout dimensions and special lobby prominence'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description is related to the changeset, explaining that the layout was changed to make special lobby the main card and reverting to 20cm width, with supporting screenshot.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ryanbarlow97 ryanbarlow97 added this to the v30 milestone Mar 5, 2026
@ryanbarlow97 ryanbarlow97 added the UI/UX UI/UX changes including assets, menus, QoL, etc. label Mar 5, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between b3c01d4 and 59f46b1.

📒 Files selected for processing (3)
  • resources/lang/en.json
  • src/client/GameModeSelector.ts
  • src/client/components/MainLayout.ts
💤 Files with no reviewable changes (1)
  • resources/lang/en.json

Comment on lines +97 to 105
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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.

@github-project-automation github-project-automation bot moved this from Triage to Development in OpenFront Release Management Mar 5, 2026
@github-project-automation github-project-automation bot moved this from Development to Complete in OpenFront Release Management Mar 5, 2026
@ryanbarlow97 ryanbarlow97 deleted the layoutchange branch March 5, 2026 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

UI/UX UI/UX changes including assets, menus, QoL, etc.

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

2 participants