Fix gallery play page#4076
Open
anirban185 wants to merge 2 commits into
Open
Conversation
|
@anirban185 is attempting to deploy a commit to the Hack Club Team on Vercel. A member of the Team first needs to authorize it. |
|
[Auto Triage] PR detected. Apply |
anirban185
marked this pull request as ready for review
July 18, 2026 02:35
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.
Fixes #3467
Hi, I picked up this issue and here's what I found and what I did about it.
When you click on a game in the gallery to play it, there's only a "Remix Game" button, there's no way to just view the code without remixing it first, which was kind of the original point of the issue. So I added a button for that.
I also checked it on a 1366x768 screen (a pretty normal laptop resolution) and the bottom part of the game screen was getting cut off, including the control buttons. So on a smaller screen you couldn't actually press some of the buttons, which is obviously not great.
What I changed:
Added a "View Code" button next to the Remix button, so you can see the code without having to remix the game first. It only shows up for actual gallery games though, since remixed or saved games don't have a real code page, so I hid the button for those.
The game screen was stuck at a fixed 800px height no matter what your screen size was, which is why it didn't fit on smaller screens. I changed it so it resizes based on the actual screen instead of being a fixed number.
For testing, I don't have git set up locally so I edited everything directly through GitHub's website. I tested it using the Vercel preview link that gets generated automatically for PRs here, which I didn't know about until now but it worked well. I checked a normal game and the button showed up and worked, checked a remixed game and the button correctly didn't show up, and then shrunk my browser down to 1366x768 and everything showed up properly this time, buttons included.
This is one of my first contributions here, so let me know if anything's off or if I should've approached it differently.