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

feat(18150): Manual grouping of nodes in the workspace to create new contexts for metrics #231

Merged
merged 50 commits into from
Dec 20, 2023

Conversation

vanch3d
Copy link
Contributor

@vanch3d vanch3d commented Dec 6, 2023

See https://hivemq.kanbanize.com/ctrl_board/57/cards/18150/details/

This PR is the last step in the "metrics" initiative. It allows users to manually select adapters in the workspace and group them in an identifiable "entity" connected to the Edge.

Each group is a node exactly like the adapters or the bridges and reacts similarly: clicking on it will open a property panel, this time containing info related to all the adapters included.

Adapters within a group can still be accessed and manipulated. In particular, each adapter still has its link to the Edge

However, the group can be "collapsed", resulting in individual adapters' links being "combined" in a single, summarised, link.

Clicking on the link's observability icon opens a side panel, similar to the other links. This time, however, metrics from all the grouped adapters are available for selection and visualisation in one of the charts.

Grouping adapters will allow users

  • to visualise the various adapters connected to the Edge in a more meaningful way (for example by grouping adapters that are located on the same site)
  • to create a context where a subset of metrics can be aggregated and visualised on their own

Features

  • The workspace is now persisted into an internal "store" associated with localStorage. The layout of the graph and the groups (topology) will be all maintained across sessions
  • The metrics editor now shows multiple sets of metrics when available
  • The Workspace canvas contains a "group" command (in the top-left corner) that appears once at least two adapters are selected (use the shift+drag paradigm). While many nodes might be selected, the new group will only include adapters that are not already in a group
  • Groups have a custom "toolbar" on their top, once selected. It contains the "collapse/expand" and the "ungroup" commands
  • When ungrouping adapters, a confirmation will be required to prevent non-cancelable operation
  • The "Topology Graph: Layout" and its clunky grouping has been removed from the "Workspace Configuration" panel

Out-of-scope

Before

screenshot-localhost_3000-2023 12 06-11_46_41

After

screenshot-localhost_3000-2023 12 07-11_38_54

screenshot-localhost_3000-2023 12 07-11_39_00

screenshot-localhost_3000-2023 12 07-11_39_05

screenshot-localhost_3000-2023 12 06-11_50_18

screenshot-localhost_3000-2023 12 06-11_50_32

@cla-bot cla-bot bot added the cla-signed label Dec 6, 2023
@vanch3d vanch3d marked this pull request as ready for review December 7, 2023 12:17
@vanch3d vanch3d requested review from sfrehse and simon622 December 7, 2023 12:17
@vanch3d vanch3d self-assigned this Dec 7, 2023
@vanch3d vanch3d added the enhancement New feature or request label Dec 7, 2023
Copy link
Collaborator

@simon622 simon622 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unable to change a group name. When I create a group, it is always called "Untitled Group". This is very helpful.

I seem to be able to create arbitrary connections between group box and nodes which doesn't seem correct - by clicking and holding between the connector point at the bottom of a grouping box and dragging to the HiveMQ edge entity.

It wasn't entirely clear how to go about creating groupings in the first place. I have to experiment with various key presses to make a group appear. It we are adding this as function, it should be clear how to create these things to add value.

@vanch3d
Copy link
Contributor Author

vanch3d commented Dec 10, 2023

Unable to change a group name. When I create a group, it is always called "Untitled Group". This is very helpful.

A feature to edit the metadata of a group will be covered in another PR. See https://hivemq.kanbanize.com/ctrl_board/57/cards/18214/details/

I seem to be able to create arbitrary connections between group box and nodes which doesn't seem correct - by clicking and holding between the connector point at the bottom of a grouping box and dragging to the HiveMQ edge entity.

Ah, that's a bug with the canvas editor. Will fix.

It wasn't entirely clear how to go about creating groupings in the first place. I have to experiment with various key presses to make a group appear. It we are adding this as function, it should be clear how to create these things to add value.

This is an issue to address very quickly. Either with documentation that starts covering the UI, or (and?) some tour-like functionality to introduce users to the UX:

Screenshot 2023-12-10 at 18 16 11

Will be covered in another PR, see https://hivemq.kanbanize.com/ctrl_board/57/cards/18236/details/

Copy link
Collaborator

@simon622 simon622 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like all the points will be covered in upcoming work units

@vanch3d vanch3d force-pushed the feat/18150/workspace-manual-grouping branch from b250c10 to 307e083 Compare December 19, 2023 14:33
- add initial state
- add a reset action
- redesign the toolbar
- add a confirmation before ungrouping
- fix accessibility
fix(18218): Fix the availability of the "remove metrics" button for Stats

* fix(18218): add props for the state of the editor and condition avail…

* test(18218): fix tests
fix(18246): fix focus/selected status of nodes in workspace

* style(18246): add a fix to ReactFlow default style to match ChakraUI …

* style(18246): update style of wrapper node

* chore(18216): fix bug with CSS Linting script

* chore(18216): fix prettier
fix(18204): Refactor the location of a group and its nodes

* fix(18214): update type for group actions

* fix(18214): add bounding rect routine for groups

* fix(18214): update computation of position at creation and ungrouping

* fix(18214): fix connectable status

* fix(18214): fix group rendering

* test(18214): fix tests
feat(18214): Add editor for the group metadata

* feat(18214): add color picker component

* refactor(18214): refactor group metadata

* feat(18214): add store action for updating group metadata

* feat(18214): add metadata editor

* test(18214): add tests

* fix(18214): update translations

* fix(18214): fix rebase
fix(18293): Change mouse and keyboard interactions with nodes

* fix(18293): add context menu hooks for the nodes

* fix(18293): add navigation to panel on both double click and context …

* fix(18293): change navigation to panel on click

* refactor(18293): refactor the toolbar for the groups

* test(18293): fix test

* fix(18293): fix translations

* test(18293): add tests

* fix(18293): add keyboard access to the node's panel
…#235)

* refactor(18216): update the way groups are updating the status

* test(18216): update tests
…re (#243)

* feat(18161): add a store for the metrics

* refactor(18161): replace the deprecated localStorage with the new met…

* test(18161): add tests

* chore(18077): little bit of cleaning
…244)

* fix(18077): fix the group panels so that overview and observability b…

* refactor(18077): add char themes to the types

* refactor(18077): create a colorscheme for each grouped entity and ass…

* refactor(18077): add the chart theme to the props

* refactor(18077): apply the theme to the Stat chart

* refactor(18077): apply the theme to the line chart

* refactor(18077): apply the theme to the bar chart

* fix(18077): fix legend

* fix(18077): fix x-axis ticks snd labels

* refactor(18077): add a custom tooltip to all charts

* style(18077): fix style of stat chart

* fix(18077): fix translations

* refactor(18077): refactor the tooltip

* test(18077): add tests

* test(18077): fix tests

* fix(18077): hide the value from the bars

* test(18077): fix test

* fix(18077): add entity name into the series name
@vanch3d vanch3d force-pushed the feat/18150/workspace-manual-grouping branch from 307e083 to 72e68e8 Compare December 20, 2023 09:34
@sfrehse sfrehse merged commit 7bc2d0d into master Dec 20, 2023
10 checks passed
@sfrehse sfrehse deleted the feat/18150/workspace-manual-grouping branch December 20, 2023 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants