feat: allow opening system context menu with double right click#1272
feat: allow opening system context menu with double right click#12720kku wants to merge 1 commit into
Conversation
|
I have tested this locally and it is working as it's written. We just need confirmation on whatever we want right click action on top of the context menu from the maintainers/UI, UX Team P.S. Please sign your commits as we can't accept PRs that fail DCO requirement |
Signed-off-by: Okku <40242277+0kku@users.noreply.github.com>
|
Currently in the PR it doesn't at all surface guidance for the user and the feature is hard to discover organically. I feel like it would be good to surface it somewhere. Some websites show instructions at the bottom of the context menu on how to invoke the native context menu. However, I'd want to be conscious about creating visual clutter, considering that the feature is unlikely to see use from most users. One option would be to have "Invoke context menu again for more options |
|
Could you provide any examples of where this is useful? I'm drawing a blank. The only place I use the native context menus is when typing/editing messages, and those spots already use the native context menu because they don't have any custom right-click menu. |
Pretty much the same reasons one might right click on any website, i.e.
For comparison, Discord opens the browser's own context menu when you right-click selected text on sent messages and that also pretty much addresses most of the use-cases described above. However, the approach proposed in this PR offers a more comprehensive solution and one which doesn't give inconsistent UX to users who don't need this, unlike Discord. |
|
@0kku I see, that's a good point, I didn't consider browser controls that people might use for reading rather than editing since I haven't used any of those... well aside from copy-paste. But if that is the main use case, why not do what Discord does and open the native context menu whenever text is highlighted? Come to think of it I think we have an open issue that is somewhat related: #940 I do think Discord's approach makes a lot of sense considering our context menu currently doesn't have any highlighted text related controls in it, so it opening automatically when the user selects text almost feels disingenuous, if that makes sense. Eg. there's a "Copy Text" button in the menu but that copies the entire message, not what you've got highlighted. There's also the fact that while this works ok for desktop, double-right-clicking on mobile is... very slow and janky. It takes like 5 seconds to long-press, so it's more like 10 to get through to the native menu... Feels like it would be annoying |
When the app's custom context menu is open, invoking the context menu again causes the system context menu to be invoked instead. This way users can bypass the custom context menu to access the browser's own controls.
Prior art
Works similar to the YouTube player context menu for example.
Some other websites use
ctrl/shift/alt+ context menu to open the native one instead of the custom one. For example, Google Docs usesshift+right-click. This has the benefit of being able to immediately invoke the intended context menu. The downside is that it requires a keyboard and thus doesn't work on devices with virtual keyboards or none at all, hence why I went with the design described above.How was this PR tested?
Screenshots & Screencasts (if appropriate)
Checklist:
I have confirmed that any new dependencies are strictly necessaryno ne depsPlease declare, if any, LLM usage involved in creating this PR
No