Skip to content

Comments

feat(theme-live-codeblock): reset button + wire position prop#11675

Merged
slorber merged 19 commits intofacebook:mainfrom
NPX2218:feat/add-reset-button-to-playground
Feb 19, 2026
Merged

feat(theme-live-codeblock): reset button + wire position prop#11675
slorber merged 19 commits intofacebook:mainfrom
NPX2218:feat/add-reset-button-to-playground

Conversation

@NPX2218
Copy link
Contributor

@NPX2218 NPX2218 commented Jan 20, 2026

Motivation

Adds a reset button to live code playgrounds that restores edited code to its original state. The button appears in the playground header alongside the Live Editor label.

Also wires properly the playground position prop

Closes #10711

Test Plan

CI + dogfood pages

Test links

Related issues/PRs

Closes #10711

Adds a reset button to live code playgrounds that restores edited code
to its original state. The button appears in the playground header
alongside the Live Editor label.

Closes facebook#10711
@meta-cla
Copy link

meta-cla bot commented Jan 20, 2026

Hi @NPX2218!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@netlify
Copy link

netlify bot commented Jan 20, 2026

[V2]

Name Link
🔨 Latest commit 9b52366
🔍 Latest deploy log https://app.netlify.com/projects/docusaurus-2/deploys/699738ef1d36290007afbfc5
😎 Deploy Preview https://deploy-preview-11675--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@meta-cla
Copy link

meta-cla bot commented Jan 20, 2026

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@meta-cla meta-cla bot added the CLA Signed Signed Facebook CLA label Jan 20, 2026
@NPX2218
Copy link
Contributor Author

NPX2218 commented Feb 7, 2026

Hi @slorber @Josh-Cena ! Just wanted to gently ping this PR. All checks have passed, and I'm happy to make any changes if needed. Thanks for your time reviewing!

@socket-security
Copy link

socket-security bot commented Feb 19, 2026

@slorber slorber added the pr: new feature This PR adds a new API or behavior. label Feb 19, 2026
@slorber slorber added the Argos Add this label to run UI visual regression tests. See argos.yml GH action. label Feb 19, 2026
@argos-ci
Copy link

argos-ci bot commented Feb 19, 2026

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ⚠️ Changes detected (Review) 4 changed, 1 added Feb 19, 2026, 4:31 PM

@slorber slorber changed the title feat(theme-live-codeblock): add reset button to live code playground feat(theme-live-codeblock): add reset button to live code playground + wire position prop Feb 19, 2026
@slorber slorber changed the title feat(theme-live-codeblock): add reset button to live code playground + wire position prop feat(theme-live-codeblock): reset button + wire position prop Feb 19, 2026
Copy link
Collaborator

@slorber slorber left a comment

Choose a reason for hiding this comment

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

LGTM now, but I had to do many changes, fix CI, and restore deleted but useful comments

This changes the display of the live codeblock header. Not sure all our users will appreciate that change, but I'm ok to get rid of the "dual color" header depending on the position. Next time please don't add a feature and change the design at the same time, it would be better to do both things in distinct PRs, easier to review.

@slorber slorber merged commit 49619fd into facebook:main Feb 19, 2026
44 of 46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Argos Add this label to run UI visual regression tests. See argos.yml GH action. CLA Signed Signed Facebook CLA pr: new feature This PR adds a new API or behavior.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Reset Button" option

2 participants