Mermaid-Chart / issue-tracker

Other
7 stars 1 forks source link

Theme Variable errors do not reevaluate, rendering the diagram unusable #49

Open javidigani opened 6 months ago

javidigani commented 6 months ago

Describe the bug Attempting to edit a theme variable as described here causes a permanent Diagram Syntax Error.

To Reproduce Steps to reproduce the behavior:

  1. Make sure diagram is in Auto-Sync mode.
  2. Copy the init block example from the Mermaid docs.
    %%{
    init: {
    'theme': 'base',
    'themeVariables': {
      'primaryColor': '#BB2528',
      'primaryTextColor': '#fff',
      'primaryBorderColor': '#7C0000',
      'lineColor': '#F8B229',
      'secondaryColor': '#006100',
      'tertiaryColor': '#fff'
    }
    }
    }%%
  3. Paste at the top of an existing diagram
  4. Modify themeVariables.primaryColor to #000000
  5. Diagram Syntax Error will be thrown #0
  6. Attempt to revert the changes via Undo, reloading the page, or restore from local history. You will see the error persist.
  7. Modifying any other part of the chart will not update.

Expected behavior Correcting the value or reverting the changes should resolve the error and make the diagram editable again.

Screenshots

Screenshot 2023-12-20 at 1 56 25 PM

Desktop:

Example Project ID: 56097012-032b-48b7-a61b-5539eadc57af Diagram: 81459204-83b7-4714-a924-86cad5fd0aab

jgreywolf commented 6 months ago

We are researching

jgreywolf commented 3 months ago

@javidigani Apologize for the delay in response. This should be resolved now, if you could please verify from your end? Thanks!