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

[Future] Incorporate mermaid diagrams #34

Open
zkamvar opened this issue May 6, 2022 · 2 comments · May be fixed by #125
Open

[Future] Incorporate mermaid diagrams #34

zkamvar opened this issue May 6, 2022 · 2 comments · May be fixed by #125
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@zkamvar
Copy link
Contributor

zkamvar commented May 6, 2022

This is something @tobyhodges will be happy about.

When GitHub announced its support for mermaid diagrams in issue comments, this seemed too good to be true. When I read the documentation, it seemed like we would need to host it on our own server in order to render it in a way that makes sense.

BUT the good people at CSSTricks wrote up a good article on how to include mermaid in static sites it turns out that it's a lot like MathJax where it will render when available, but give a sensible fallback if not. Neat!

Here's an example of what we could to to incorporate concept maps into our infrastructure:

Source:

graph TD;
    M[mental model];
    E[edges];
    N[nodes];
    CM[Concept Map];
    R[relationships];
    C[concepts];
    CM --depict-->  M;
    CM --contain--> N;
    CM --contain--> E;
    E  --connect--> N;

    E  --describe--> R;
    R  --between--> C;
    N  --describe----> C;

Output:

graph TD;
    M[mental model];
    E[edges];
    N[nodes];
    CM[Concept Map];
    R[relationships];
    C[concepts];
    CM --depict-->  M;
    CM --contain--> N;
    CM --contain--> E;
    E  --connect--> N;

    E  --describe--> R;
    R  --between--> C;
    N  --describe----> C;
Loading

Now the drawbacks to this are that people are going to have to learn this diagramming language, but the benefit is that there are several places to test it out without having to re-render the site over and over.

@zkamvar zkamvar added the enhancement New feature or request label May 6, 2022
@tobyhodges
Copy link
Member

🎉

I am inclined to offer this as one of a few ways for people to include concept maps in their lesson, alongside "take a photo of your hand-drawn map" and "embed an image you've made elsewhere". It will be an excellent tool for those lesson developers comfortable enough with learning the syntax.

@zkamvar zkamvar added the help wanted Extra attention is needed label May 9, 2022
@ns-rse
Copy link

ns-rse commented Dec 10, 2023

It would be great to have the ability to incorporate Mermaid Diagrams in Carpentry material as not only do they allow Concept Maps but you can also include Git diagrams.

Source

```mermaid
%%{init: {'theme': 'base', 'gitGraph': {'rotateCommitLabel': true}
         }
}%%
    gitGraph
       commit id: "Last feature"
       commit id: "v0.1.0"
       branch "v0.1 fixes"
       commit "This branch is for fixes to v0.1"
       branch "Missing JSON files for v0.1"
       commit id: "Add missing JSON to v0.1.0 branch"
       checkout "v0.1 fixes"
       merge "Missing JSON files for v0.1"
       commit id: "v0.1.1"
       checkout main
       commit id: "Feature1 for v0.2.0"
       commit id: "Feature2 for v0.2.0"
       commit id: "v0.2.0"
       branch "v0.2 fixes"
       commit id: "This branch is for fixes to v0.2"
       branch "Missing JSON files for v0.2"
       commit id: "Add missing JSON to v0.2.0 branch"
       checkout "v0.2 fixes"
       merge "Missing JSON files for v0.2"
       branch "More changes for v0.2"
       commit id: "Update Cadenza logo"
       commit id: "Update README"
       checkout "v0.2 fixes"
       merge "More changes for v0.2"
       commit id: "v0.2.1"
       checkout main
       commit id: "Cadenza Baseline"
       commit id: "Unit Tests for evaluators"
       commit id: "Unit Tests for enhancers"
       commit id: "v0.3.0"
       branch "v0.3 fixes"
       commit id: "This branch is for fixes to v0.3"
       branch "Fixing something in the future on v0.3"
       commit id: "Fix something in the future"
       checkout "v0.3 fixes"
       merge "Fixing something in the future on v0.3"
       checkout "v0.2 fixes"
       branch "Fixing something in the future on v0.2"
       commit id: "Fix the same problem on v0.2 branch"
       checkout "v0.2 fixes"
       merge "Fixing something in the future on v0.2"
       commit id: "v0.2.2"
       checkout "v0.3 fixes"
       commit id: "v0.3.1"
       checkout main
       commit id: "Refactor HAAQI"
       commit id: "Refactor HASQI"
       commit id: "Refactor HASPI"
       commit id: "v0.4.0"
       branch "v0.4 fixes"
       commit id: "This branch is for fixes to v0.4"
       checkout "main"
       commit id: "First of many new features"
       checkout "v0.4 fixes"
       branch "Fix something in v0.4"
       commit id: "Fix problem 1 on v0.4"
       commit id: "Fix problem 2 on v0.4"
       checkout "v0.4 fixes"
       merge "Fix something in v0.4"
       commit id: "v0.4.1"
       checkout main
       commit id: "Lots more enhancements"
```

Output

%%{init: {'theme': 'base', 'gitGraph': {'rotateCommitLabel': true}
         }
}%%
    gitGraph
       commit id: "Last feature"
       commit id: "v0.1.0"
       branch "v0.1 fixes"
       commit "This branch is for fixes to v0.1"
       branch "Missing JSON files for v0.1"
       commit id: "Add missing JSON to v0.1.0 branch"
       checkout "v0.1 fixes"
       merge "Missing JSON files for v0.1"
       commit id: "v0.1.1"
       checkout main
       commit id: "Feature1 for v0.2.0"
       commit id: "Feature2 for v0.2.0"
       commit id: "v0.2.0"
       branch "v0.2 fixes"
       commit id: "This branch is for fixes to v0.2"
       branch "Missing JSON files for v0.2"
       commit id: "Add missing JSON to v0.2.0 branch"
       checkout "v0.2 fixes"
       merge "Missing JSON files for v0.2"
       branch "More changes for v0.2"
       commit id: "Update Cadenza logo"
       commit id: "Update README"
       checkout "v0.2 fixes"
       merge "More changes for v0.2"
       commit id: "v0.2.1"
       checkout main
       commit id: "Cadenza Baseline"
       commit id: "Unit Tests for evaluators"
       commit id: "Unit Tests for enhancers"
       commit id: "v0.3.0"
       branch "v0.3 fixes"
       commit id: "This branch is for fixes to v0.3"
       branch "Fixing something in the future on v0.3"
       commit id: "Fix something in the future"
       checkout "v0.3 fixes"
       merge "Fixing something in the future on v0.3"
       checkout "v0.2 fixes"
       branch "Fixing something in the future on v0.2"
       commit id: "Fix the same problem on v0.2 branch"
       checkout "v0.2 fixes"
       merge "Fixing something in the future on v0.2"
       commit id: "v0.2.2"
       checkout "v0.3 fixes"
       commit id: "v0.3.1"
       checkout main
       commit id: "Refactor HAAQI"
       commit id: "Refactor HASQI"
       commit id: "Refactor HASPI"
       commit id: "v0.4.0"
       branch "v0.4 fixes"
       commit id: "This branch is for fixes to v0.4"
       checkout "main"
       commit id: "First of many new features"
       checkout "v0.4 fixes"
       branch "Fix something in v0.4"
       commit id: "Fix problem 1 on v0.4"
       commit id: "Fix problem 2 on v0.4"
       checkout "v0.4 fixes"
       merge "Fix something in v0.4"
       commit id: "v0.4.1"
       checkout main
       commit id: "Lots more enhancements"
Loading

@astroDimitrios astroDimitrios linked a pull request Feb 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants