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

Mermaid: improve link discoverability #5619

Open
4 tasks done
ofek opened this issue Jun 18, 2023 · 9 comments
Open
4 tasks done

Mermaid: improve link discoverability #5619

ofek opened this issue Jun 18, 2023 · 9 comments
Labels
change request Issue requests a new feature or improvement resolved Issue is resolved, yet unreleased if open

Comments

@ofek
Copy link
Sponsor Collaborator

ofek commented Jun 18, 2023

Context

No response

Description

Currently, there is no way to tell what parts of diagrams can be clicked other than hovering over to see if the icon changes

Related links

Here is an example https://ofek.dev/pyapp/latest/runtime/

Use Cases

It is very common to have parts of diagrams link to other places in your documentation for elaboration

Visuals

No response

Before submitting

@squidfunk
Copy link
Owner

squidfunk commented Jun 18, 2023

Thanks for suggesting. Does Mermaid.js itself style those links in another way? If not, what's your suggestion? One idea:

Bildschirm­foto 2023-06-18 um 21 07 12

@squidfunk squidfunk added the needs input Issue needs further input by the reporter label Jun 18, 2023
@ofek
Copy link
Sponsor Collaborator Author

ofek commented Jun 18, 2023

I think the only built-in styling is the tooltip (which doesn't work as far as I can tell).

Your idea is interesting, that might work. I was also thinking maybe the text could have the standard appearance of a hyperlink. Or maybe a small icon similar to https://squidfunk.github.io/mkdocs-material/reference/#setting-the-page-status

Anything is fine, I trust your design decisions 🙂

@squidfunk squidfunk added change request Issue requests a new feature or improvement and removed needs input Issue needs further input by the reporter labels Jun 19, 2023
@squidfunk squidfunk changed the title Improve link discoverability of Mermaid diagrams Mermaid: improve link discoverability Aug 10, 2023
@ofek
Copy link
Sponsor Collaborator Author

ofek commented Oct 22, 2023

Have you thought about what design you want here?

@squidfunk
Copy link
Owner

squidfunk commented Oct 23, 2023

Sorry, I currently have no bandwidth to address this topic, since we're investing our time to work on other features like the new search and friends (fixing 7 open change requests). I'll come back to this later, probably at the end of this year.

I'm sorry for the inconvenience this is causing you. You know how it is, I can't split myself 😅

@kamilkrzyskow
Copy link
Collaborator

In #6778 (reply in thread) I made a proposal to have an option to add custom styles for the mermaid blocks:

extra:
  extra_shadow_root_css:
    - assets/stylesheets/mermaid.css # I don't know if relative paths are supported in the shadow root
    - https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css

this would allow to apply custom styling to the elements. In this case xlink:href="../config/#full-isolation" or clickable in class="node default clickable flowchart-label" could be used to select the elements and style them accordingly.

@squidfunk
Copy link
Owner

Fixed in 05661a1. We've decided to go with underlines for now, since we're also going to add them in the text in the near future when we do a face lift of the current design.

Bildschirm­foto 2024-05-03 um 19 29 39

@squidfunk squidfunk added the resolved Issue is resolved, yet unreleased if open label May 3, 2024
@ofek
Copy link
Sponsor Collaborator Author

ofek commented May 3, 2024

Oh my goodness, that's awesome, thank you!

@ofek
Copy link
Sponsor Collaborator Author

ofek commented May 4, 2024

Feel free to close this, but out of curiosity what is the facelift you have planned?

@squidfunk
Copy link
Owner

Modernize the design that is from currently Material Design from 2017. Some users criticized that we're implementing Material Design v1 and not v3, so we're aiming at incorporating the best parts of v3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change request Issue requests a new feature or improvement resolved Issue is resolved, yet unreleased if open
Projects
None yet
Development

No branches or pull requests

3 participants