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(context menu): Add support to hide the kebab toggle in the context menu #250

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

jenny-s51
Copy link
Collaborator

@jenny-s51 jenny-s51 commented Nov 8, 2024

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

  • Feature
  • Bugfix
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

Screen shots / Gifs for design review

Screenshot 2024-11-08 at 1 42 46 PM Screenshot 2024-11-08 at 1 43 36 PM

@jenny-s51 jenny-s51 changed the title Add support to hide the kebab toggle in the context menu feat(context menu): Add support to hide the kebab toggle in the context menu Nov 8, 2024
@patternfly-build
Copy link

patternfly-build commented Nov 8, 2024

@jeff-phillips-18
Copy link
Member

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

image

Copy link
Collaborator Author

@jenny-s51 jenny-s51 left a comment

Choose a reason for hiding this comment

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

Nice catch @jeff-phillips-18, added a check for hidden to fix the label size.

@jeff-phillips-18
Copy link
Member

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

Add demo option to hide kebab context menus (#14)

add condition to contextSpace to fix label size

add check to TaskPill

remove hideContextMenuKebab from withContextMenuProps

add hideContextMenuKebab to NodeLabelProps to fix error
@jenny-s51 jenny-s51 merged commit 467ca17 into patternfly:v5 Nov 13, 2024
8 checks passed
@jeff-phillips-18
Copy link
Member

Released in v5.4.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants