-
Notifications
You must be signed in to change notification settings - Fork 16.5k
feat: add support for share menu on macOS #25629
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
Conversation
The API WG reviewed this PR at our Oct 5, 2020 meeting. After reviewing, the suggestion was made to instead create a ShareMenu class. |
I have changed the API's interface according to last wg-api meeting's advice, would love to get some reviews. |
The API WG approved this at our Oct 19 2020 meeting. |
is a known flake. |
Release Notes Persisted
|
`shareMenu` (electron#25629) and `toggleSpellChecker` (electron#26276) were missing. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Description of Change
Close #6330.
This PR adds a new MenuItem role
shareMenu
, that would turn a submenu into macOS share menu. There is also a newMenuItem.sharingItem
property added, to specify which items to share.There is also a new
ShareMenu
class added, which can create a top share menu directly. This is because MenuItem roles can only be applied on submenus, while it is very common to show a top share menu directly:Future extension
There could be a few possible feature requests about the share menu, like whether to show the "more" menu item, whether to hide certain items, callbacks to get notifications. Most of them can be achieved by adding new fields to the
SharingItem
structure.Checklist
npm test
passesRelease Notes
Notes: Add support for showing macOS share menu.