This document defines a set of enhancements to the diagram grid functionality present in the Graphical Modeling Framework (GMF). The goal of the enhancements is to help with the usability and discoverability of the grids and their feature set.
The following Bugzilla reports will be considered in this proposal:
No. | Reference and Description |
---|---|
E1* | Bugzilla 111902 - Usability: Some diagrams may be hard to see when the grid is visible |
E2* | Bugzilla 111960 - Difficult to discover how to change grid spacing |
E3 | Bugzilla 112799 - Shapes do not snap to grid when dragged over other shapes |
E4 | Bugzilla 114285 - disable grid visibility in overview |
E5 | Bugzilla 113685 - when snap to grid is on, nudge key should move object one grid unit (GEF Bugzilla #73605 ) |
E6 | Bugzilla 119248 - Snap to Grid should allow snapping from any side |
E7 | Bugzilla 119252 - Usability: diagram arrange all should snap to grid if snap to grid is on |
E8* | Bugzilla 119255 - Validation of grid spacing is inconsistent [Implemented] |
E9* | The grid visibility and snap to grid feature is persisted only as WorkspaceViewerProperties. |
E10* | Bugzilla 119256 All diagrams follow the grid spacing of the diagram preference. The user cannot have concurrent diagrams with different grid spacing values. The grid spacing values are not persisted. |
* These enhancements will be implemented for M4.
This feature must address the following high-level requirements:
No. | Description |
---|---|
R1 | Easy access to grid settings from diagram surface |
R2 | Ensure grid functionality propagates through all node/edge manipulation features |
R3 | Ensure grid functionality isn't intrusive or obstruct diagram functionality |
R4 | Grid should be active and visible inside shape compartments |
R5 | All use cases must support accessibility |
R6* | Grid settings should be persisted in the meta-model |
* Under consideration
The feature is subject to the following design constraints:
The enhancements chosen for implementation reflect the most important missing functionality for the grid feature set. Enhancement E8 was chosen because it will be very easy to implement.
The remaining items will not be implemented because they represent minor inconveniences or possibly enhancements that are not required. E5 was not chosen because the GEF request will provide GMF with the proper functionality for this enhancement.
Select the use case title to expand the details.
Brief description
A diagram grid's line style (solid, dashed or dotted), transparency and color will be configurable from the diagram's context menu and the main diagram menu.
Addresses
E1
Flow of events
-The user creates a new diagram or opens an existing diagram with the grid visible. The user may also set the grid visible.
-The user may now select a diagram's context menu and Diagram menu to modify the active diagram's grid line.
Brief description
The properties view should reflect the diagram grid properties (visibility, spacing, line style, transparency, order and color). The properties view would support a separate grid tab. Here is a mock up of the grid properties tab with a subset of the intended property set.
Addresses
E2, E9, E10
Flow of events
-The user creates a new diagram or opens an existing diagram with the grid visible. The user may also set the grid visible.
-The user chooses to show the properties view with the active diagram in focus.
- The diagram properties Advanced Tab displays the View > Grid table item with sub items: visibility, spacing, line style and color.
Brief description
The grid spacing preference value will accommodate spacing of equal value for each presented unit of measure.
Addresses
E8
Flow of events
-The user sets the maximum grid spacing for any of the units of measure
-The user switches to another unit of measure without error
Corollary: If the user exceeds the maximum for any unit measure then switching will also display an error
Brief description
There grid order (i.e. grid in front/back of shapes) will be a property of the diagram and the user will be able to change the setting on the fly.
Addresses
E1
Flow of events
-The user creates a new diagram or opens an existing diagram with the grid visible. The user may also set the grid visible.
-The user adds some diagram objects to the diagram.
-The grid will be rendered above/below the new objects based on the diagram property, even when nested or multiple objects overlap one another.
The grid properties could be persisted in the meta-model or remain as workspace viewer properties. I believe that the current solution is best because the grid feature is used as a helper for diagram arrangement and is not intrinsically part of the diagram. The properties should be expanded to accommodate all aforementioned grid properties. The preferences should also reflect new feature defaults.
The grid spacing may be increased using a
resize arrow above the grid lines.
A specific context menu could be generated for
the grid. This would bring up a "Grid Settings" dialog that would include grid
visibility, spacing, line style and color.
Independent grid spacing on the X and Y axis
Grid functionality tied to the ruler
Select the test case title to expand the details.