Proposal: Grid Enhancements

Change Log

Contents

Items marked with expand when selected.

Introduction

[back to top]

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.

References

[back to top]

Requirements

[back to top]

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

Constraints

[back to top]

The feature is subject to the following design constraints:

 

Discussion

[back to top]

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.

 

Use Cases for intended implementation

[back to top]

Select the use case title to expand the details.

  1. Grid line style and color

  2. Diagram Properties

  3. Size validation

  4. Grid Visibility

Considered Approaches

[back to top]

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.

Design Artifacts

[back to top]

Future Considerations

[back to top]

  1. The grid spacing may be increased using a resize arrow above the grid lines.

     

  2. 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.

     

  3. Independent grid spacing on the X and Y axis

  4. Grid functionality tied to the ruler

Test Cases for intended implementation

[back to top]

Select the test case title to expand the details.

  1. Grid line style and color

  2. Diagram Properties

  3. Size validation

  4. Grid Visibility