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

New Feature: Context Menu #819

Closed
Yiak opened this issue Jan 12, 2023 · 8 comments
Closed

New Feature: Context Menu #819

Yiak opened this issue Jan 12, 2023 · 8 comments
Labels
feature request Request a feature or introduce and update to the project.
Milestone

Comments

@Yiak
Copy link

Yiak commented Jan 12, 2023

Describe what feature you'd like. Pseudo-code, mockups, or screenshots of similar solutions are encouraged!

Jan-12-2023 17-58-16

Can we have a Context Menu component? It would be quite useful in most progressive web apps.

What type of pull request would this be?

New Feature

Any links to similar examples or other references we should review?

svelte-carbon-component has it at here, but it's hard to customize UI with tailwind.

The implementation shown in the GIF was from RadixUI:
https://www.radix-ui.com/docs/primitives/components/context-menu

@Yiak Yiak added the feature request Request a feature or introduce and update to the project. label Jan 12, 2023
@endigo9740 endigo9740 added this to the Future/Whenever milestone Jan 12, 2023
@endigo9740
Copy link
Contributor

endigo9740 commented Jan 12, 2023

That's an interesting one @Yiak, not a feature I see often in other libraries. We'll definitely take that into consideration! The only bummer is I'm assuming it might be desktop only. For mobile I'd wonder if we could do something like a tap and hold or if we just forego it altogether?

@Yiak
Copy link
Author

Yiak commented Jan 12, 2023

Thank you for your consideration! I would say a tap-and-hold (long press) works great on mobile.

@endigo9740 endigo9740 added the help wanted Extra attention is needed label Feb 3, 2023
@riziles
Copy link

riziles commented Feb 5, 2023

JSuites has a framework-agnostic implementation. Their version uses a very different approach on mobile.

@riziles
Copy link

riziles commented Feb 6, 2023

JSuites has a framework-agnostic implementation. Their version uses a very different approach on mobile.

I tried to get the JSuites context menu working in Svelte, but it was a pain in the a**. I retract my referral. There is actually a pretty good example in the Svelte REPL Playground that works fine on mobile: https://svelte.dev/repl/3a33725c3adb4f57b46b597f9dade0c1

@endigo9740
Copy link
Contributor

Thanks for giving it a try Riziles. I always worry about folks recommending stuff they haven't actually used and then running into a bunch of issues!

@endigo9740 endigo9740 changed the title [Feature request] Context Menu New Feature: Context Menu Feb 16, 2023
@endigo9740
Copy link
Contributor

Just a quick note - the recent update to the Popup utility features makes use of:
https://floating-ui.com/

The documentation for this mentions it includes support for creating content-menus based on mouse clicks. We should evaluate this as our solution for this feature in the near future

@endigo9740 endigo9740 removed the help wanted Extra attention is needed label Apr 5, 2023
@endigo9740 endigo9740 modified the milestones: Future/Whenever, v3.0 Jun 2, 2023
@Mahmoud-zino
Copy link
Contributor

Note for when implementing this component

using the event contextmenu works for Mobile (long tap) and desktop (right click) + It supports browsers' standard shortcuts like (´shift + F10`) on Firefox and Chrome out-of-the-box.

@endigo9740
Copy link
Contributor

FYI, as we begin prepping for the new standalone popup package, we're consolidating all known issues for popups into this new thread:

Your post will now be closed, but has been referenced in the post linked above. Please note that by doing this, your request is being folded into this larger effort. Please feel free to monitor the linked issue if you wish to track progress on this going forward.

@endigo9740 endigo9740 modified the milestones: v3.0 (Next), v2.0 Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request a feature or introduce and update to the project.
Projects
None yet
Development

No branches or pull requests

4 participants