Skip to content

Conversation

@OnkarRuikar
Copy link
Contributor

@OnkarRuikar OnkarRuikar commented Sep 5, 2025

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.

@OnkarRuikar that's ok, but given how unusual it is to look at a playground and not see the result, I feel this will be the likely first interaction on the page, so it need to be big and cover the canvas, and be easy to resolve.

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

@OnkarRuikar OnkarRuikar requested a review from a team as a code owner September 5, 2025 11:43
Copy link
Member

@LeoMcA LeoMcA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@OnkarRuikar
Copy link
Contributor Author

could we use the same icon we use in the top nav next to the playground link,

Done. Used the circle-play icon.

obviously a little bigger,

Made the size bigger and responsive.

so it's almost like a video play icon overlay?

We play videos and run code so shouldn't it be called "MDN Runground"? 🤔
To not give false impression of existence video content in the output, can we use " ▶ Run" instead of just the icon?

playRun.mp4

@OnkarRuikar OnkarRuikar requested a review from LeoMcA September 15, 2025 06:55
@LeoMcA
Copy link
Member

LeoMcA commented Sep 15, 2025

Let me... "Run" this past our content team and see what they think

@LeoMcA LeoMcA added the needs content decision This issue needs a decision from the MDN Content Team before it can proceed. label Sep 15, 2025
@caugner
Copy link
Contributor

caugner commented Sep 15, 2025

I could imagine making the button smaller, and adding some sort of warning below, so that the user understands the risks of pressing run.

@OnkarRuikar
Copy link
Contributor Author

OnkarRuikar commented Sep 16, 2025

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?

5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs content decision This issue needs a decision from the MDN Content Team before it can proceed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve discoverability of "Run" action for Playground links

3 participants