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

docs: use Mermaid diagram for routing page #8335

Merged
merged 2 commits into from
Nov 16, 2022
Merged

docs: use Mermaid diagram for routing page #8335

merged 2 commits into from
Nov 16, 2022

Conversation

Mysterious-Dev
Copy link
Contributor

@Mysterious-Dev Mysterious-Dev commented Nov 14, 2022

Pre-flight checklist

Motivation

By the addition of mermaid in 2.2.0, somes image can be remplaced by mermaid graph.

Before :

image

After :

image

Test links

Deploy preview: https://deploy-preview-8335--docusaurus-2.netlify.app/docs/advanced/routing/

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Nov 14, 2022
@netlify
Copy link

netlify bot commented Nov 14, 2022

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit 1963e5a
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/6375101968e732000837b222
😎 Deploy Preview https://deploy-preview-8335--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

github-actions bot commented Nov 14, 2022

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🟢 92 🟢 97 🟢 100 🟢 100 🟢 90 Report
/docs/installation 🟠 80 🟢 100 🟢 100 🟢 100 🟢 90 Report

@slorber slorber added the pr: documentation This PR works on the website or other text documents in the repo. label Nov 16, 2022
@slorber
Copy link
Collaborator

slorber commented Nov 16, 2022

Why not 🤷‍♂️ any opinion @Josh-Cena ?

What I don't like is that the Mermaid diagram is generated client-side and produce layout shifts (+ no caching):

I'm not 100% sure it improves the user experience, but I'm not against this change either

@Josh-Cena
Copy link
Collaborator

I like the change 👍 It means smaller assets, better maintainability (we can easily edit the diagrams in the future without me sharing my TeX source code and asking you to compile it to PDF then to PNG), and some dogfooding. If the UX is not great, that's a general problem of all Mermaid diagrams, but if that didn't prevent us from shipping the feature, it shouldn't prevent us from using it either.

@Mysterious-Dev Remember to remove the existing assets, though. We don't need them anymore. (You can also edit the versioned docs so we can safely remove them from the project)

@slorber
Copy link
Collaborator

slorber commented Nov 16, 2022

Agree 👍

Let's dogfood this. It should also improve the ability to translate the diagram.

If I don't like the experience I can just improve it later 🤪

@Mysterious-Dev waiting for your update before merging

@slorber slorber changed the title Use mermaid for routing page docs: use Mermaid diagram for routing page Nov 16, 2022
@Mysterious-Dev
Copy link
Contributor Author

Mysterious-Dev commented Nov 16, 2022

@slorber Done (for files & older versions).

@slorber slorber merged commit 57c632b into facebook:main Nov 16, 2022
@Mysterious-Dev Mysterious-Dev deleted the mermaid_doc branch November 16, 2022 16:49
This was referenced Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: documentation This PR works on the website or other text documents in the repo.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants