Skip to content

fix(live-codeblock): add err boundary to live code block#8203

Closed
mturoci wants to merge 1 commit into
facebook:mainfrom
mturoci:fix/issue-8009
Closed

fix(live-codeblock): add err boundary to live code block#8203
mturoci wants to merge 1 commit into
facebook:mainfrom
mturoci:fix/issue-8009

Conversation

@mturoci

@mturoci mturoci commented Oct 11, 2022

Copy link
Copy Markdown
Contributor

Pre-flight checklist

  • I have read the Contributing Guidelines on pull requests.
  • If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

Invalid code in live code block should not crash the whole page, but just editor.

Test Plan

Manual.

Screen.Recording.2022-10-11.at.8.52.46.PM.mov

Test links

Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/

Related issues/PRs

Closes #8009

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Oct 11, 2022
@netlify

netlify Bot commented Oct 11, 2022

Copy link
Copy Markdown

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit 0c7d58e
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/6345baab2cf2a00009f408c2
😎 Deploy Preview https://deploy-preview-8203--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 site settings.

@github-actions

Copy link
Copy Markdown

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🟠 59 🟢 98 🟢 100 🟢 100 🟠 80 Report
/docs/installation 🟠 75 🟢 100 🟢 100 🟢 100 🟢 90 Report

@mturoci mturoci changed the title fix: Add err boundary to the live code block #8009. fix(live-codeblock): add err boundary to the live code block #8009. Oct 11, 2022
@Josh-Cena Josh-Cena changed the title fix(live-codeblock): add err boundary to the live code block #8009. fix(live-codeblock): add err boundary to live code block Oct 11, 2022
@slorber

slorber commented Oct 13, 2022

Copy link
Copy Markdown
Collaborator

Sorry but there's already a pending PR for that which looks better to what I want: only show the error in the live preview and keep the code block mounted:

image

#8015

@slorber slorber closed this Oct 13, 2022
@mturoci

mturoci commented Oct 13, 2022

Copy link
Copy Markdown
Contributor Author

Woops, didn't notice that PR. Sorry for the duplicate.

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

Labels

CLA Signed Signed Facebook CLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

undefined crashes live codeblock

3 participants