integrations icon indicating copy to clipboard operation
integrations copied to clipboard

Mermaid click feature support

Open jeffabailey opened this issue 2 years ago • 3 comments

Using the Mermaid click feature with the _blank option within the Mermaid integration results in undesirable behavior.

See the following video to see steps, and this page to try it out.

Page: https://jeffs-organization-3.gitbook.io/managing-inner-source-projects/~/changes/NdT1gsJCKqwbVRhqQRZF/use_gqm

Click the Reduce Duplication graph element to reproduce the issue.

Video: https://github.com/GitbookIO/integrations/assets/776901/2d1d6d4e-4116-4384-8b11-3e08031cd875

jeffabailey avatar Sep 09 '23 02:09 jeffabailey

The Mermaid graph renders in a small iframe, and click events meant to take you to some full-page view stay rendered within that iframe. We'd rather have the click targets take you to a full-page view of the target.

rrrutledge avatar Sep 09 '23 11:09 rrrutledge

Can you try and add _top to the link you're trying to open?

addisonschultz avatar Sep 27 '23 15:09 addisonschultz

Hi Addison, thanks for the response.

Yes, I tried using _top along _blank and _parent as described here:

https://mermaid.js.org/syntax/flowchart.html#interaction

Here's an updated version of the page demonstrating the issue more directly.

https://jeffs-organization-3.gitbook.io/managing-inner-source-projects/introduction-1/goals/use_gqm

Underlying mermaid code.

flowchart LR
    blank-->top
    top-->parent 
    
    click blank "https://www.github.com" _blank
    click top "https://www.github.com" _top
    click parent "https://www.github.com" _parent

jeffabailey avatar Oct 03 '23 12:10 jeffabailey