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

Provide mermaid diagram of relation between BIDS schema, specification and validators #626

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

yarikoptic
Copy link
Contributor

@yarikoptic yarikoptic commented Feb 21, 2025

This is based of the mermaid diagrams in the blog post we have: https://bids-website.readthedocs.io/en/latest/blog/2024/11/13/bids-validator-2.html and the goal is to give a visual depiction of relations between the components mentioned on this page and elsewhere.

Here is a screenshot of preview. I do agree that text is a bit small'ish, so we might want to prune it but it is quite usable and IMHO useful... May be there is a way to make it "full screen"?

version1: horizontal, harder to read, no zooming etc

image

version2: vertical

image

version3: removed bids-apps and stats-models:

image

…n and validators

This is based of the mermaid diagrams in the blog post we have:
https://bids-website.readthedocs.io/en/latest/blog/2024/11/13/bids-validator-2.html
and the goal is to give a visual depiction of relations between the components
mentioned on this page and elsewhere.
@Remi-Gau
Copy link
Contributor

I would remove the legacy validator from that diagram.
Will simplify the whole thing.

@Remi-Gau
Copy link
Contributor

The preview on read the docs shows a mermaid syntax error.

This does not mean there is a real syntax error but that's the kind of problem when I was trying to use some of the more advanced mermaid features with mkdocs.

@effigies
Copy link
Contributor

@yarikoptic
Copy link
Contributor Author

  • it is likely the requirement to have newer mkdocs-material ... learning about us using pip-compile... let's see if helps

  • re legacy one: I think it might still be worth being there for a year or so since many could still "relate" to it and here it explicitly depicts it... so "not sure" about removal just yet.

@yarikoptic
Copy link
Contributor Author

FWIW: does render now.

@effigies
Copy link
Contributor

Looks like too much stuff going on. I can't read it at 100% zoom.

image
image

@yarikoptic
Copy link
Contributor Author

@candleindark -- would you be so kind to see if you could tame the drawing so it is of better fidelity without zooming?

Meanwhile, I have added here use of panzoom plugin (https://playg0n.github.io/mkdocs-panzoom/) which should enable zoom'ing "Mermaid and D2 are included by default". Seems to work nicely.

@candleindark
Copy link

@candleindark -- would you be so kind to see if you could tame the drawing so it is of better fidelity without zooming?

I think the problem stems having too many items in the graph rather the arrangement of the items in the graph, but I will make an attempt. It would be nice if there is some mermaid support that allows zooming in of a particular region of the diagram, like the behavior of the prezi app.

I don't think this problem is particular to us though. Many linkml generated diagrams suffer the same problem in presentation (For example, https://concepts.datalad.org/s/temporal/unreleased/).

@candleindark
Copy link

I think if we can get any large mermaid diagram to display in full window as https://anvaka.github.io/panzoom/demo/index.html would be great.

The example is a live demo of https://github.com/anvaka/panzoom which is the base for https://playg0n.github.io/mkdocs-panzoom/

@yarikoptic
Copy link
Contributor Author

@candleindark I already added zoom/dragging here -- check preview at https://bids-website--626.org.readthedocs.build/en/626/standards/index.html . Do you propose something instead/on top of it?

@candleindark
Copy link

@candleindark I already added zoom/dragging here -- check preview at https://bids-website--626.org.readthedocs.build/en/626/standards/index.html . Do you propose something instead/on top of it?

In a way, yes. I do think the one I mentioned is more better, but it is not a Mkdocs extension. I don't know if it's worth the time/effort to get it working.

@candleindark
Copy link

@candleindark I already added zoom/dragging here -- check preview at https://bids-website--626.org.readthedocs.build/en/626/standards/index.html . Do you propose something instead/on top of it?

In a way, yes. I do think the one I mentioned is more better, but it is not a Mkdocs extension. I don't know if it's worth the time/effort to get it working.

Nevermind, I just found out some a feature of the mkdocs extension you are using. I think it is good enough.

@candleindark
Copy link

@yarikoptic I was able to make the items in the diagram appear a bit larger and sent a PR to your branch.

candleindark and others added 2 commits February 25, 2025 16:40
This adjustment will allow items in the
mermaid diagram to appear bigger in the
webpage because the page is more limited
in the horizontal dimension. Additionally,
the syntax of the mermaid diagram has been
updated to the latest syntax,
e.g. `flowchart` instead of `graph`.
The intents of the lines in the diagram
are those recommended/defaulted by the
mermaid live editor at
https://www.mermaidchart.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extend mermaid figure(s) for validator?
4 participants