Comments (11)
I think selecting the item that has the context menu is pretty standard. As a user I would be surprised if that doesn't happen. Maybe we need a switch to freeze the graph view instead?
from spine-toolbox.
Yeah, just seems weird at the moment that the whole graph needs to be slowly calculated and drawn before showing the context menu for the "root" item.
from spine-toolbox.
You're right, it's a problem. How about asking the user if they want to rebuild the graph if it has more than X elements? We could use the same widget we use to show build progress to prompt the user.
Another idea is to provide a context menu togglable action for the entity graph widget to temporarily disable graph rebuilds. So if the user wants to keep their graph for a while they can toggle this action true.
Actually, I think there are two problems: one, losing your graph because of an accidental click, and two, the button to stop the graph build is not very responsive, probably because the build happens in another thread. The first can be solved with one of my two ideas above, or something else probably. For the second I think we need to check more often from the thread that builds the graph if the user has pressed stop.
These are just ideas and thoughts of course, not saying it has to be done exactly this way.
from spine-toolbox.
I agree that selecting the items on right click is standard behavior and perhaps we should not change that.
There is already an issue about some ideas to "disconnect" the Entity tree selection from the Graph view: #2449
Two additional options that come to my mind:
- Add check boxes to entity tree when in Graph view. The downside is that you cannot select multiple items with Shift pressed --- or maybe you can. We have that functionality in Importer (select source tables, then press Space).
- Have another list (or tree) in Graph view which contains the items in the graph. You can add/remove items by dragging or by context menu in Tree view.
from spine-toolbox.
I don't like checkboxes, it's quite cumbersome to select multiple things at the same time. One also needs to deselect adding to the cumbersomeness.
More lists would also be problematic, since it takes real-estate and has the similar issues about deselecting.
Isn't another option to have a refresh button (e.g. top left corner of graph widget)- the graph is not redrawn unless refresh is pressed (or F5). It could be smart and become active only once the selection has X items as Manuel was suggesting.
In addition, I also think right-click does not need to select the underlying entity/class, the context menu still applies to that one and that's what the user wants to use. No need to change selections.
With those two changes, I think the current system would become quite good.
from spine-toolbox.
Not selecting on right-click is a big leap to me, how do we make it consistent? Everywhere else in the app, from design view to item properties to every view in db editor selects the item on right-click, if we want to not do it in entity tree we need to ask ourselves if we also want to not do it everywhere else.
The problem is not related to selecting the item per se, it's that selecting the item triggers the graph build, I think that's what we need to try and solve.
from spine-toolbox.
Yeah, it can be a big leap, but it may also be surprisingly unobtrusive change. And maybe does not change expectations how it would work elsewhere. This could be tested how it feels in a branch (I suppose it's a really quick change).
Even if the graph is not updated, I think it's not nice to lose the selection - one needs to build the selection back if that selection is still relevant (which I suppose it will often be).
from spine-toolbox.
Actually, one can test it already: ctrl-right click does not select the item (although I suppose technically it should). I like it - I don't want to loose the selection, so I'm happy to see that it remains even if I would do something like 'add entity'.
from spine-toolbox.
Another thing is some of the options in the context menu apply to the selection. So if I wanted to affect an item but right-click didn't select it, I would need to select it with left click and then right click and that's just very inconvenient.
I don't think we should drop an standard because of an unrelated problem - the problem is not selecting, the problem is triggering the graph rebuild.
from spine-toolbox.
You're right - some of the options do indeed depend on the selected item. That can't be overlooked.
I need to start using ctrl-select when I want to maintain my selection. Too bad it's obscure for users who don't know about it.
How about that refresh? I really think doing a refresh button (that is also triggered by F5) would be the nicest way to go. The button could also hold auto-refresh option (or indicate when that's active due to small amount of entities, if that's the way we want to go). Auto-refresh should of course also be in the right-click context menu - and maybe available with e.g. ctrl-F5.
from spine-toolbox.
By the way - I only now realized the selection is maintained when right-clicking on one of the selected items. Which is great - at least that's what I would expect as a user.
from spine-toolbox.
Related Issues (20)
- Hierarchy of parameters
- Create workflow editor 'user mode'
- 'Manage plugins' window not showing text HOT 1
- Julia Installer wizard does not work in Windows bundle HOT 6
- Bundling SpineOpt and Julia installation inside Toolbox
- Limit the width of items in tree views
- Traceback when importing in DB editor
- Editing index name in a map does not change the index name
- Selection changes when alternatives are dragged in scenario tree
- Importer not importing entities if not a set number of columns
- the latest dev not working with conda python 3.12
- Two databases open, only entities from another DB show
- Entity groups for N-D entity classes HOT 1
- Toolbox silent exit when refreshing DB
- Activating and deactivating scenario filters in db breaks graph view
- QSpinBoxes are unusable on Win11 HOT 1
- Default Python on bundled app should point to the embedded Python HOT 1
- Ship a Python kernel with the bundled app HOT 1
- Entity tree clears when adding new entity
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spine-toolbox.