feat(theme-live-codeblock): reset button + wire position prop#11675
feat(theme-live-codeblock): reset button + wire position prop#11675slorber merged 19 commits intofacebook:mainfrom
position prop#11675Conversation
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
|
Hi @NPX2218! Thank you for your pull request and welcome to our community. Action RequiredIn 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. ProcessIn 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 If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
✅ [V2]
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
|
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! |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
position prop
position propposition prop
slorber
left a comment
There was a problem hiding this comment.
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.
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
positionpropCloses #10711
Test Plan
CI + dogfood pages
Test links
https://deploy-preview-11675--docusaurus-2.netlify.app/docs/markdown-features/code-blocks#interactive-code-editor
https://deploy-preview-11675--docusaurus-2.netlify.app/tests/pages/live-playground-tests
Related issues/PRs
Closes #10711