-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Load mermaid asynchronously in docs #8731
Conversation
If mermaid is synchronously loaded, a slow load can prevent the sidebar from displaying since it loads async and must wait for mermaid. Instead, load mermaid asynchronously and then call `mermaidLoaded()` when loading is finished.
Once the workflow is approved, a preview will be deployed. Maybe @garazdawi can help with that? You can also just |
CT Test Results 3 files 141 suites 49m 43s ⏱️ For more details on these failures, see this check. Results for commit 04fd4e9. ♻️ This comment has been updated with latest results. To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass. See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally. Artifacts// Erlang/OTP Github Action Bot |
In addition to this @voughtdq, would you be willing to port some diagrams to mermaid? I'll create an issue with all the modules to port. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@Benjamin-Philip not sure if I can commit a lot of time to it, but could you link an example or two so I can get a feel for what I'd be working with? |
Thanks! |
Hi @voughtdq, sorry about the delay... Here are a few later PRs I made: |
Submitting so this doesn't get forgotten.
If mermaid is synchronously loaded, a slow load can prevent the sidebar from displaying since it loads async and must wait for mermaid. Instead, load mermaid asynchronously and then call
mermaidLoaded()
when loading is finished. See elixir-lang/ex_doc#1941Thanks to @vlad-ngn and @Benjamin-Philip for finding/triaging this bug.
Can someone with the toolchain set up test to make sure it works? It works in the Elixir docs, but I haven't tested it for Erlang docs.