-
Notifications
You must be signed in to change notification settings - Fork 5
NXT-4175: FileExplorerContextMenu improvements #73
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
NXT-4175: FileExplorerContextMenu improvements #73
Conversation
🦋 Changeset detectedLatest commit: 855f88b The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR improves the FileExplorer context menu behavior by adding support for right-click outside detection and toggling the context menu when clicking the options button. The key changes implement a new onContextMenuOutside composable to handle right-click events outside a target element (which onClickOutside from vueuse doesn't handle reliably), add context menu event propagation through MenuItems components, and enhance the FileExplorer context menu positioning with the shift middleware.
- Added
onContextMenuOutsidecomposable for reliable right-click outside detection - Added
item-contextmenuevent emission through MenuItem components - Enhanced FileExplorer context menu with toggle behavior and improved positioning
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/components/src/composables/onContextMenuOutside.ts | New composable that listens for contextmenu events outside a target element |
| packages/components/src/composables/index.ts | Exports the new onContextMenuOutside composable |
| packages/components/src/components/base/MenuItem/MenuItems.vue | Propagates item-contextmenu events through the component hierarchy |
| packages/components/src/components/base/MenuItem/BaseMenuItems.vue | Adds contextmenu event emission on menu items |
| packages/components/src/components/FileExplorer/components/FileExplorerContextMenu.vue | Implements context menu toggle, right-click outside handling, and adds shift middleware |
| packages/components/src/components/FileExplorer/components/FileExplorer.vue | Adds toggle logic to close context menu when options button is clicked again |
| .changeset/proud-dragons-march.md | Documents the changes for the release notes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/components/src/components/FileExplorer/components/FileExplorerContextMenu.vue
Show resolved
Hide resolved
c75f819 to
7402429
Compare
7402429 to
b68a536
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/components/src/components/FileExplorer/components/FileExplorerContextMenu.vue
Outdated
Show resolved
Hide resolved
packages/components/src/components/FileExplorer/components/FileExplorerContextMenu.vue
Show resolved
Hide resolved
b68a536 to
8144691
Compare
8144691 to
70755b6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/components/src/components/FileExplorer/components/FileExplorer.vue
Show resolved
Hide resolved
70755b6 to
d2cca86
Compare
d2cca86 to
1b339da
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/components/src/components/FileExplorer/components/FileExplorerContextMenu.vue
Show resolved
Hide resolved
- Add onContextMenuOutside hook from knime-ui - Prevent default contextmenu behavior on BaseMenuItems - Toggle context menu on options button clicks - Close context menu on right-click outside - Combine shift and flip floating-ui middleware NXT-4175 (Layout rework)
1b339da to
855f88b
Compare
NXT-4175 (Layout rework)