Skip to content

Enable contributable Application menu - #23030

Closed
João Moreno (joaomoreno) wants to merge 1 commit into
masterfrom
contributable-application-menu
Closed

João Moreno (joaomoreno) wants to merge 1 commit into
masterfrom
contributable-application-menu

Conversation

@joaomoreno

Copy link
Copy Markdown
Contributor

Having a contributable application menu seems like a inevitable feature coming since the menus.ts is growing more and more and every feature has its part in there. We'd like to disconnect all of that and have contributions come in with menu items. For example, the whole Debug menu should come in via the debug part.

For this to happen, we've come up with the following plan:

  1. Create a CommandService in the Main process, which simply forwards command calls to the active window.
  2. Create a MenuRegistry and MenuService in the main process. Figure out how to work around the fact that it requires a ContextKeyService (make it optional?) and how to get sub-menus in there.
  3. Adopt the whole application menu from menus.ts into MenuItems. Create a new menu id for the Application menu. Should it be only 1? Should the File be one, the Edit be another, etc?
  4. Whenever each renderer contributes menuitems to a menu that lives in the main process, we need to serialize those calls to the MenuRegistry over to the main process.

Benjamin Pasero (@bpasero) Johannes Rieken (@jrieken) Thoughts?

@jrieken

Copy link
Copy Markdown
Contributor

Hm... Why is it that way around? I would expect the active window to own the menu and to use the main process just as a way to get the app-menu onto the screen. I don't see the need to duplicate all the infrastructure on the main side

@joaomoreno

Copy link
Copy Markdown
Contributor Author

Yeah that is also very interesting, would love to move everything to the renderer. That would make things easier.

@joaomoreno João Moreno (joaomoreno) removed their assignment Apr 12, 2017
@joaomoreno
João Moreno (joaomoreno) deleted the contributable-application-menu branch July 12, 2018 13:13
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants