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

🚀 ADR: Support for MermaidJS diagrams #1866

Open
2 tasks done
dylanjustice opened this issue Nov 6, 2024 · 1 comment
Open
2 tasks done

🚀 ADR: Support for MermaidJS diagrams #1866

dylanjustice opened this issue Nov 6, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@dylanjustice
Copy link

Plugin Name

adr

🔖 Feature description

Support mermaidjs diagram rendering from code fences in ADRs.

🎤 Context

Allow teams to include diagrams, architectural or flow, to help illustrate proposed changes or implementation details of their ADRs. Examples could include;

  • Logical Flow Diagrams
  • Class diagrams (C4)
  • Architectural diagrams

✌️ Possible Implementation

Create a custom marked extension to pick up code fence tokens indicating mermaid as the language type.
Marked Code Preview and Marked JSX Renderer are pretty close to what I'm thinking, but for mermaid.

parseMadrWithFrontmatter would implement the extension when parsing, marked.use(mermaidExtension).

Not sure what the implementation would look like, but a nice way to make the plugin more extensible would be to allow consumers of the plugin to provide their own extensions through the <EntityAdrContent /> component or register them in the adr-backend.

👀 Have you spent some time to check if this feature request has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Are you willing to submit PR?

Yes I am willing to submit a PR!

@dylanjustice dylanjustice added the enhancement New feature or request label Nov 6, 2024
@dylanjustice
Copy link
Author

Looking at this again. Could this be done with a custom content decorator?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant