mermaid icon indicating copy to clipboard operation
mermaid copied to clipboard

Clickable links in State Diagram should use the class mermaidTooltip to match the behavior of other diagrams

Open Timac opened this issue 10 months ago • 2 comments

Description

📑 Summary

The PR #6423 added support for clickable states for State Diagram using the click directive. However the tooltips for are not rendered like the other types of diagrams. The Flowchart and Class Diagram are displaying tooltips using the mermaidTooltip class.

I would expect the State Diagram to also use the mermaidTooltip class for consistency.

📋 References

Steps to reproduce

Add the mermaidTooltip class to the stateDb.ts file

Code Sample

stateDiagram
    [*] --> Idle
    Idle --> Google
    Google --> [*]
    click Google "https://google.com" "Visit Google"

Setup

  • Mermaid version: 11.7.0
  • Browser and Version: All

Timac avatar Jun 28 '25 09:06 Timac

Hi, I’m a university student and am new to open-source contribution. This issue looks like a great starting point. Could I take this one on? I’ll follow the existing implementations. Thanks!

ShrihaDeo avatar Sep 22 '25 12:09 ShrihaDeo

@ShrihaDeo Did you do it? Here is a good starting point for you on how to start the dev server and the alignment the mantainers want us to follow: https://github.com/mermaid-js/mermaid/blob/develop/packages/mermaid/src/docs/community/contributing.md

lucasserral avatar Dec 12 '25 04:12 lucasserral