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
Electron v9.1.2 #10220
Electron v9.1.2 #10220
Conversation
We need an updated version that has prebuilt binaries for electron v9
The current build failure is caused by the Good thing is that there's an already merged PR that adds support for it, so we only need a new version of the package to get published (I've talked to @shiftkey , the maintainer of the package, and he's planning to publish a new version in the upcoming days). Once this gets fixed, builds will hopefully start passing 😃 |
This ensures that yarn downloads the binaries for the correct version of electron
This should solve some of the issues when installing devtools extensions in electron v9
This new version has compatibility with Electron v9
This is to prepare ourselves for the upcoming breaking change in Electron v10: https://www.electronjs.org/docs/breaking-changes#default-changed-enableremotemodule-defaults-to-false which will set its default to false. We need this setting because we're currently using the remote module in multiple places on the renderer process
This new version detects electron v9
This version is compatible with Electron v9
Seems like CI is passing now! The only blocking thing that we need to solve now is the installation of devtools extensions for development. |
Electron 9.1.1 + 9.1.2 have dropped recently, with bug fixes. |
We need electron/osx-sign#228 to be able to sign on macOS (I think)
Let Chromium decide what the system font is
This fixes the issues encountered when upgrading to electron v9. More info in https://bugs.chromium.org/p/chromium/issues/detail?id=1113293
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.
A few humble requests for the emoji workaround
Co-authored-by: Markus Olsson <j.markus.olsson@gmail.com>
Co-authored-by: Markus Olsson <j.markus.olsson@gmail.com>
Co-authored-by: Markus Olsson <j.markus.olsson@gmail.com>
Co-authored-by: Markus Olsson <j.markus.olsson@gmail.com>
Co-authored-by: Markus Olsson <j.markus.olsson@gmail.com>
Font tweaks for electron 9
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.
Fantastic work with the PR description here @rafeca, really helpful.
I did an audit of all the open issues labeled for electron 9 in the electron repository to see if I could find anything scary and I've outlined the results below. TL;DR is I don't think any of these are blockers for merging.
electron/electron#23726 - Unspecific crash, good idea to keep a link around should it pop up after release
electron/electron#23852 - Reports of custom protocols not working on macOS when the app is closed (cc @tierninho to test this once we've got an actual build out)
electron/electron#23859 - Crash when calling preventDefault in the new-window
event. We do this but we're not running the app in sandboxed mode so we should be safe
electron/electron#24135 - Crash during wake/sleep on macOS with multiple displays (worth keeping in mind if we see issues with this but I haven't been able to reproduce it)
electron/electron#24173 - Windows hangs due to new default value of allowRendererProcessReuse. We've temporarily reverted that property to avoid it.
electron/electron#24426 - We've address the emojis on both Windows and macOS in #10330 and https://github.com/desktop/desktop/blob/78e048fbdd6127c3e6c07772b442e75d6195665b/app/src/lib/fix-emoji-spacing.ts.
Related issue: #10085
Description
Updates the Electron from v8.4.0 to v9.1.0
This will primarly fix a
read: ENOTCONN
error we're seeing more frequently on Electron 7 due to the node version.Breaking changes
Split
shell.openItem(path)
into synchronous and asynchronous methods (more info).This has been addressed in this PR (commit 7d4a65e).
Note that this needs to get fixed at the same time as upgrading to v9 since that breaking change had no transition/deprecation plan.
Major changes
Chromium got upgraded from v80 to v83.
(Chromium v82 release got cancelled due to covid-19)
Node.js got upgraded from v12.13.0 to v12.4.1.
V8 got upgraded from v8.0 to v8.3.
(V8 v8.2 release got cancelled due to covid-19)
Chromium has changed the styling of form controls (more info).
I noticed a few subtle differences in the app caused by this (not big changes though since we have custom styling for most of the form controls):
I think the only want that we may want to address is the styling of the "clear" icon on search inputs.
Full changelog
Changelog of all major/minor Electron releases (these links may break when new Electron versions get published since the pagination in their changelog is not stable):
Known issues in Desktop
Development extensions not working
Currently the development extensions (React devtools, Chromelens, etc) are broken with Electron v9.
This is due to a big internal change in how extensions work in electron v9 (see this issue and this PR) which is not documented in the release notes.
There are a few underlying issues with extensions:
Extensions cannot be activated when using
file://
URLs (issue).In Desktop we load the app using a
file://
URL so this is completely blocking us.electron-devtools-installer
needs to add CRX3 support to be able to install React DevTools.There's a PR open for this, so we need to wait until it's merged and shipped.Edit: The PR has been shipped so this is no longer an issue!There are reports of extensions failing to load when activated just after launching Electron.
This is a Chromium issue (link to the issue). I don't yet know if this is going to affect us, but if it does we'll need to wait for a new Chromium release and a new Electron release that includes it.
Layout changes related to flexbox (again)
With the new version of Chromium we're experiencing more layout issues. All the issues we've lately experienced when upgrading Electron seem to be related to the gradual transition that Chromium is doing towards the new layout engine LayoutNG.
In this specific case, when using a
SVG
element as a flexbox item, Chrome will not be able to calculate correctly the width of the SVG element and will set it to its default size (300px):The code above gets rendered as:
Under normal situations, by defining the height of the SVG the render engine should be able to infer its width using the
viewBox
information but in this case it doesn't and it default to the default 300px size.The most interesting part is that this only happens when Electron is configured to tell Chromium to enable its experimental features (which we do in Desktop 😅).
This flag enables the Chromium experimental Web Platform Features. I tried enabling this same flag on my Chrome Web browser (via the
about://flags
interface) but couldn't reproduce the issue in Chrome 84 (I'm using this codepen), so it's possible that the issue got fixed and it never reached stable Chrome 🙃For now I've worked around this problem by wrapping the SVGs that caused problems under a
<div/>
in c092ccf. This is a harmless change and even if it didn't fix this specific bug it wouldn't be a change to worry about imho.As a next step initiative, I think we should disable the experimental Chrome features in Desktop. They were enabled a long time ago in this PR to overcome a limitation at that time (the
ResizeObserver
API was only enabled as an experimental feature).This was done when Desktop used v1.6.3, which used Chromium v56.0.2924.87 (more info), and the
ResizeObserver
API was enabled in Chrome v64 so we shouldn't need the experimental flag at least for that.I didn't want to disable the flag on this PR since it's possible that we're relying on experimental features somewhere else in the app (or in other rendering quirks that happen only when this flag is enabled) and I prefer this PR to focus only on Electron v9.
(As an additional data point, note that the Electron docs don't recommend enabling experimental features - source).
Release notes
Notes: No notes