Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More compact Gantt drawing strategy in Time Strip and Plan views #6113

Closed
charlesh88 opened this issue Jan 12, 2023 · 5 comments
Closed

More compact Gantt drawing strategy in Time Strip and Plan views #6113

charlesh88 opened this issue Jan 12, 2023 · 5 comments
Assignees
Labels
type:feature Feature. Required intentional design
Milestone

Comments

@charlesh88
Copy link
Contributor

charlesh88 commented Jan 12, 2023

Problem
The current Plan Gantt view uses a lot of vertical space because we show the full name of each activity, which prevents Activities from "wrapping up" and laying out more horizontally efficiently:

Screen Shot 2023-01-11 at 2 51 19 PM

Solution

  • Implement a drawing mode that clips the Activity name to the span of its duration. This will of course mean that Activities with short widths will clip and often completely hide their names, depending on zoom level.
  • This should be a settable property in composed Plan objects and Time Strip views. The setting should be defaulted to enabled.
    Screen Shot 2023-01-11 at 4 35 56 PM
  • Do not make this the default drawing mode for non-composable Plan objects so as to avoid introducing an undesirable change. We may want to later change it to be the default pending user feedback, or allow the user to change the view via a view switcher, action or other gesture.

Additional context
Add any other context or screenshots about the feature request here.

@charlesh88
Copy link
Contributor Author

@shefalijoshi says:
Plan views are difficult to navigate and take up too much vertical space resulting in scrolling. We need to improve the layout to reduce this.

To achieve this, we can, move activity name display so that it always only renders inside the activity 'rectangles'.
Things to consider are:
2. How to display an activity name that cannot fit at all when the activity duration is too short.
3. How to display an activity name that fits partially? We could clip the name.

While we're working on this issue, we should also ensure that we are showing the activity name in the inspector properties when an activity is selected. We might want to look at how to address the case where multiple activities are selected as well (talk to UX).

@charlesh88
Copy link
Contributor Author

charlesh88 commented Mar 1, 2023

@charlesh88: notes from discussion 3/1/23 Shefali, Jesse, Andrew, Rukmini:

  • General plan view, need a design approach for:
    • Better approach to Gantt bars, particularly for new clipped name drawing method where very small width Activities can be packed right next to each other horizontally. Activities that are at least 2px wide can use a border on their right edge that separates them from other Activities. We may find that 2px is a minimum width for these bars; anything smaller than that would then wrap down vertically to the next row. Does Mark Shirley have any thoughts here?
    • Do we need to distinguish zero duration events from Activities with duration? If so, how might we do that? A solid diamond shape is an established convention, but potentially has the same issue as noted immediately above. Again, Mark Shirley?
  • Composable Plan object
    • Rename to distinguish from non-composable plan objects from the tree; think Overlay Plot vs. plot view.
    • Inspector in Edit mode includes:
      • Checkboxes for swimlane visibility; browse view reads those back
      • Toggle for "Clip activity names"; will read plan JSON metadata to determine initial setting.
    • Keep upload JSON button in Properties, but make it not required.
    • This new Plan object can only have one plan in it, fix logic of uploaded plan JSON vs. plan from tree:
      • Like Gauge, prompts a warning dialog if user tries to drag in another plan.
      • Dragging from tree onto a Plan obj with either an uploaded JSON OR a pre-existing plan from the tree prompts a warning dialog.
      • Clicking "Upload JSON" on a Plan obj with a plan from the tree prompts a warning dialog.
      • "Upload" button must be set to not required.
  • Non-composable Plan view
    • New icon design; think telemetry object vs. Overlay Plot.
    • Remove "Upload" button.

charlesh88 added a commit that referenced this issue Mar 15, 2023
- Refined CSS class naming and application.
- Set cursor to pointer for Activity elements.
- Added <title> node to Activity elements.
- Styling for selected Activities.
- Better Inspector tab name.
charlesh88 added a commit that referenced this issue Mar 15, 2023
- Now uses SVG <symbol> instead of rect within Activity element.
- Passes in `rowHeight` as a prop from Plan.vue.
- SWIMLANE_PADDING const added and used to create margin at top and bottom
edges of swimlanes.
- Refined styling for selected activities.
- New `$colorGanttSelectedBorder` theme constant.
- Smoke tested in Espresso and Snow themes.
@charlesh88
Copy link
Contributor Author

charlesh88 commented Mar 15, 2023

