Fix achievement badges visibility on desktop in game-stats.njk#523
Draft
Copilot wants to merge 2 commits into
Draft
Fix achievement badges visibility on desktop in game-stats.njk#523Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
Copilot
AI
changed the title
[WIP] Fix inconsistent indentation and visibility bug for game stats
Fix achievement badges visibility on desktop in game-stats.njk
Jun 11, 2026
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.
#achievement-badgesstarted withhidden sm:flexas static classes. Sincesm:flexhas higher specificity thanhidden, togglinghiddenvia JS was a no-op onsm+screens — the container was always visible on desktop regardless of whether any badges were earned.Changes
sm:flexfrom the static class list so the element starts fully hidden everywherebadgeContainer.innerHTML = ""to clear stale content on re-renderbadgeCountas badges are appendedclassList.toggle("sm:flex", badgeCount > 0)— dynamically applies responsive visibility only when badges existResult: container is hidden everywhere when no badges are earned; hidden on mobile and visible as flex on
sm+when badges exist.