Skip to content

fix: remove color palette from unsupported diagrams#61

Open
priyanshu88064 wants to merge 5 commits into
Fantastic-Computing-Machine:devfrom
priyanshu88064:remove_colorpalette_from_unsupported_diagrams
Open

fix: remove color palette from unsupported diagrams#61
priyanshu88064 wants to merge 5 commits into
Fantastic-Computing-Machine:devfrom
priyanshu88064:remove_colorpalette_from_unsupported_diagrams

Conversation

@priyanshu88064

Copy link
Copy Markdown

What changes were made

  • Diagram-Aware Node Detection: Updated [getNodeIdFromLine] to use regular expression based on the diagramType.
  • Support-Based Palette UI: Introduced SUPPORTED_COLOR_DIAGRAMS to restrict the color palette UI to diagram types that support standard style NODE fill:#color syntax.
  • Append-Only Style Management: Updated upsertNodeStyleLine to append new style directives to the end of the file instead of inserting them immediately after node definitions.

Why the changes were needed

  • Fix ER Diagram Bug: Fixed an issue where the relationship separator (:) was misidentified as a node ID in ER diagrams.
  • Prevent Invalid Syntax: Diagram types like Sequence Diagrams do not support standard style blocks hiding the palette for these types.
  • Preserve Block Structures: For diagrams with block-based definitions (like class Auth { ... }), inserting styles mid-file could break the block structure. Appending to the end of the file ensures the Mermaid syntax remains valid.

adiagarwalrock and others added 4 commits February 17, 2026 00:21
…docs

To prod: Harden Docker image, privilege drop, and refresh deployment docs
docs: Replace static screenshots with a GIF walkthrough in the README
…tralized configuration

feat: implement live sync infrastructure with pub/sub support and centralized configuration
@adiagarwalrock adiagarwalrock changed the base branch from master to dev May 1, 2026 16:45
@ZEROCONNECT

ZEROCONNECT commented May 2, 2026

Copy link
Copy Markdown
Contributor

@priyanshu88064 Please update getDiagramType so it matches Mermaid’s preprocessing before detecting the diagram type. In particular, strip YAML frontmatter and Mermaid init directives/comments before returning the first token. Otherwise valid diagrams with frontmatter render correctly but lose the color palette.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

3 participants