Hide outcome row until a game outcome exists (player-vs-bot and player-vs-player)#784
Closed
Copilot wants to merge 3 commits into
Closed
Hide outcome row until a game outcome exists (player-vs-bot and player-vs-player)#784Copilot wants to merge 3 commits into
Copilot wants to merge 3 commits into
Conversation
Copilot
AI
changed the title
[WIP] Hide outcome field when no outcome is present
Hide player-vs-bot outcome row until a game outcome exists
Jun 9, 2026
Contributor
Author
Copilot
AI
changed the title
Hide player-vs-bot outcome row until a game outcome exists
Hide outcome row until a game outcome exists (player-vs-bot and player-vs-player)
Jun 9, 2026
benckx
reviewed
Jun 13, 2026
| <td class="values"><span id="info-variant"></span></td> | ||
| </tr> | ||
| <tr> | ||
| <tr id="info-outcome-row" style="display: none"> |
Contributor
Author
There was a problem hiding this comment.
The player_vs_bot.html page doesn't load a dedicated CSS stylesheet, and it already uses inline style="display: none" for the analogous info-variant-row (line 53) and the actions box (line 68). So keeping it inline here is consistent with the existing page convention. I left it as-is, but happy to introduce a player-vs-bot.css (mirroring player-vs-player.css) and move these rules there if you'd prefer the CSS approach.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Outcome field in the player-vs-bot game info box was always shown, even while a game was in progress with no outcome yet (displaying a placeholder
--). This mirrors the behavior already implemented for player-vs-player.Changes
player_vs_bot.html: Addedid="info-outcome-row"andstyle="display: none"to the Outcome<tr>, hiding it by default (consistent with the page's variant row).player-vs-bot-page.js:#updateOutcomeLabel()now tracks whether a real outcome exists (canceled, win, loss, or draw) and toggles the row visibility. As this runs on game load and every outcome update, the row appears reactively once the game finishes.player_vs_player_game.html: Defined the outcome row's hidden default inline viastyle="display: none", consistent with the player-vs-bot row.player-vs-player.css: Removed the now-redundanttr#outcome-rowrule, since the hidden default is defined in the template. The existing JS toggle continues to show the row only once an outcome is known.changelog.html: Added an entry for this change.