fix(playground): overlay run button for shared playground#712
fix(playground): overlay run button for shared playground#712OnkarRuikar wants to merge 7 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? |
|
75394a8 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 |
190c01b to
6222358
Compare
|
Ok now the button covers entire output iframe. And it appears like other buttons around: overlay_button_updated.mp4 |
There was a problem hiding this comment.
Thanks, UI is looking good, with these remaining nits:
- Use the same
border-radiusasmdn-play-runner(.25rem). - Use
flex-grow: 1likemdn-play-runner, and hide themdn-play-runnerconditionally if it the overlay button is shown (so that the button takes the same space, and we should no longer needposition: absolute,inset: ..., andz-index). - Use
border-color: currentcolorlikemdn-button.
|
I wonder if we could/should add a text in the button below the "Run" label along these lines:
|
@OnkarRuikar Let's also apply this change, to make it easier to identify the button as such. |
c8eb744 to
b84ca0d
Compare


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
or
https://fred-pr712.review.mdn.allizom.net/en-US/play?id=rCfusnHbQaseoVnpt5%2BOn3b12l6jKOf8oDyb9smSb5ueTnvaFpg87%2FSZ4fWjiysCSJBwRrmdXiMXJnTQ
UI changes
before change
After changes
Related issues and pull requests
#665