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

Feature: PContextMenu #1154

Merged
merged 14 commits into from
Mar 15, 2024
Merged

Conversation

znicholasbrown
Copy link
Contributor

This PR implements a more generic and extended version of PIconButtonMenu. It exposes slots for target and context-menu (overrides the default POverflowMenu for maximum customization). The default re-exposes the default slot of POverflowMenu.

Some more interesting enhancements are the addition of behavior to open the context menu at position of the mouse. This should be helpful when creating true context menus (e.g. overriding the browser right-click behavior) or when position around the target container isn't quite the right behavior.

Check out the demo for some working samples of both

Copy link

netlify bot commented Mar 15, 2024

Deploy Preview for prefect-design ready!

Name Link
🔨 Latest commit 75d79eb
🔍 Latest deploy log https://app.netlify.com/sites/prefect-design/deploys/65f4b3c6046ca7000833f522
😎 Deploy Preview https://deploy-preview-1154--prefect-design.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@znicholasbrown
Copy link
Contributor Author

Ah we've got a demo that's bulk importing everything from the positions utility file... hmm I'll have to filter these out somehow

src/compositions/useMousePosition.ts Outdated Show resolved Hide resolved
src/types/position.ts Outdated Show resolved Hide resolved
src/utilities/positionRelative.ts Show resolved Hide resolved
src/components/ContextMenu/PContextMenu.vue Outdated Show resolved Hide resolved
src/utilities/positionRelative.ts Outdated Show resolved Hide resolved
src/components/ContextMenu/PContextMenu.vue Outdated Show resolved Hide resolved
@znicholasbrown znicholasbrown merged commit 4be910a into main Mar 15, 2024
6 checks passed
@znicholasbrown znicholasbrown deleted the nicholas/feature-p-context-menu-2024-03-15 branch March 15, 2024 20:48
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.

2 participants