NOAA-FIMS / collaborative_workflow

contributors guide to FIMS, managing collaborations
https://noaa-fims.github.io/collaborative_workflow/
4 stars 1 forks source link

add diagrams using mermaid where useful #121

Closed iantaylor-NOAA closed 3 months ago

iantaylor-NOAA commented 7 months ago

@MOshima-PIFSC, @k-doering-NOAA and I discussed mermaid diagrams in the context of a design document for FIMS output today.

Here's a potential flow for this work:

graph TD;
    A[learn mermaid];
    B[keep an eye out for places\n where diagrams will be helpful];
    A-->C[add mermaid diagrams in those places];
    B-->C;

That diagram above was rendered automatically within this github issue from the code below (displayed below as code using 4 backticks--another useful thing I learned today)

```mermaid
graph TD;
    A[learn mermaid];
    B[keep an eye out for places\n where diagrams will be helpful];
    A-->C[add mermaid diagrams in those places];
    B-->C;


A few resources: 
* mermaid website: https://mermaid.js.org/
* live editor (for sandboxing stuff, but can also work by using Preview within a github issue): https://mermaid.live/
iantaylor-NOAA commented 7 months ago

I see a drawback of using the diagrams in github issues is that email notifications don't render the diagrams in the same way as they do on the github website.

k-doering-NOAA commented 7 months ago

@iantaylor-NOAA that's so cool that on GitHub they are automatically rendered and that you can preview them! The live editor was nice for collaborative editing without needing to switch back and forth between write and preview views on github

Bai-Li-NOAA commented 7 months ago

We can add detailed instructions in the collaborative book if R interface group find this diagram useful.

kellijohnson-NOAA commented 3 months ago

Because we are using .Rmd files in the workflow website, the mermaid graph does not render. See these lines. It needs to be wrapped in DiagrammeR::mermaid() according to this stackoverflow chat. Fixed with e8ca014.

kellijohnson-NOAA commented 3 months ago

@iantaylor-NOAA can we close this issue given that there are no proposed diagrams to add at the moment?

iantaylor-NOAA commented 3 months ago

@kellijohnson-NOAA, thanks for fixing the broken render and suggesting closing the issue. The goal of this issue was to raise awareness of the option to use mermaid and that has been achieved.