-
Notifications
You must be signed in to change notification settings - Fork 2.8k
core: fix window.menuBarVisibility bug on startup
#10034
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
|
Adding: this.showMenuBar(menuBar, this.corePreferences['window.menuBarVisibility']);Somewhere in here: theia/packages/core/src/browser/menu/browser-menu-plugin.ts Lines 58 to 61 in 1f1aecb
Does the trick. #9830 Seemed to remove the |
Same thing I tried locally :) |
|
I'll drop the first commit (which exposes the issue) when approved 👍 |
window.menuBarVisibility bug on startup
colin-grant-work
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works for me and follows the correct pattern for preference-conditioned startup. 👍
msujew
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can confirm as well. The fix addresses the issue nicely 👍
The commit fixes an issue with the `window.menuBarVisibility` preference where the menu is not set correctly on startup since we wait for the preference-change event. The fix sets the menu when the preferences are ready, and updates on preference changes. Signed-off-by: vince-fugnitto <[email protected]>
2332f54 to
d8035d4
Compare
The commit fixes an issue with the `window.menuBarVisibility` preference where the menu is not set correctly on startup since we wait for the preference-change event. The fix sets the menu when the preferences are ready, and updates on preference changes. Signed-off-by: vince-fugnitto <[email protected]>
The commit fixes an issue with the `window.menuBarVisibility` preference where the menu is not set correctly on startup since we wait for the preference-change event. The fix sets the menu when the preferences are ready, and updates on preference changes. Signed-off-by: vince-fugnitto <[email protected]>
The commit fixes an issue with the `window.menuBarVisibility` preference where the menu is not set correctly on startup since we wait for the preference-change event. The fix sets the menu when the preferences are ready, and updates on preference changes. Signed-off-by: vince-fugnitto <[email protected]>
|
@vince-fugnitto, it seems that this fix only solves the issue for the browser platform but not Electron, where the modified code doesn't run. I think it was coincidence that the application startup in Electron ran in such a way that a listener was attached in time to catch the initial preference setting; downstream, we're seeing that that isn't always the case. |
What it does
The following wip pull-request exposes an issue previously reported on our forum. When starting the application, we end up in a state when the top-level menu (main menu) is not visible:
How to test
rm -rf ~/.theia)example-browserapplicationReview checklist
Reminder for reviewers
Signed-off-by: vince-fugnitto [email protected]