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

Load mermaid asynchronously in docs #8731

Merged
merged 1 commit into from
Aug 20, 2024

Conversation

voughtdq
Copy link
Contributor

@voughtdq voughtdq commented Aug 16, 2024

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#1941

Thanks 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.

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.
@CLAassistant
Copy link

CLAassistant commented Aug 16, 2024

CLA assistant check
All committers have signed the CLA.

@Benjamin-Philip
Copy link
Contributor

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

Once the workflow is approved, a preview will be deployed.

Maybe @garazdawi can help with that?

You can also just make docs and view the html docs locally yourself.

Copy link
Contributor

github-actions bot commented Aug 16, 2024

CT Test Results

    3 files    141 suites   49m 43s ⏱️
1 586 tests 1 536 ✅ 49 💤 1 ❌
2 287 runs  2 217 ✅ 69 💤 1 ❌

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

@Benjamin-Philip
Copy link
Contributor

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.

Copy link
Contributor

@Benjamin-Philip Benjamin-Philip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@voughtdq
Copy link
Contributor Author

@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?

@IngelaAndin IngelaAndin added the team:VM Assigned to OTP team VM label Aug 19, 2024
@garazdawi garazdawi self-assigned this Aug 19, 2024
@garazdawi garazdawi merged commit 2148554 into erlang:master Aug 20, 2024
16 of 18 checks passed
@garazdawi garazdawi added this to the OTP-27.1 milestone Aug 20, 2024
@garazdawi
Copy link
Contributor

Thanks!

@Benjamin-Philip
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:VM Assigned to OTP team VM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants