Page MenuHomePhabricator

[desktop] Add context menu
ClosedPublic

Authored by michal on Jul 19 2023, 9:46 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jun 26, 2:23 PM
Unknown Object (File)
Sun, Jun 23, 1:02 PM
Unknown Object (File)
Tue, Jun 18, 12:04 PM
Unknown Object (File)
Sun, Jun 2, 10:39 PM
Unknown Object (File)
May 19 2024, 1:49 AM
Unknown Object (File)
May 4 2024, 11:59 AM
Unknown Object (File)
Apr 24 2024, 9:53 AM
Unknown Object (File)
Apr 24 2024, 9:53 AM
Subscribers

Details

Summary

ENG-4407

Adds a right click context menu to the electron app. Uses electron-context-menu for that, because it comes with some nice defaults and window handling.

The github page readme contains a nice explanation of available options, so if anyone thinks we should change the list I'm open to that.

Adding ashoat as there's a new dependency

Test Plan

Right click on text and images and check if context menu is displayed:

image.png (254×284 px, 24 KB)

image.png (120×248 px, 22 KB)

I checked if all visibile options work as expected.

On windows it should work the same way, it will just show an additional "Select All" option.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

What do you think about adding some of "save image"/"save image as"/"save video"/"save video as"?

I see that showLearnSpelling is on by default, did you check it? Did you check if link menu items work (showCopyLink)?

It's worth noting that showInspectElement is dev only

New dependency looks good!

Added showSaveImageAs and showSaveVideoAs.

Checked the showCopyLink. showLearnSpelling is enabled by default but spellcheck in browser window is off by default so it doesn't show up.

This revision is now accepted and ready to land.Aug 2 2023, 2:35 AM