-
Notifications
You must be signed in to change notification settings - Fork 250
Don't show Max Player slider if Min players == Max players #9929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Don't show Max Player slider if Min players == Max players #9929
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates the Create Game modal so that the “Max Players” slider is only shown when the configured minimum and maximum player counts differ.
Changes:
- Wraps the “Max Players” slider in a conditional so it is only rendered when
MinPlayers != MaxPlayers. - Leaves all backing logic (
Players,MaxPlayers,MinPlayers, cookie handling, andOnSave) unchanged.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @if ( MinPlayers != MaxPlayers ) | ||
| { | ||
| <div class="entry"> | ||
| <div class="is-label">Max Players</div> | ||
| <div class="control"> | ||
| <SliderControl class="glass with-grow" Value:bind=@Players Min=@MinPlayers Max=@MaxPlayers Step=@(1) ShowTextEntry=@true /> |
Copilot
AI
Jan 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conditionally hiding the Max Players slider when MinPlayers == MaxPlayers solves the UI issue, but it doesn’t actually enforce that fixed player count in the data that gets saved and passed to CreateGameResults. If a user has an existing cookie from when MinPlayers and MaxPlayers differed, Output.MaxPlayers (and thus Players) can still hold an out-of-range value even though the slider is now hidden, which contradicts the intent of always using the fixed player count for these games. Consider explicitly forcing Players to MinPlayers when MinPlayers == MaxPlayers (e.g. on initialization and/or in OnSave) so that stale cookie values cannot override the package’s fixed player count.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be a separate change, since this can happen with regular use as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
This PR modifies the Create Game modal to only show the Max players slider if it's meaningful.
Motivation & Context
One of my games, Quality Riichi Mahjong has a minimum players of 4 and a maximum players of 4.
When you get the Create Game popup for this game, you get a Max players slider where both the min and max is 4, and so it does not move.
I feel it's appropriate that if you've set up your project settings so that min and max players are the same, then you should always use that number as the player count.
Screenshots / Videos (if applicable)
Before:
s.box.-.2026-01-29.4-01-29.PM.mp4
After:

Other games remain unaffected:

Checklist