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

Auto-document parameters available for all diagrams. #5542

Open
RokeJulianLockhart opened this issue May 24, 2024 · 1 comment
Open

Auto-document parameters available for all diagrams. #5542

RokeJulianLockhart opened this issue May 24, 2024 · 1 comment
Labels
Area: Documentation Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request

Comments

@RokeJulianLockhart
Copy link

RokeJulianLockhart commented May 24, 2024

Proposal and Example

As https://github.com/orgs/mermaid-js/discussions/5135#discussion-5951285 states:

Initially I was going to post "Document ability for ER diagram to use layoutDirection" but it seems like this is a more general need across the package.

ER diagrams of a hierarchical system can get very very tall. Sometimes that doesn't fit with inline examples, eg. between paragraphs where you might want to layout a few entities horizontally to show their relationship.

The ER plot has a pretty well documented config object here, where layoutDirection is supported:

layoutDirection?: string | 'TB' | 'BT' | 'LR' | 'RL';

but that's not shown anywhere in the docs. Instead only the fill and stroke fields are documented. I don't have time at the moment to look through how the documentation is generated, but it seems like it should be straightforward to autogenerate a table from the config object itself so the docs don't go out of sync with the library.

Screenshots

No response

@RokeJulianLockhart RokeJulianLockhart added Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request labels May 24, 2024
@nirname
Copy link
Contributor

nirname commented Jun 19, 2024

It is there https://mermaid.js.org/config/schema-docs/config.html, but obviously people cannot find it, because it is at a separate page
image

So my point that this documentation must be either referenced from diagram specific pages or referenced & embedded simultaneously. But there are some global options that are not diagram-related, so we need to keep this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Documentation Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants