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

graph: family collapsing #1130

Open
oliver-sanders opened this issue Nov 4, 2022 · 4 comments · May be fixed by #1810
Open

graph: family collapsing #1130

oliver-sanders opened this issue Nov 4, 2022 · 4 comments · May be fixed by #1810
Assignees
Labels
Milestone

Comments

@oliver-sanders
Copy link
Member

Follow on from #1108

Implement family expand/collapse in the graph view.

In the Cylc 7 graph view families were represented with a special node shape & expansion was available via a right-click menu. When a family was expanded the special node was removed and the tasks it represented were added in its place.

With the Cylc 8 graph view we have more power over rendering so can do something more advanced. One thing I'd like to consider is expanding families into subgraphs so that the family name is preserved which should make graphs easier to understand.

Pull requests welcome!

@oliver-sanders
Copy link
Member Author

Attempt along with #1280

@markgrahamdawson markgrahamdawson self-assigned this Feb 7, 2024
@markgrahamdawson
Copy link
Contributor

markgrahamdawson commented Apr 11, 2024

For the time being - figure out a means of drawing a dotted box around families.

This can be done with graphviz subgraphs

The graphviz dot code is returned from the getDotCode function in Graph.vue view

Dot code can be rendered with
dot foo.dot -Tpng -o foo.png

ultimately in the svg there will need to be a rect tag added...
<rect x="" y="" width="" height="">

@markgrahamdawson
Copy link
Contributor

markgrahamdawson commented Apr 19, 2024

When turning the dotcode into json objects - if two subgraphs are included with the exact same bounding box then the coordinate data is only contained in the first object

In the image below subgraph cluster_1 and subgraph cluster_2 have the same coordinates so they are not included in the object returned for cluster_2

image

Not sure if this is going to be an issue or not but thought it was worth making a note of.

I think its only really an issue if you wanted to do something along the lines of this...
image

@oliver-sanders
Copy link
Member Author

oliver-sanders commented May 17, 2024

Some ideas for a unified approach to grouping/collapsing cycles/families. I'm suggesting unifying the handling of cycles and families (note, cycles represent the "root" family so they are essentially the same thing).

Grouping/Ungrouping - Drawing dashed boxes around a cycle/family.

Collapsing/Expanding - Reducing a family down to a single node.

Limitations of the Cylc 7 approach:

  • Once you expand a family it's gone, the tasks which belong to the expanded family are mixed in with other tasks in the graph, you can not tell what family they belong to. This is an issue if the user wants to examine a component within the workflow.
  • No visibility of the inheritance hierarchy (i.e. what can we expand/collapse).
  • No visibility of what you have expanded/collapsed (i.e. where are we in the hierarchy).

Note, for simplicity, this approach groups/collapses all instances of selected families rather than managing this at a per-cycle level. I think this is probably more aligned with expectations, but does represent a minor limitation, e.g. there's no ability to collapse all but one cycle. The ability to expand/collapse specific cycle instances would be a reasonable enhancement.

Design Sketch

graph-grouping-and-collapsing


Had a quick discussion on this (more to come):

  • Can't really think of a valid use case for collapsing all cycles (users would do this in the tree view if they wanted to), so perhaps treat cycles differently (i.e. collapse per-cycle rather than all cycles) and remove from the menus.
  • Better expand/collapse icon (obviously).
  • The Cylc 7 default of only expanding the cycle point (i.e. show top-level families only) is a reasonable protection for viewing large workflows. We might want to continue with this, or perhaps do something smart (e.g. only collapse families if there are lots of tasks on load).

@markgrahamdawson markgrahamdawson linked a pull request May 24, 2024 that will close this issue
8 tasks
@oliver-sanders oliver-sanders modified the milestones: 2.6.0, 2.7.0 Oct 9, 2024
@oliver-sanders oliver-sanders modified the milestones: 2.7.0, 2.8.0 Dec 5, 2024
@MetRonnie MetRonnie linked a pull request Jan 14, 2025 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants