Skip to content

feature: withContextMenu support for Promise#58

Merged
jeff-phillips-18 merged 1 commit into
patternfly:v5from
jeff-phillips-18:context-menu-promise
May 26, 2023
Merged

feature: withContextMenu support for Promise#58
jeff-phillips-18 merged 1 commit into
patternfly:v5from
jeff-phillips-18:context-menu-promise

Conversation

@jeff-phillips-18
Copy link
Copy Markdown
Member

What

Closes #15

Description

Allows the use of a Promise when determining the context menu items when using withContextMenu

Type of change

  • Feature

Screen shots / Gifs for design review

ContextMenuPromise

/cc @jshaughn

@jeff-phillips-18
Copy link
Copy Markdown
Member Author

Copy link
Copy Markdown
Collaborator

@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.

Logic looks good and works as expected @jeff-phillips-18 !

Wondering if you think it'd be worth adding some text (similar to the Uncontrolled Context Menu example) which states that you can access the context menu on a node by ctrl + click

@jeff-phillips-18
Copy link
Copy Markdown
Member Author

@jenny-s51 It's the same as the previous example. ctrl-click or right-click will trigger the context menu. This is standard DOM element behavior using the onContextMenu parameter, though any custom Node/Edge could change how they trigger the context menu. It would probably be more appropriate for the docs to explain this than to add text to the demo app.

Copy link
Copy Markdown
Collaborator

@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.

@jeff-phillips-18 definitely makes sense - thought this was some additional logic built into topology. Right clicking via mouse works as expected, I tested via trackpad, and ctrl + clicking is right click behavior. Thanks for clarifying , LGTM

@jeff-phillips-18 jeff-phillips-18 merged commit a3d5e19 into patternfly:v5 May 26, 2023
@jeff-phillips-18 jeff-phillips-18 deleted the context-menu-promise branch May 26, 2023 13:34
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 5.0.0-alpha.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 5.0.0-prerelease.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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