comparative-concepts / cc-database

Cross-linked database of Comparative Concepts, extracted from "Morphosyntax: constructions of the world's languages", by William Croft (2022)
https://comparative-concepts.github.io/cc-database/
4 stars 1 forks source link

Expand outwards button #3

Closed wcroft closed 4 months ago

wcroft commented 4 months ago

Here is one aspect of my experience with using the visualization interface now that I have used it more. When trying to create a subgraph with "Keep selected", I always have to subtract one edge distance from what I want to select because the "Keep selected" button always adds nodes that are one edge away from the selected nodes. It is true that sometimes it is handy to know what CCs are one edge away from the selected node. But most of the time I am trying to calculate if I need to "expand downward" another iteration or not, and I find it confusing.

Effectively the "Keep selected" button takes the selected nodes and then applies "expand outward" as Peter originally implemented it. I am glad that there are "expand upward" and "expand downward" buttons, but I would like to see the "expand outward" button restored, and have the "keep selected" button keep only the selected nodes. (Note that "expand outward" is not always "expand upward" plus "expand downward", depending on the configuration of the network around the selected node(s).

heatherleaf commented 4 months ago

There are two different things we're talking about here: the selection and the actual subgraph. Currently the "expand" buttons only change the selection, and that's also what the previous "expand outward" button did. So the expand buttons don't change the subgraph - that's what the "keep" and "remove" buttons are for.

I understand your problem with "keep selected" - a better name for it would be "remove non-neighbors". The reason for having this behavior is to not have to add more buttons, but perhaps it's better to have more buttons and a more intuitive behavior.

How about these buttons/controls?

So the "Show neighbors" button doesn't change the selection, but adds more nodes to the subgraph (in both up- and downwards direction). Is "Reveal neighbors" better than "Show neighbors"?

(The "Clear selection" button can double as "Select all" whenever there are no nodes selected)

Would it be useful with a button "Invert selection" too?

heatherleaf commented 4 months ago

Is "Reveal neighbors" a better name than "Show neighbors"?

heatherleaf commented 4 months ago

Fixed in 1cfd1974689ee6b69d22bec17f091e0914f70d41 Does it work like you want now, @wcroft?

wcroft commented 4 months ago

It appears that the original visualization interface is gone now. I thought that 1cfd197 was a fork with your suggested revisions; but when I use the URL I had bookmarked, only the revised visualization comes up. But I prefer the original, plus "expand outwards".

The basic reason I wanted the changes I suggested to the original visualization is that I think the user should have more control over what subgraph is produced by selecting certain nodes and pruning the graph with "Keep selected". There are times where I would like a subgraph with all neighboring nodes ("expand outward"), or perhaps all neighboring nodes with a distance of 2 ("expand outward" clicked twice). There are times when I would like a subgraph with just the child nodes ("expand downward"). There may be times when I would like a subgraph with just the parent nodes ("expand upward"); I haven't used the tool enough, but it's a logical likelihood. The original visualization automatically added the neighboring nodes (at a distance of 1) when pruning the graph to the nodes selected by the user ("keep selection"). The user didn't have a choice. I had to find workarounds to create a subgraph that was close to what I wanted. All I wanted to change from the original visualization was to (i) add "expand outwards" and (ii) have "keep selection" keep only the selection. Is it possible to go back to that user interface with these changes? Since I don't remember exactly all the other buttons on the original interface, I can't say whether other buttons could be dropped or changed. For what I was doing, these were the only two changes that I felt would be good for the user, at least as far as I had used it.

heatherleaf commented 4 months ago

It’s not a problem to go back to the previous version, but the change isn’t as drastic as you say.

The new button “hide unselected” is exactly the “keep selection” you were asking for - I just changed the name because I think “keep” isn’t as clear as “hide” (for me).

I can add “expand outwards” too, which will expand the selection similar to the other “expand” buttons.

The new button “reveal neighbors” doesn’t change the selection but the graph itself (just as the “hide/keep” buttons do). I don’t know about you, but I want a way to grow the graph - “hide/keep” only shrink it. My solution to this is a button that grows the graph one neighbor outwards. So even if you don’t see a use for it I think I will keep it. But I’m unsure about the name for the button: “show neighbors”? “Reveal”? “Include”? Or just "grow graph"? Best is something that makes it clear that the selection isn’t changed but it’s the actual graph that changes

heatherleaf commented 4 months ago

Button "expand outwards" added in c363f60.

The interface now has both of you suggestions, but "keep selection" is called "hide unselected". I can revert to "keep selection" if you think that's necessary, but for me it doesn't hint that it will affect the actual graph and not just the selection.

heatherleaf commented 4 months ago

(Unrelated to this topic: the arrow directions are now inverted, to reflect hierarchical trees more. This means that "expand downwards" now goes in the direction of the arrows - so exactly the same behaviour as before, it's just the arrow directions that are inverted)

wcroft commented 4 months ago

Thanks for the clarifications. I misunderstood what happens when you click on "keep selected" in the old system. I thought you had said that the rest of the graph goes away, and you couldn't grow the graph once you've pruned it. But that isn't true (or isn't true now). So "hide selection" is more accurate now.

Yes, there are times one might want to grow the graph. But now that I see that one can grow the graph from a pruned display, I have another thought. You were concerned about too many buttons. In fact, I'd like to be able to grow the graph just downward or upward after a subgraph has been selected (I just thought it wasn't possible before). Is it possible to have the "expand" buttons (downward, upward, outward) do double duty: increase the selection when starting from the (default) total graph and a set of selected nodes, but alternatively increase what is visible when starting from a subgraph where much of the total graph has been hidden? I'm not sure how to handle node selection in the latter case, but we can discuss that if you think this is possible or reasonable.

