platform icon indicating copy to clipboard operation
platform copied to clipboard

Mermaid diagrams don't always render

Open mgmorcos opened this issue 1 year ago • 1 comments

Description of the issue

A clear and concise description of the issue.

Your environment

  • Version of Huly 0.6.388
  • Browser (and version) Desktop version
  • Your operating system (and version) MacOS Sequoia

Steps to reproduce

  1. Add 'Diagram' block to document.
  2. Enter valid Mermaid syntax into Mermaid block.

Expected behaviour

Always see rendered Mermaid diagram

Actual behaviour

Sometimes only see Mermaid syntax

mgmorcos avatar Dec 29 '24 02:12 mgmorcos

Problem

I confirmed that Mermaid diagrams are not always rendered in documents within the Huly platform. Even a user copies Mermaid syntax of a successful rendered diagram and makes a duplicate, the new block often fails to render. Since the syntax of the diagram are same, the rendering problem seems to be in the diagram block itself, not its content.

Why this matters

  • Inconsistent diagram rendering confuses users and disrupts documentation workflows.
  • The inability to predict rendering behavior makes it difficult to create reliable guides or templates for users.

Environment

  • https://huly.app/

Observations

  • Even valid diagram syntax is not rendered always.
  • While trying to replicate a successful rendered diagram block, the duplicate is not rendered - only the text is displayed.
  • The problem appears to be related to the block structure or metadata, not the diagram content itself.
  • The conditions for successful rendering are unclear and may depend on block state, source, or hidden metadata.

Suggested Solution

  • Investigate how diagram blocks are detected and rendered in documents.
  • Ensure that any valid Mermaid diagram block, is consistently rendered.
  • Document the logic or requirements for block rendering so users can avoid this problem.

Steps to Reproduce

  1. Create a Mermaid diagram in a markdown document and verify that it is rendered.
  2. Try to replicate the successful rendered diagram
  3. Observe that the diagram does not always render, even though the syntax is valid and same to the successful rendered diagram

Expected Behavior

  • Any valid Mermaid code block should always render as a diagram

Actual Behavior

  • Diagram blocks do not always render. Sometime only their code is shown.

AungDev avatar Sep 06 '25 18:09 AungDev