fix(playground): overlay run button for shared playground#712
fix(playground): overlay run button for shared playground#712OnkarRuikar wants to merge 5 commits intomdn:mainfrom
Conversation
LeoMcA
left a comment
There was a problem hiding this comment.
I like the implementation, I think the design could be a little better - could we use the same icon we use in the top nav next to the playground link, obviously a little bigger, so it's almost like a video play icon overlay?
c0bf2cf to
9149452
Compare
Done. Used the
Made the size bigger and responsive.
We play videos and run code so shouldn't it be called "MDN Runground"? 🤔 playRun.mp4 |
|
Let me... "Run" this past our content team and see what they think |
|
I could imagine making the button smaller, and adding some sort of warning below, so that the user understands the risks of pressing run. |
"Risk of pressing run", we don't want to scare users so much that they won't even run the code. We already have report banner at the top, how about we reword it like the following? |
|
ef1e47d was deployed to: https://fred-pr712.review.mdn.allizom.net/ |
caugner
left a comment
There was a problem hiding this comment.
The button seems to overflow weirdly now.
Could the button take the whole area of the iframe, and look like the other buttons on the page in terms of border/background color and hover effect?
@caugner Do you mean without the white padding around? Like the following: overlay_button_white-2026-03-19_08.15.53.mp4For dark theme it's a bit tricky, because the button sits on top of a white iframe. So we need to set the background color manually. What theme color variable should I use for |
Yes, exactly like that.
Could we use |

Description
Need a prominent Run button on canvas for shared playgrounds because the shared code could be untrustworthy.
Motivation
In the current state it is not apparent that users are supposed to click run button to get the output and begin autorun for the shared playgrounds.
It was requested to have big button spanning the entire canvas.
Additional details
For testing used this link: http://localhost:3000/en-US/play?id=rCfusnHbQaseoVnpt5%2BOn3b12l6jKOf8oDyb9smSb5ueTnvaFpg87%2FSZ4fWjiysCSJBwRrmdXiMXJnTQ
After changes UI:
runButton.mp4
Related issues and pull requests
#665