Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(playground): add Reset button #10934

Merged
merged 6 commits into from
May 2, 2024
Merged

Conversation

caugner
Copy link
Contributor

@caugner caugner commented Apr 17, 2024

Summary

(MP-1064)

Problem

When opening a shared Playground, or a live sample from content, and modifying the code, there is only a "Clear" button (previously called "Reset"), but there is no way to revert the modifications.

Solution

Add a "Reset" button that resets the content to the inital values (from the shared Playground or the live sample).


Screenshots

Before

image

After

image

How did you test this change?

Tested on stage with these examples:

  1. Shared Playground: https://developer.allizom.org/en-US/play?id=krBvhed4aAA6wn%2F0nqfjWEW99%2FLqXNlfZlZMhoXuxrfzOMq8JYxyYk3e%2FrMFfiEyeh%2BqYm8ZS7EVLPp6
  2. Live Sample: https://developer.allizom.org/en-US/docs/Web/CSS/background-image#layering_background_images

After loading, I changed some code, clicked the "Reset" button, confirmed, and verified that the original version of the Playground Share / Live Sample was shown again.

@github-actions github-actions bot added the merge conflicts 🚧 Please rebase onto or merge the latest main. label Apr 23, 2024
Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@caugner caugner force-pushed the add-playground-reset-button branch from bad0370 to 4d8d0ee Compare April 24, 2024 10:45
@github-actions github-actions bot removed the merge conflicts 🚧 Please rebase onto or merge the latest main. label Apr 24, 2024
@caugner caugner marked this pull request as ready for review April 30, 2024 18:13
@caugner caugner requested a review from a team as a code owner April 30, 2024 18:13
Copy link
Contributor Author

@caugner caugner left a comment

Choose a reason for hiding this comment

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

Self-approval, as the changes are straight-forward and the feature was already QA'd.

@caugner caugner merged commit d316348 into main May 2, 2024
15 checks passed
@caugner caugner deleted the add-playground-reset-button branch May 2, 2024 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant