You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"Remove" default menu item needs to be aware of user preference #4976
Following on from #4975, the top-level Repository | Remove menu item needs to be aware of whether the user has this set:
I wasn't able to fix this in #4975 because we don't have an easy way to get access to this setting (which is managed by the renderer) when generating the menu entries (which is managed by the main process).
build-default-menu.ts is the place to make this change, as well as the related IPC call from the renderer, but this is a potential opportunity to think about how to rethink this area rather than adding another parameter.
I am interested in this issue as I would like to learn some more about Electron and how the core of the program is set up. This issue deals with the communication between main and renderer, which is great.
I would be more than happy to submit a pull request to add a parameter for the Remove label to be passed to main, however, this issue proposes rethinking this area.
Is this something there is still interest in? Are there goals in mind for what some kind of shake up to this area would help address?
@Daniel-McCarthy I think this is an interesting issue because of all the stuff that Electron touches. Feel free to dive into it when you've got time, I'd be happy to help with reviewing stuff...
We had a go at getting this working in #6489 but it uncovered a race condition with the tests that needs to be addressed. #6489 (comment) contains the gory details, and for the moment this is blocked on figuring that out.
Activity
iAmWillShepherd commentedon Jun 20, 2018
We have an event handler in
main.tswhich may be a good starting point.desktop/app/src/main-process/main.ts
Lines 207 to 223 in 061fc8e
The function that you can call to update the menu items is in
app-store.ts.desktop/app/src/lib/stores/app-store.ts
Lines 1350 to 1364 in 061fc8e
localStorage.getItem(confirmDiscardChangesKey)should be enough to get the value of the setting.Daniel-McCarthy commentedon Dec 17, 2018
I am interested in this issue as I would like to learn some more about Electron and how the core of the program is set up. This issue deals with the communication between main and renderer, which is great.
I would be more than happy to submit a pull request to add a parameter for the
Removelabel to be passed to main, however, this issue proposes rethinking this area.Is this something there is still interest in? Are there goals in mind for what some kind of shake up to this area would help address?
shiftkey commentedon Dec 24, 2018
@Daniel-McCarthy I think this is an interesting issue because of all the stuff that Electron touches. Feel free to dive into it when you've got time, I'd be happy to help with reviewing stuff...
Daniel-McCarthy commentedon Dec 24, 2018
Excellent, I will submit a pull request soon regarding this Issue.
shiftkey commentedon Mar 8, 2019
We had a go at getting this working in #6489 but it uncovered a race condition with the tests that needs to be addressed. #6489 (comment) contains the gory details, and for the moment this is blocked on figuring that out.