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

Mermaid Diagrams Not Rendering in Diagram Guide #49446

Open
niranjandarshann opened this issue Jan 15, 2025 · 16 comments
Open

Mermaid Diagrams Not Rendering in Diagram Guide #49446

niranjandarshann opened this issue Jan 15, 2025 · 16 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. language/en Issues or PRs related to English language needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/docs Categorizes an issue or PR as relevant to SIG Docs.

Comments

@niranjandarshann
Copy link
Contributor

Description
Mermaid diagrams in the diagram-guide folder are not rendering when the site is served.Instead of displaying the expected diagrams, a blank space is shown.

Steps to Reproduce:

Clone the kubernetes/website repository.
Navigate to the diagram-guide folder.
Start the local server using hugo server.
Observe that Mermaid diagrams are missing, replaced by blank spaces.

Expected Behavior:
The Mermaid diagrams should render correctly, showing the visual representation of the diagrams as intended.

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Jan 15, 2025
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

SIG Docs takes a lead on issue triage for this website, but any Kubernetes member can accept issues by applying the triage/accepted label.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@niranjandarshann
Copy link
Contributor Author

/kind bug
/language en
/sig docs

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. language/en Issues or PRs related to English language sig/docs Categorizes an issue or PR as relevant to SIG Docs. labels Jan 15, 2025
@niranjandarshann
Copy link
Contributor Author

Page Related issue : https://kubernetes.io/docs/contribute/style/diagram-guide/

Snapview of the page

Image

@niranjandarshann
Copy link
Contributor Author

Here after Figure1 there is blank space inside box instead of Figure.

@aakankshabhende
Copy link
Member

@niranjandarshann This seems to work fine for me. Could you please try again after a hard refresh?

Image

@sftim
Copy link
Contributor

sftim commented Jan 15, 2025

Folks, please note the name and version of the web browsers you're using.

@aakankshabhende
Copy link
Member

Google chrome v131

@niranjandarshann
Copy link
Contributor Author

Is this vary from version of the web browser we are using?

@shurup
Copy link
Member

shurup commented Jan 16, 2025

I'm experiencing the same issue. It's more general for mermaid diagrams throughout the website. E.g., here's what I see on this page:

Image

My browser is Firefox 133.0.3 (64-bit) / Linux (from Mozilla snap for Ubuntu). Interestingly, this issue is reproduced randomly if I refresh the page, meaning that sometimes I can see the figures, but sometimes not.

The same figures always render fine in my Google Chrome/Linux.

@niranjandarshann
Copy link
Contributor Author

What i think is this not looks good as image depends on version of browser think about New readers who may visit the site first time he/she dont know whether to use the updated browser or not in case readers have the old browser then it look not good . We should think on it. As i several times faced the issue.
folks,WDYT!

@shurup
Copy link
Member

shurup commented Jan 16, 2025

The bug persists in my local website setup as well. I thought it could be caused by a JS error produced by banner-dismiss.js, but that doesn't seem to be a culprit (I'll open another issue for that a bit later though).

Thus, it could be a Mermaid-related problem (such as mermaid-js/mermaid#6112). What surprised me was that while we have the assets/js/mermaid-10.6.1.min.js file in the repo, the actual library in use seems to be <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/mermaid.min.js" ... in the layouts/partials/scripts.html, am I correct?

@sftim
Copy link
Contributor

sftim commented Jan 16, 2025

Is this a duplicate of #49053?

@sftim
Copy link
Contributor

sftim commented Jan 16, 2025

What surprised me was that while we have the assets/js/mermaid-10.6.1.min.js file in the repo, the actual library in use seems to be <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/mermaid.min.js" ... in the layouts/partials/scripts.html, am I correct?

We recently switched to Docsy 0.6 and to loading Mermaid from a CDN, the way that Docsy 0.6 does it.
We could remove our local vendored Mermaid and rely on Docsy's Mermaid support.

@niranjandarshann
Copy link
Contributor Author

The bug persists in my local website setup as well. I thought it could be caused by a JS error produced by banner-dismiss.js, but that doesn't seem to be a culprit (I'll open another issue for that a bit later though).

Thus, it could be a Mermaid-related problem (such as mermaid-js/mermaid#6112). What surprised me was that while we have the assets/js/mermaid-10.6.1.min.js file in the repo, the actual library in use seems to be <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/mermaid.min.js" ... in the layouts/partials/scripts.html, am I correct?

yes , Exactly

@niranjandarshann
Copy link
Contributor Author

Is this a duplicate of #49053?

Yes that issue is also related to mermaid diagram

@shurup
Copy link
Member

shurup commented Jan 16, 2025

We recently switched to Docsy 0.6 and to loading Mermaid from a CDN, the way that Docsy 0.6 does it.
We could remove our local vendored Mermaid and rely on Docsy's Mermaid support.

Thanks for this clarification! JFYI: according to my local tests, even updating Mermaid to its latest release (v11.4.1) doesn't bring any magic. I'm still experiencing the same issue in Firefox.

Perhaps we'd better close this issue in favour of the one created earlier?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. language/en Issues or PRs related to English language needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/docs Categorizes an issue or PR as relevant to SIG Docs.
Projects
None yet
Development

No branches or pull requests

5 participants