iurysza / module-graph

A Gradle Plugin for visualizing your project's structure, powered by mermaidjs

Home Page:https://plugins.gradle.org/plugin/dev.iurysouza.modulegraph

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Node focus

iurysza opened this issue · comments

What

Enable users to set a regex pattern to focus on one or more nodes.

Why

I've discussed similar ideas/solutions/issues here and here, and even started working on it on this WIP branch.
Finally, last month I had another conversation on Twitter that motivated me to work on topic again.

I think the overarching problem is making these graphs actually usable and useful for bigger projects. So I think this solution is a good starting point for that. I hope to use it as the basis for other features like different node colors based on the plugin they're using.

💡 Describe the solution you'd like

Add a new property focusedNodesPattern which represents a Pattern (Regular Expression) matching specific nodes (project names) in the graph that are to be highlighted and focused on. By default, no nodes will be focused.

What does focus mean?

When focusedNodesPattern is set the graph will show:

  • Highlighted nodes: nodes which name's match the regular expression. These will be rendered with a different color.
  • Adjacent nodes: nodes that have connections with highlighted nodes.

Customisation: Users should be able to change the focus node color, and a default color should be provided. Customisation should be optional.

🤚 Do you want to develop this feature yourself?

  • Yes
  • No