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

refactor(29358): Refactor the Designer visual identity #745

Merged
merged 16 commits into from
Jan 20, 2025

Conversation

vanch3d
Copy link
Contributor

@vanch3d vanch3d commented Jan 13, 2025

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

The PR introduces visual changes to most elements (nodes and edges) in the Data Hub Designer. The aim is to highlight the paradigms that are similar to the Workspace (selectable and draggable nodes, toolbar for commands, status) while ensuring the two tools are immediately differentiated

Design

  • The layout of the nodes has been streamlined, to ensure handles (connection ports) are only on the left (target) or on the right (source) hand side of a node. It helps to convey a sense of "pipeline" with the Designer
  • The visual attributes of nodes and edges have been changed to convey different aspects:
    • Handles (the port on a node used for connections) are visually consistent
      • round for source handles, square for target handles
      • plain for primary (policy pipeline) handles, hollow for secondary (noise configuration) handles
      • all handles are black, except for primary pipeline handles that convey success (green) or error (red) processing of the policy (e.g onSuccess on a Data Policy or on failed transition in a `Behaviour Policy)
    • The border of nodes is in a plain light grey, changing to blue (when the node is selected or focused), green (when its "dry-run" validation is successful) or red (when it's a failure)
    • Edges are now displayed as (smooth) stepped connectors, to highlight the flow between the handles of nodes
    • Edges are displayed in plain colour (grey), changing to green (success) or red (failure) based on the "dry run" status of the validation of their source
    • A coloured header is used in nodes to show the type of element:
      • policies (data and behaviour) in orange
      • resources (script and schema) in pink
      • operators (any other constituent of a policy, e.g. topic filter, transition, etc.) in blue
    • Some of the internal properties of a node are carefully selected to be displayed inside the node, in a way that adds labelling to the more important handle

The PR also improves the layout of the handles and, by effect, the alignment of nodes on a gid layout. It fixes https://hivemq.kanbanize.com/ctrl_board/57/cards/29435/details/

Out-of-scope

  • handles are positioned so that they align with the nodes on both sides of the connection. The utility is not bound to the ChakraUI Theme, it will be done in a subsequent ticket

Before

screenshot-localhost_3000-2025_01_13-16_37_50

After

screenshot-localhost_3000-2025_01_13-16_38_40

screenshot-localhost_3000-2025_01_20-15_11_09

@vanch3d vanch3d self-assigned this Jan 13, 2025
@cla-bot cla-bot bot added the cla-signed label Jan 13, 2025
@vanch3d vanch3d marked this pull request as ready for review January 14, 2025 12:31
@vanch3d vanch3d requested a review from sfrehse January 14, 2025 12:31
@vanch3d vanch3d force-pushed the refactor/29358/designer-visual-identity branch 3 times, most recently from 2861e1e to 1710934 Compare January 16, 2025 18:13
Copy link
Contributor

@oli-hivemq oli-hivemq left a comment

Choose a reason for hiding this comment

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

I would recommend to look into refactoring all the code around position as I saw multiple instances of 44px and similar calculations all over the place.
It wouldn't take much to refactor this and have 1 source of truth (or at least minimise these sources of truth) and make your life easier when a refactoring request or an adjustment is needed.

Approving anyway not to block you 🦣

@sfrehse
Copy link
Contributor

sfrehse commented Jan 20, 2025

Once I want to save the ID of a data policy, it isn't stored; an error occurs after checking repeatedly.

@sfrehse
Copy link
Contributor

sfrehse commented Jan 20, 2025

Once I want to save the ID of a data policy, it isn't stored; an error occurs after checking repeatedly.

Pressing enter holds but clicking not

@sfrehse
Copy link
Contributor

sfrehse commented Jan 20, 2025

Once I want to save the ID of a data policy, it isn't stored; an error occurs after checking repeatedly.

Pressing enter holds but clicking not

Sorry, this is not true. The id of a data-policy is stored once the user left the focus one time from the data-policy node

@vanch3d
Copy link
Contributor Author

vanch3d commented Jan 20, 2025

Once I want to save the ID of a data policy, it isn't stored; an error occurs after checking repeatedly.

Pressing enter holds but clicking not

Sorry, this is not true. The id of a data-policy is stored once the user left the focus one time from the data-policy node

I think I noticed that issue but haven't been able to pin it down. Will look again, and opening a new ticket for it

@vanch3d vanch3d force-pushed the refactor/29358/designer-visual-identity branch from 4bb9665 to b42af0b Compare January 20, 2025 15:12
@vanch3d vanch3d merged commit 7b88e83 into master Jan 20, 2025
8 of 10 checks passed
@vanch3d vanch3d deleted the refactor/29358/designer-visual-identity branch January 20, 2025 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants