Update to Docusaurus 3.5.2 and render flowcharts #1601
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR:
@docusaurus/
-namespaced packages to the latest version 3.5.2.securityLevel
toloose
in the Mermaid config.Context
I noticed that in the production deployment, Mermaid flowchart diagrams don't render any of the text labels (see here and here).
Going back into the commit history, it looks like something in PR #1563 broke the text rendering of Mermaid flowcharts. The text displays properly in the first preview deployment of the PR, and doesn't display at all in the last preview deployment of the PR.
I first tried updating all Docusaurus packages to the latest version (which should be done anyway). When this didn't solve it, I inspected the DOM, and it looks like the text might be rendering as a
foreignObject
HTML element:Setting the
securityLevel
on Mermaid diagrams toloose
enables script elements and fixes the text rendering issue.Preview
https://metamask-docs-git-fix-diagrams-metamask-web.vercel.app/wallet/concepts/sdk/connections/#initial-connection-flow
Checklist
Complete this checklist before merging your PR: