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 Chart not loading in Popover #1570

Open
dvdmtw98 opened this issue Nov 5, 2024 · 1 comment
Open

Mermaid Chart not loading in Popover #1570

dvdmtw98 opened this issue Nov 5, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@dvdmtw98
Copy link

dvdmtw98 commented Nov 5, 2024

Describe the bug
The popover preview for pages do not load mermaid charts. The underlying code for the chart is shown.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Book Tracker
  2. Scroll to the "Non-Fiction" section (bottom). Look for "Mythos"
  3. Hover over the name of the book and wait for Popover to load
  4. Scroll down in the popover and see that Mermaid charts are not being rendered

Expected behavior
Mermaid charts should also render when viewed from the Popover.

Screenshots and Source

Desktop (please complete the following information):

  • Quartz Version: v4.4.0
  • node Version: v22.11.0
  • npm version: 10.4.0
  • OS: Windows 11
  • Browser Firefox, Edge

Additional context
Similar issue in #1303 but looks like OP has replaced the Mermaid charts with images on the site.

@dvdmtw98 dvdmtw98 added the bug Something isn't working label Nov 5, 2024
@aarnphm
Copy link
Collaborator

aarnphm commented Nov 5, 2024

This is expected, given that mermaid are only rendered in current dom

await mermaid.run({

maybe we can do this https://mermaid.js.org/config/usage.html#using-mermaid-run to query all node

Given that this is rendered after HTML is ready, and we didn't do any transclude, I can't see a way to support nested mermaid, unless we transclude these at build time.

Then again I don't really find a problem with popover in general.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants