spine-tools / Spine-Toolbox

Spine Toolbox is an open source Python package to manage data, scenarios and workflows for modelling and simulation. You can have your local workflow, but work as a team through version control and SQL databases.
https://www.tools-for-energy-system-modelling.org/
GNU Lesser General Public License v3.0
68 stars 17 forks source link

Viewing entities in Entity tree #2789

Open nelliputkonen opened 2 months ago

nelliputkonen commented 2 months ago
soininen commented 1 month ago

This sounds a lot like column view (see e.g. Apple's column view component). Is the plan to go all the way into that direction eventually dropping the tree or just add an auxiliary list besides the tree view for filtering purposes?

jkiviluo commented 1 month ago

The plan is to have this as an auxiliary option. However, the main reason to have it is not filtering, but more convenient access to the entities. This helps to avoid the scroll bar in many occasions.

If no one will miss the tree, then we could eventually drop it.

DillonJ commented 1 month ago

I will miss the tree! Just saying :-)

manuelma commented 1 month ago

I think we shouldn't touch the tree - an alternative column-view might be good though, as long as it is an alternative. But it takes way more horizontal space so we need to be careful, we might find ourselves needing to scroll the parameter tables horizontally and horizontal scrolling is much worse than vertical scrolling.

soininen commented 1 month ago

but more convenient access to the entities. This helps to avoid the scroll bar in many occasions.

Can you be more specific? What is supposed to make the auxiliary view more convenient? Which scroll bars you mean? Any usage examples? I am just trying to wrap my head around what we are trying to achieve here.

I am also worried about space. We are already in trouble trying to squeeze in all the docks in Table view.

jkiviluo commented 1 month ago

As said, the tree is not going anywhere (unless everybody seems to agree they don't use it anymore).

When one has a reasonable set of classes and entities for modelling, finding the entities you want often becomes a matter of either opening/closing the down-arrows or then scrolling back and forth on a long list of entities. Both options are cumbersome. Much better if you can just click the class from which you are looking for an entity (easier to click a class name than a small down-arrow, and will also work better with keyboard) and then see all the entities for that class in a separate column - possibly without a scroll bar unless there is a lot of them. The end result is less clicking on average.

DillonJ commented 1 month ago

@jkiviluo we spoke before about an entity pane in addition to the parameter values and definitions panes - here you would just see the entities in tabular format along with their descriptions etc. You could use this pane to create/remove/manipulate entities. Did anything become of that? I think this is similar to the idea here which I see as complimentary to the tree - but I find the tree much better for viewing the relationships between things

jkiviluo commented 1 month ago

I see the entity pane dialog as something different, it would dig deeper into contents of an entity (https://github.com/spine-tools/Spine-Toolbox/issues/2102). This issue is about filtering with less clicks and ordering - not showing more information.

And yes, this has the unfortunate side effect of adding to the horizontal space, which is sometimes limited. However, since the tree is still there, it does not need to be used if low on horizontal space.