Skip to content

Make pattern links in mindmap clickable #479

Closed as not planned
Closed as not planned

Description

@spier

We have this beautiful mindmap here:
https://patterns.innersourcecommons.org/explore-patterns

It is generated based on the data and code in here:
https://github.com/InnerSourceCommons/InnerSourcePatterns/tree/main/pattern-categorization

The current mindmap is simply an image.
One drawback of that approach is that we could not get the links to the patterns to be clickable.

Now in a new release of gitbook (where we host our patterns website), a mermaid integration became available.

Therefore I am wondering if mermaid+gitbook would allow us to generate a mindmap where we can click through to the actual patterns?

Activity

  1. spier commented on Nov 3, 2022

    @spier
    MemberAuthor

    GitHub can also render mermaid, so I can show a quick first experiment here directly.

    I have re-created only a part of our mindmap using mermaid.
    Now I need to figure out if (and how) a node can be made clickable.

    Any mermaid pros here that can help with that?

    flowchart LR
    
    0(InnerSource Program) --> A(Begin)
    
    A(Begin) --> A1(Program Setup)
    A1(Program Setup) --> id1{{Management hesitates to invest in InnerSource}} --> id11>Start as an Experiment]
    A1(Program Setup) --> id2>Slow community growth hinders InnerSource]
    A1(Program Setup) --> id3>InnerSource principles are not intuitive for everybody]
    
    A(Begin) --> A2(Project Setup)
    A2(Project Setup) --> id4{{Hard to assess a project quickly}} --> id41>Standard Base Documentation]
    A2(Project Setup) --> id5{{Ad-hoc communication hinders project growth}} --> id51>Communication Tooling]
    A2(Project Setup) --> id6{{Intransparent roadmap and direction of the project}} --> id61>Issue Tracker Use Cases]
    
    A(Begin) --> A2B(Project Setup B)
    A2B(Project Setup B) -- Hard to assess a project quickly --o id41b>Standard Base Documentation]
    A2B(Project Setup B) -- Ad-hoc communication hinders project growth --o id51b>Communication Tooling]
    A2B(Project Setup B) -- Intransparent roadmap and direction of the project --o id61b>Issue Tracker Use Cases]
    
    Loading
  2. spier commented on Nov 5, 2022

    @spier
    MemberAuthor

    Testing something clickable within the GitHub UI.
    Doesn't work it seems.

    flowchart LR
    
    0(InnerSource Patterns) --> A("click me")
    
    click A "https://github.com/InnerSourceCommons/InnerSourcePatterns"
    
    Loading
  3. spier commented on Nov 5, 2022

    @spier
    MemberAuthor

    mermaid has an experimental chart type of mindmap.
    https://mermaid-js.github.io/mermaid/#/mindmap?id=mindmap

    Given the maturity maybe not something to use yet?

  4. spier commented on Nov 6, 2022

    @spier
    MemberAuthor

    The first diagram in here contains clickable nodes in the graph. So it is possible, just not sure if it is possible in the gitbook integration of mermaid.

  5. spier commented on Nov 6, 2022

    @spier
    MemberAuthor

    Here an example of the Mermaid Live Editor, showing how it could work:|
    Clickable chart

    flowchart LR
    
    0(InnerSource Patterns) --> A("click me")
    click A "https://github.com/InnerSourceCommons/InnerSourcePatterns" _blank
    

    The extra parameter _blank gets the link target to open in a new window. 1

    However when trying the same in gitbook, it looks like gitbook is trying to load the link target within the graph area itself. Possibly an iframe?

    Screenshot 2022-11-06 at 12 40 58

    Screenshot 2022-11-06 at 12 41 08

    Footnotes

    1. I was experimenting with other parameter values, which is why you see _top in the screenshots. Had the exact same effect though. ↩

  6. spier commented on Nov 6, 2022

    @spier
    MemberAuthor

    I have sent a support request to gitbook, as I cannot get this to work.

  7. privero-meli commented on Feb 24, 2023

    @privero-meli
    Contributor

    Hi @spier!!

    You can try this solution, it's not the best but it works 😁

    flowchart LR
      0(Inner Source Patterns) --> A[<a href='https://patterns.innersourcecommons.org/p/trusted-committer'>Trusted Commiters</a>]
    
    flowchart LR
      0(Inner Source Patterns) --> A[<a href='https://patterns.innersourcecommons.org/p/trusted-committer'>Trusted Committer</a>]  
    
    Loading
  8. spier commented on Feb 24, 2023

    @spier
    MemberAuthor

    @privero-meli thank you for chiming in here.

    Did you try this in gitbook as well? (not in GitHub)
    When testing your syntax above in gitbook, it renders the graph correctly, however when clicking on the link it still opens it within the iframe itself.

    Graph:

    Screenshot 2023-02-25 at 00 04 42

    After link click:

    Screenshot 2023-02-25 at 00 04 54

  9. privero-meli commented on Feb 25, 2023

    @privero-meli
    Contributor

    @privero-meli thank you for chiming in here.

    Did you try this in gitbook as well? (not in GitHub) When testing your syntax above in gitbook, it renders the graph correctly, however when clicking on the link it still opens it within the iframe itself.

    Graph:

    Screenshot 2023-02-25 at 00 04 42

    After link click:

    Screenshot 2023-02-25 at 00 04 54

    Too bad 😞 I only tested it on GitHub, since it also uses an iframe I thought the behavior would be the same.

  10. NewMexicoKid commented on Feb 25, 2023

    @NewMexicoKid
    Collaborator
  11. spier commented on Feb 25, 2023

    @spier
    MemberAuthor

    Hehe, good find @NewMexicoKid!
    So good in fact that we already found it i.e. the current static mindmap is created using markmap. More details in here. :)

    However we cannot embed that as a dynamic mindmap into gitbook, as the SaaS version of gitbook does not allow you to add your own plugins.

    I believe that previous versions of gitbook came packaged in a way that you could also self-host it. That seems to be a think of the past, and likely the npm package that you found is from those older days.

  12. spier commented on Feb 27, 2024

    @spier
    MemberAuthor

    Doesn't look like we can easily do this right now. Also not a high prio item. Therefore closing this for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    📖 Type - Content WorkWorking on contents is the main focus of this issue / PR

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions