-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
GH-3254: Fixed the incomplete logic when checking if running in Electron #3264
Conversation
409ca6e
to
64d9adc
Compare
Reviewers, please do not do anything until my next notice. It is still in development, I had to create the PR. Thanks! |
- `is-electron` checks only the `process.versions.electron` in Node.js. - `process.versions` is not set/inherited when calling: - `child_process.fork` or - `cluster.fork`. - Extended the `is-electron` logic to verify `process.env` as well. Closes: #3254. Signed-off-by: Akos Kitta <kittaakos@typefox.io>
It is ready for the review. I am doing another verification cycle:
|
👍 Done. It works nicely. Before:
After:
|
I am getting the following errors when starting electron in my local env:
It could just be me. I asked @vince-fugnitto to check if it happens in his env. |
I'm confirming that it's happening on my side as well @elaihau |
@elaihau, @vince-fugnitto, thank you for checking. It happens on the |
I'll build master and verify if the error is there too and what the reason is. |
You can work around it (in debug mode) if you drop (splice) the Perhaps this commit broke it: 64b0b02 CC: @akosyakov |
@elaihau @kittaakos I confirmed it occurs in |
Wild guess: it is related to the icons. From the error message: |
Maybe its the reason since the |
As I see, it should be the FS path to the actual icon and the not the CSS class name of the icon. I will disable it: diff --git a/packages/core/src/electron-browser/menu/electron-main-menu-factory.ts b/packages/core/src/electron-browser/menu/electron-main-menu-factory.ts
index ea14dbdc..e105ff3e 100644
--- a/packages/core/src/electron-browser/menu/electron-main-menu-factory.ts
+++ b/packages/core/src/electron-browser/menu/electron-main-menu-factory.ts
@@ -100,7 +100,6 @@ export class ElectronMainMenuFactory {
items.push({
id: menu.id,
label: menu.label,
- icon: menu.icon,
type: this.commandRegistry.getToggledHandler(commandId) ? 'checkbox' : 'normal',
checked: this.commandRegistry.isToggled(commandId),
enabled: true, // https://github.com/theia-ide/theia/issues/446 |
Follow-up: #3268 |
We cannot use the CSS class name of the `font-awesome` icons. Signed-off-by: Akos Kitta <kittaakos@typefox.io>
your patch for the icons works well ! |
UI test failed
looks like it is not related to this change |
Akos I stole your 2nd commit #3280 @kittaakos |
Yes, a restart helped. Thanks for the review, I am merging this. |
is-electron
checks only theprocess.versions.electron
in Node.js.process.versions
is not set/inherited when calling:child_process.fork
orcluster.fork
.is-electron
logic to verifyprocess.env
as well.Closes: #3254.
Closes: #2992.
Signed-off-by: Akos Kitta kittaakos@typefox.io