I think this would be useful because it's not always easy to see what you're getting when making a selection in the total graph (if the graph is very dense or tangled), and so one would want to fix the subgraph after creating it -- not just shrinking it but growing it. Since there isn't a back/undo function in the visualization package, this is perhaps the next best thing we can do.

wcroft commented 4 months ago

I had further thoughts about my suggestion. It might make it difficult to shrink a subgraph if "expand..." expands the entire subgraph rather than the selected part of the subgraph. You wouldn't be able to shrink a subgraph unless you selected a subset of the subgraph. To get full ability to grow or shrink a subgraph, the user could either select a subset, and then "hide unselected" would shrink the subgraph; or select the entire subgraph, and then "expand..." would grow the subgraph. This would make the "expand..." buttons more consistent: full graph or subgraph, they would act on the selected nodes. This would require a "select all" button (which you suggested above), which selects all nodes that are visible at the time, in order to make growing a subgraph relatively simple ("select all" plus "expand...").

I think working out these abilities would be good because much of the time, users won't want to deal with the entire graph because it's too large. I think they would browse through the full graph, figuring out where things were, and then they would want to prune it to the CCs they're interested in for their specific purpose.

heatherleaf commented 4 months ago

I'm not sure I understand entirely what you are suggesting.

I think it's not a good idea to have an action that both grows the selection and the subgraph at the same time - this will surely lead to confusion.

I added new buttons in 5ef54679e77d277464dadef9a9ecea87f03898ba: they are called "grow upwards", "grow downwards" and "grow outwards". The outwards is the same as the old "reveal neighbors", just new name.

So now there are the following:

The "expand" and "grow" buttons behave similarly, but one only changes the selection and the other includes more nodes in the subgraph.

Can you do everything you want with these buttons? And is it somewhat intuitive what they do? Once we have decided on the behaviour we can start discussing if there are better/shorter labels to put on the buttons. Or even nice icons.

wcroft commented 4 months ago

Thanks. This should do everything I want. I had suggested combining the upwards/downwards/outwards buttons because my main interaction with the visualization has been to create smaller subgraphs, and that involves selection to create the subgraph, and then sometimes growing or shrinking the subgraph. In other words, I have only been using selection at this point to grow or shrink a subgraph. But I see selection could be used for other purposes, so keeping selection and growing the subgraph separate makes sense. I was away, and I'll be away again from Thursday till Monday, so I probably won't be able to work on this till after I get back.

heatherleaf commented 4 months ago

Great! Do you have any suggestions on the naming of the buttons? (You are the native speaker after all)

wcroft commented 4 months ago

No clever ideas. The names work for now. I can view them fine on my desktop. You could shorten it a bit like this if you want:

Subgraph: Grow: [upwards] [downwards] [outwards] Remove: [unselected] [selected] Selection: [clear selection] [selected unconnected] Expand selection: [upwards] [downwards] [outwards]

heatherleaf commented 4 months ago

Did something like that in the latest version, closing this now.