constellation-app / constellation

A graph-focused data visualisation and interactive analysis application.
https://constellation-app.com
Apache License 2.0
388 stars 58 forks source link

K-Truss and Hierarchical menu items buttons should enable/disable properly #704

Closed Auriga2 closed 3 years ago

Auriga2 commented 4 years ago

Description

These menu items are not disabled when there is no graph opened and no valid graph opened. When no graph is opened, the buttons inside are disabled except Cluster. But when loaded on an empty graph, other buttons except Cluster are initially locked, but if you click on the Cluster button now, it enables the Interactive-Enabled button, and clicking that enables other buttons.

The enabled Cluster button or any other button in both windows don't do anything or throw any errors, so this doesn't require immediate fixing.

If the empty graph is added after the K-Truss and Hierarchical windows, the buttons are not enabled even after a valid graph is added, until you click on the only enabled Cluster button, which enable the other buttons in the same order above. It is nice if we can enable the Interactive-Enabled button as well, similar to when these windows are added on a valid graph.

When these windows are added on a valid graph, both the Cluster and Interactive-Enabled buttons are enabled but clicking
on Cluster doesn't seem to do anything but disabling itself? May be I am not doing it properly?

Steps to Reproduce

  1. Tools/Cluster > Hierarchical
  2. Tools/Cluster > K-Truss

Expected behaviour: Buttons should enable/disable properly

Actual behaviour: Buttons are not enabled/disabled properly

Reproduces how often: 100%

aldebaran30701 commented 4 years ago

Just to confirm, all options on each view apart from "Cluster" should be disabled, until the "Cluster" button is clicked. This runs a plugin which groups the items and enables the use of interactivity with each separate group. The idea is that you can adjust the size of each cluster or depth of hierarchy using the interactivity. It shouldn't be usable without the graph initially clustering.

When these windows are added on a valid graph, both the Cluster and Interactive-Enabled buttons are enabled but clicking on Cluster doesn't seem to do anything but disabling itself? May be I am not doing it properly?

This seems like maybe that view should have interactive button disabled by default, but enabled after cluster is ran. Running cluster will allow the interactive component to be used, and you will not be able to re-cluster until a significant graph change has occurred.

If you find any behaviour which does not conform to this, I think that would be an issue. Could you please clarify that my thinking is correct @arcturus2

github-actions[bot] commented 3 years ago

This issue is stale because it has been open for 6 months with no activity. Consider reviewing and taking an action on this issue.

arcturus2 commented 3 years ago

Sorry about the delay @aldebaran30701 but I agreed with your analysis.

Atlas139mkm commented 3 years ago

Is this not already done? Currently: start - Cluster button is enabled, every other button is disabled click Cluster - enables Interactive button, disables Cluster click Interactive button - every other button enables, interactive button changes text click Interactive button again - every other button disables, interactive button changes text

My assumption is the cluster button, does the calculation then disables itself as the user doesn't need to do the calculation again. The cluster button enables itself again if the user changes the graph, it also tells the user the graph has changed.

Is this issue still valid or am I not understanding the component that is not working properly?

Auriga2 commented 3 years ago

@Atlas139mkm your observation seems correct now. Only issue I found was the refreshing of the warning message below. It isn't clearing when switched to another graph or if all the graphs are closed. If you change graph 1 and switch to graph 2, the message still appear in red, and if you cluster in that graph 2, the error disappear and doesn't show again on the graph 1 until you try to proceed there, although actually you only needed to re-cluster the graph 1.

image

GammaVel commented 3 years ago

Thanks @Auriga2 and @Atlas139mkm for your comments. I have reviewed this issue and I think the buttons are working ok, I don't mind Cluster being enabled when there is no graph. I do agree with the original comment that Cluster doesn't appear to do anything so maybe this is a good candidate for some UX down the track? If the graph has no K Trusses it could notify the user? I'll close this off for now. I did see the same issue with the text that you did @Auriga2 and I also noticed the numbers don't refresh for a new graph. Would you like me to raise this as a separate issue?

Auriga2 commented 3 years ago

@GammaVel Yes that makes sense. Thanks.