patternfly / react-topology

MIT License
13 stars 20 forks source link

feat(context menu): Add support to hide the kebab toggle in the context menu #250

Closed jenny-s51 closed 2 weeks ago

jenny-s51 commented 3 weeks ago

What

Closes #237

Description

Adds prop hideContextMenuKebab to toggle context menu via Shift + Right Click only. cc @ferhoyos

To test:

  1. In DemoNode.tsx, add hideContextMenuKebab as a prop of the DefaultNode component. In the demo app, go to Topology Package and in the "Node Options" dropdown, check Labels and Context Menus.

  2. In DemoTaskNode.tsx, add hideContextMenuKebab as a prop of the TaskNode component. In the demo app, go to Pipelines -> Task Nodes and select "Context Menus" in the toolbar.

Type of change

Screen shots / Gifs for design review

Screenshot 2024-11-08 at 1 42 46 PM Screenshot 2024-11-08 at 1 43 36 PM
patternfly-build commented 3 weeks ago

Preview: https://react-topology-pr-topology-250.surge.sh

jeff-phillips-18 commented 2 weeks ago

The label size for the node will need to handle the kebab menu not being shown:

image

jeff-phillips-18 commented 2 weeks ago

@jenny-s51 I believe TaskPill will have the same issue and needs the same check.

jeff-phillips-18 commented 2 weeks ago

Released in v5.4.1