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

Use Mermaid output in HTML DAG #4316

Closed
ewels opened this issue Sep 18, 2023 · 3 comments · Fixed by #4337
Closed

Use Mermaid output in HTML DAG #4316

ewels opened this issue Sep 18, 2023 · 3 comments · Fixed by #4337
Assignees

Comments

@ewels
Copy link
Member

ewels commented Sep 18, 2023

Currently, the DAG output implementation for HTML is stand-alone, and needs to be maintained separately. The Mermaid DAG has been improved quite a bit recently (#4070). Rather than trying to maintain the two codebases separately, we could just reuse the Mermaid output for the HTML file.

Basically, if HTML is requested - create the Mermaid DAG output file and embed it within a static HTML template. The template should include the relevant Mermaid javascript dependencies and script blocks, as described in the Mermaid docs.

This should give us nicer functionality and less maintenance burden.

Note that the HTML DAG config scopes should probably still stay in place, but would then just forward on to the Mermaid DAG generation code.

👉🏻 Related to #4315

@ewels
Copy link
Member Author

ewels commented Sep 18, 2023

Some stretch goals from @bentsherman:

With the HTML renderer I think we could go much farther than simply wrapping around the mermaid diagram. You can attach JS event handlers to nodes in a mermaid diagram, so we could make it interactive, i.e. click to expand/collapse sub-workflows. Also add hyperlinks for operators to the Nextflow docs and processes to their source code

@pditommaso
Copy link
Member

I think this version should be produced if no otherwise specified

@pditommaso
Copy link
Member

@bentsherman think you should give a try to this

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

Successfully merging a pull request may close this issue.

3 participants