JetBrains / JetBrains/MPS-extensions
Selection and navigation in diagrams is unexpected
- Dominant language
- JetBrains MPS
- Stars
- 88
- Forks
- 60
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 15
Description
From mbeddr.core created by [joswarmer](https://github.com/joswarmer) : mbeddr/mbeddr.core#1452
The selection inside the diagram editor is behaving in an unexpected way to the user in several cases. As these are probably all connected I have described four different cases below with the actual results and the results that I would expect.
# Case 1
Actions:
- I select a box inside the diagram, in my case this is a BlockInstance.
- The box is now highlighted and in the inpector I see the BlockInstance being selected.
- The use now clicks on the diagram canvas
- Result is that the box is no longer highlighted, and in the inspector I can see that the same BlockInstnace is still the currently selected node.
Expected result:
- After clicking on the diagram canvas I would expect that the node for which the diagram is defined (the CompositeBlockBody in my case) would be the currently selected node.
- I would also expect that there is a visual feedback that the diagram itself is now selected.
This is already something we decided should happen in the drag and drop story.
# Case 2
Actions:
- The user selects something outside the diagram, i.e. the CompositeBlock
- The user clicks inside the diagram
- Result :
- The diagram action are added to the context actions
- In the inspector I can see that the CompositeBlock is still the currently selected node
Expected result
- Identical to Case 1
# Case 3
Actions:
- I have the CompositeBlock selected,
- I now walk the model using the arrow keys "right"
- Result : cursor stops at the start ofn the diagram
- Expected result: cursor would move selkection into diagram
# Case 4
Actions:
- I have the CompositeBlock selected,
- I now walk the model using the arrow keys "down"
- The cursor is just before the diagram,
- The next arrow down will select the first element inside the diagram (a Connector), but the connector is not highlighted in the diagram
- Expected: the diagram to be selected, i.e the CompositeBlockBody
- Expected: if a connector is selected, it should be highlighted in the diagram
- when a BlockInstance is selected this way The first part of the editor inside the box is selected
- Expected: the BlockInstance Box to be selected (and hiighlighted)
- When continuing with arrow down, the outports are also visited, but the inports are never visted.
- When trying this again, other subsets of nodes inside the diagram are visted.
Expected result:
- All nodes inside the diagram will be visited
- the selected node is highlighted.
Contributor guide
Research direction
Start by reproducing the four cases in the diagram editor: canvas clicks, entering from an outside selection, and right/down arrow-key navigation. Compare diagram highlighting, inspector selection, and traversal of connectors, ports, and BlockInstances with the expected behavior; done means the diagram and every visited node are selected and visibly highlighted consistently.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100