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.

@jenny-s51 jenny-s51 force-pushed the iss237 branch 2 times, most recently from 25beed5 to 864a1a7 Compare November 12, 2024 18:54
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

jenny-s51 added a commit to jenny-s51/react-topology that referenced this pull request Dec 4, 2024
…ly#250)

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 added a commit to jenny-s51/react-topology that referenced this pull request Dec 4, 2024
…ly#250)

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

fix styles

remove semicolon

update info icon color token for drag hint

update font-size token
jeff-phillips-18 pushed a commit that referenced this pull request Dec 4, 2024
* fix(context menu): Fix for context menu use when zoomed out (#249)
* feat(graph): Add selection based zoom (#248)
* feat(context menu): add prop to hide the context menu kebab (#250)
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