Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Menu should only be built once #3022

Closed
bbondy opened this issue Aug 7, 2016 · 2 comments
Closed

Menu should only be built once #3022

bbondy opened this issue Aug 7, 2016 · 2 comments
Assignees
Labels
perf polish Nice to have — usually related to front-end/visual tasks. QA/checked-Linux QA/checked-macOS
Milestone

Comments

@bbondy
Copy link
Member

bbondy commented Aug 7, 2016

We currently build a menu from template multiple times.
We should instead only do this only once, the call to Menu.buildFromTemplate returns a menu object and we can use it to find items in the menu and update them as needed.

The problem that happens is when a menu is regenerated and the menu is expanded, then clicks on menu items won't work. This happens especially around when the app starts if you try to quit the menu item click doesn't work.

@bbondy bbondy added this to the 0.11.5dev milestone Aug 9, 2016
@bsclifton bsclifton self-assigned this Aug 10, 2016
@bsclifton bsclifton added perf polish Nice to have — usually related to front-end/visual tasks. labels Aug 10, 2016
@bsclifton
Copy link
Member

Checking this out now...

@bsclifton
Copy link
Member

bsclifton commented Aug 11, 2016

While not ideal, some great improvements were made with #3055 that I think meet the criteria

The dynamic menus (Bookmarks/History) which are in development presented a challenge. Electron doesn't expose a way to remove MenuItems currently (it's definitely possible from a win32 perspective, I'm not sure about X11/macOS). We'd need to expose that before we can dynamically insert/delete without having to rebuild the menu

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
perf polish Nice to have — usually related to front-end/visual tasks. QA/checked-Linux QA/checked-macOS
Projects
None yet
Development

No branches or pull requests

3 participants