Testing Notes

Example Plan JSON file, dates from 2023-03-15 21:00:00.000Z to 2023-03-22 10:00:00.000Z:
CH synth plan 03-15-23 v5.1.json.zip

  1. Create a new Plan object using the attached JSON file or use an existing Plan that you know is well-formed.
  2. Set the Time Conductor in Fixed mode to a start and end that encompasses the plan's timeframe.
  3. Create a new Gantt Chart object, then drag in the plan object from step 1.
  4. Verify that the plan is displayed as expected.
  5. In the Config tab > "Display Settings", toggle "Clip Activity Names" and verify the plan is displayed similarly to the reference images here.
  6. In the Config tab > "Swimlane Visibility", toggle a swimlane and verify that it is hidden and then shown as expected.
  7. Enable "Clip Activity Names" and then save and exit editing.
  8. Nav to another object and back to your Gantt Chart object and verify that all saved configuration is restored as expected.
  9. Manipulate the Time Conductor start and end (manually, or via zoom and pan in the ticks area) to pan and zoom the timeframe. Verify the view changes accordingly and that the time ticks at the top of the view align consistently with activities.
  10. Change the width of the Gantt area by dragging the tree or Inspector pane edges to expand or shrink the main view's width. Verify that the time scale and activities proportionally scale correctly and sportily.
  11. Click a single activity and verify that the Inspector displays info in the Activity tab similar to what's shown in the reference here.
  12. Hold the Cmd key and click another activity to select two: do this with activities that overlap each other, and again with those that have a gap between the earliest end and latest start. Verify that the Inspector displays info in the Activity tab similar to what's shown in the reference here.
  13. Change the Time Conductor to real-time mode and (if possible) set the bounds to bring activities into view. Verify the plan is displayed similarly to the reference images here and that activities are registered correctly against the view's timescale.
  14. Edit the view and disable "Clip Activity Names". Save and exit editing, then perform steps 8 and above again.

Testing References

Edit mode, Clip Activity Names enabled, TC in fixed mode.
Screen Shot 2023-03-15 at 11 51 43 AM
Edit mode, Clip Activity Names disabled
Screen Shot 2023-03-15 at 11 51 51 AM
Edit mode, swimlane hidden
Screen Shot 2023-03-15 at 11 52 27 AM
Browse mode
Screen Shot 2023-03-15 at 11 51 24 AM
TC timeframe zoomed and panned
Screen Shot 2023-03-15 at 11 53 12 AM
Single activity selected
Screen Shot 2023-03-15 at 11 53 41 AM
Two activities selected
Screen Shot 2023-03-15 at 11 53 45 AM
TC in real-time mode
Screen Shot 2023-03-15 at 11 55 28 AM

ozyx pushed a commit that referenced this issue Mar 16, 2023
- Refined CSS class naming and application.
- Set cursor to pointer for Activity elements.
- Added <title> node to Activity elements.
- Styling for selected Activities.
- Better Inspector tab name.
ozyx pushed a commit that referenced this issue Mar 16, 2023
- Now uses SVG <symbol> instead of rect within Activity element.
- Passes in `rowHeight` as a prop from Plan.vue.
- SWIMLANE_PADDING const added and used to create margin at top and bottom
edges of swimlanes.
- Refined styling for selected activities.
- New `$colorGanttSelectedBorder` theme constant.
- Smoke tested in Espresso and Snow themes.
@ozyx ozyx closed this as completed in ff3a20e Mar 16, 2023
@ozyx ozyx added this to the Target:2.2.0 milestone Mar 16, 2023
@ozyx
Copy link
Member

ozyx commented Mar 16, 2023

VIPER-OPENMCT Testing Notes

  1. Create a Gantt Chart based on an existing VIPER Plan
  2. Change the VIPER Plan upstream (server-side)
  3. Verify that the change is reflected in the Plan object client-side within 1 minute of the update
  4. Verify that the change is reflected in the Gantt Chart object

@unlikelyzero unlikelyzero added type:feature Feature. Required intentional design and removed type:enhancement labels Mar 17, 2023
@akhenry akhenry self-assigned this Mar 17, 2023
@michaelrogers
Copy link
Contributor

Fix verified during testathon 03/17/2023. Tested in various combinations of hidden and visible swimlanes and the selection always persisted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature Feature. Required intentional design
Projects
None yet
Development

No branches or pull requests

5 participants