Skip to content
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

Upgrade to Electron 3.0 #18603

Merged
merged 22 commits into from Feb 1, 2019

Conversation

Projects
None yet
6 participants
@daviwil
Copy link
Member

commented Dec 20, 2018

This change upgrades Atom to Electron 3 :electron:. This gives us (and package authors) access to Chromium 66 and Node 10.

Related Issues

Fixes #17819.
Fixes #6666.
Fixes #18535.

TODO

  • Fix test failures
  • Check to see whether this PR needs to be merged: atom/tabs#552

General testing

  • Review issues tagged with electron to see if any of them are fixed
  • Verify that you can collaborate with Teletype
    • Host using Atom's current stable release can collaborate with guest using Atom with the new version of Electron
    • Guest using Atom's current stable release can collaborate with host using Atom with the new version of Electron
    • Host and guest can collaborate when both are using Atom with the new version of Electron
    Steps 1. Open a file 1. Share a portal 1. Have a guest join the portal 1. When guest edits the text in the file, verify that the host sees those changes

Check for regressions experienced in previous upgrades

Text Input/Keybindings

See how to setup keyboard layouts.

  • IME not working (#14911)

    • macOS
    • Windows 10
    • Ubuntu
    Repro steps
    1. Install an IME layout, for example Pinyin simplified
    2. Open Atom and use the layout you installed as the keyboard layout
    3. Example, if you picked Pinyin simplified type in zhongwenshuru

    Expected: in Pinyin simplified 中文输入 is expected

    gif

    Issues we've seen: Only shows latin first character and not every character typed.

    gif

  • macOS: Key binding with composition characters are ignored (#15189)

    Repro steps
    1. Open your keymap.cson file and add the following:
      'atom-text-editor':
        # use hjkl; vim-like when pressing alt (word by word, paragraph by paragraph)
        # or alt (letter by letter)
        'alt-h': 'core:move-left'
        'alt-j': 'core:move-down'
        'alt-k': 'core:move-up'
        'alt-l': 'core:move-right'
    2. Save keymap.cson and reload atom.
    3. Try the new keymappings under ABC - Extended keyboard layout

    Expected: the keybindings work

    Issues we've seen: it types out the modified keys and ignores the key mapping

  • macOS: Composition characters mess up insertion point (#15344)

    Repro steps
    1. Open keymap.cson and add the following:
      'atom-text-editor':
        'alt-n': 'core:move-down'
        'alt-o': 'core:move-down'
    2. Have the following in your buffer:
      Foo
      Bar
      
    3. Have the cursor at the beginning of file(before F character) Type alt-n, then arrow right, then insert a character. Observe that the character is inserted at the beginning of the line (where the alt-n left you).
    4. Repeat steps using alt-o instead of alt-n.

    Expected: Both alt-o and alt-n behave the same

    Issues we've seen:
    bug

  • Ubuntu: Keystrokes involving ctrl resolve to the default layout instead of the active layout (#13170)

    Repro steps

    This should be tested on Linux with gnome

    1. Install a Linux ditro with gnome, for example Ubuntu
    2. Install French AZERTY and English US QWERTY layouts
    3. Change the default layout to be French AZERTY
    4. Open Atom and switch to English US QWERTY layout
    5. Press ctrl-w

    Expected: core:close to dispatch (Or the keybinding-resolver to resolve to ctrl-w). Should be resolving to the keyboard layout that is chosen and not the OS default layout.

    Issues we've seen: core:undo dispatched because it was resolved as ctrl-z because AZERTY has Z where W is on QWERTY.

  • Other keyboard layouts on new Electron version

UI

  • tree-view drag image (atom/tree-view#1054)

    • macOS
    • Windows 10
    • Ubuntu
    Repro steps
    1. Open a project in Atom with multiple files and a few folders
    2. Drag a file into a folder

    Expected:
    image

    Issues we've seen:

    image

  • drag-and-drop indicator (atom/tree-view#1055, atom/tabs#426, atom/tabs#437)

    • macOS
    • Windows 10
    • Ubuntu
    Repro steps
    1. Open Atom with a few folder projects on tree-view (you can do this on terminal in a directory that has existing folder and having a space between each folder. Example: atom folderA folderB folderC)
    2. Drag and drop all of the folders to reorder them on Atom

    Expected:
    The placeholder indicates where the folder/project is being dropped to.

    screen shot 2017-03-29 at 16 31 16

    Issues we've seen:
    No placeholder shows up after drag and dropping

    screen shot 2017-03-29 at 16 30 51

  • Large file rendering (#16591)

    • macOS
    • Windows 10
    • Ubuntu
    Repro steps
    1. Open a file that has over one million lines
    2. Scroll down to the bottom

    Expected: To not regress the number of lines that can be rendered. Rendering to be correct for lines past a certain point. Atom 1.25 can render around 800k to 1 million lines correctly.

    Issues we've seen: Increased number of lines rendered but bad rendering past a certain point

    bad renderer

  • Loss of subpixel AA when the cursor is at the end of long lines (#16889, #16595)

    • macOS
    • Windows 10
    • Ubuntu
    Repro steps
    1. Open text-editor.js in Atom
    2. Copy the first 21 lines to a new untitled window
    3. Turn on soft wrapping and change language mode to javascript
    4. Resize the Window so it's soft wrapped
    5. On line 15 type a until the you reach the end of the window

    Expected: To not lose subpixel AA

    Issues we've seen: Loss of subpixel AA. Both when soft wrapping was enabled and disabled.

    subpixel aa loss softwrap

  • Scrolling horizontally shift + scroll wheel (#12696 (comment))

    • macOS
    • Windows 10
    • Ubuntu
    Repro steps
    1. Open a file that has long lines
    2. Turn off soft wrapping and resize the window so you have a horizontal scrollbar
    3. Press shift and scroll in both directions using the mouse wheel

    Expected: File to scroll horizontally in both directions

    Issues we've seen: File does not scroll horizontally at all in any direction

  • Scrollbars misbehaving on the first file that is opened (#12696 (comment))

    Repro steps
    1. Open Atom
    2. Open some file that has content enough to have a vertical scrollbar
    3. Close Atom
    4. Open Atom and look at the vertical scrollbar

    Expected: Scrollbar to be visible

    Issues we've seen: Scrollbar is not visible and is flickering when you are editing

  • Middle clicking on unsaved tab (#15197)

    • macOS
    • Ubuntu
    Repro steps
    1. Open Atom and open a new unsaved file.
    2. Make edits to the unsaved file and middle click on the tab.

    Expected:
    Clicking save/cancel or the options on the dialog works.

    Issues we've seen:
    The UI and the dialog is unable to receive mouse clicks. You can still choose options via Keyboard, but not mouse.

  • Linux: Atom scrolls even when not focused (#15482)

    Repro steps
    1. Open Atom with a large enough file that has a scrollbar
    2. Open a different application and place it over the Atom window
    3. Scroll with the mouse inside the other window
    4. Focus the Atom window

    Expected: Atom window should keep the original scroll position

    Issues we've seen: The Atom window scrolls after it is focused

Other

  • Deprecation warnings (#12696 (comment))

    • macOS
    • Windows 10
    • Ubuntu
    Repro steps

    This should be tested on macOS, Linux and Windows with community packages installed

    1. Open Atom
    2. Open the Developer tools console on the master branch and check for deprecation warnings
    3. Open the Developer tools console on the electron upgrade branch and check for deprecation warnings
    4. Compare the two outputs

    Expected: No new deprecation warnings

    Issues we've seen: New deprecation warnings both from core and community packages

  • Supported Versions of OS (#15297)

    • macOS
    • Windows 10
    • Ubuntu
    Repro steps
    1. Check the list of supported platforms Electron Master
    2. Check what version is listed as minimum for each platform on https://atom.io and https://atom.io/faq

    Expected: https://atom.io and https://atom.io/faq to display the same versions as the Electron documentation

    Issues we've seen: macOS version support changed and https://atom.io and https://atom.io/faq was not updated

  • macOS : Native tabs (#14711)

    Repro steps
    1. Open two atom windows on mac
    2. Go to View in menus and check Show Tab Bar
      screen shot 2017-06-03 at 5 10 32 pm
    3. Do this for both Atom windows.
    4. Drag one atom window to the other via tab bar

    Expected:
    Native Tab bar shows up and able to drag different windows to each other. Also make sure UI isn't messed up.

    Issues we've seen:
    Native Tab Bar doesn't work and messes up UI when enabled

  • Ubuntu with KDE: Menu uses 100% CPU (electron/electron#8455, #13885)

    Repro steps
    1. Install Atom on Ubuntu KDE. [instructions]
    2. Enable KDE plasma global menu: Right-click on the desktop -> Add Panel => Application Menu Bar. [demo]
    3. Start Atom.
    4. Try to use the desktop menu.

    Expected:
    Desktop menu items work

    Issues we've seen:
    Desktop menu items do nothing when you click on things.

  • macOS: Slovak QWERTZ (atom/atom-keymap#223)

    Repro steps
    1. Install Slovak keyboard layout on mac
    2. Open keyboard viewer to see the keys are are suppose to show up and open keyboard resolver on atom.
    3. hit cmd+'.

    Expected: Resolves to cmd+' like it shows on keyboard viewer on mac.

    Issues we've seen: It resolves to ctrl+§

  • macOS: IME jump (#15696)

    Repro steps
    1. Install an IME layout, for example Chinese pinyin
    2. Type one character

    Expected:
    Expected the IME to be positioned at under the character you entered
    Issues we've seen: The IME window is in the top left corner. When you enter the second character it jumps to be positioned under the text

@daviwil daviwil changed the title Update to Electron 3.0 WIP: Update to Electron 3.0 Dec 20, 2018

@daviwil daviwil changed the title WIP: Update to Electron 3.0 WIP: Upgrade to Electron 3.0 Dec 20, 2018

@eli-schwartz

This comment has been minimized.

Copy link

commented Dec 23, 2018

Over in Arch Linux, we've been packaging an unofficial electron 3.x package for the past month. Although it mostly works, we did receive a bug report with a proposed resolution that we've forwarded to atom/tabs#552

@Aerijo

This comment has been minimized.

Copy link
Member

commented Dec 28, 2018

Segmentation fault in this issue. Looks like somethings been deprecated.

@50Wliu

This comment has been minimized.

Copy link
Member

commented Dec 28, 2018

Deprecations have already been fixed in fs-plus 3.1.1, which is in this PR.

@ChrisLahaye

This comment was marked as off-topic.

Copy link

commented Dec 29, 2018

Over in Arch Linux, we've been packaging an unofficial electron 3.x package for the past month. Although it mostly works, we did receive a bug report with a proposed resolution that we've forwarded to atom/tabs#552

Which package? In the official repository or AUR?

@eli-schwartz

This comment was marked as off-topic.

Copy link

commented Dec 29, 2018

In the official repository:
https://www.archlinux.org/packages/community/x86_64/atom/
https://www.archlinux.org/packages/community/x86_64/electron/
https://www.archlinux.org/packages/community/x86_64/apm/

It's kind of a requirement for entry, since we don't really want to provide packages with large vendored dependencies (especially ones that don't use our packaging CFLAGS etc.) and we have a standalone electron package.

@Ben3eeE

This comment has been minimized.

daviwil added some commits Sep 7, 2018

Make invalid JS file fail Babel spec again
This change uses a different JavaScript syntax to cause the "when a .js file
does not start with 'use babel'" spec to fail again after upgrading to Electron
3 / Node 10.3.0.  The previous generator syntax seems to be supported in the
version of V8 used by Node 10 so we now need to use the 'export default' syntax
to trigger an error.

I've verified that changing the first line of this file to 'use babel' causes
the file to load successfully, so it seems this new syntax is effective to
verify the desired behavior.
Use correct fontWeight value in ThemeManager spec
In Chrome 66+ it seems that getComputedStyle().fontWeight returns the computed
numeric value of the style instead of the original descriptive name.  We now
look for value '700' which corresponds to the value of 'bold'.
Remove listeners for specific events in Task class
This change is necessary for Electron 3 to a bug in Node.js 10.2.x which causes
the `removeAllListeners` method to no longer remove all listeners for any event
name when no argument is passed:

nodejs/node#20924

This issue has been fixed in Node.js 10.3.0+ so we will have to remove this
workaround when we move to Electron 4.0 to avoid future event handler leaks.

@daviwil daviwil force-pushed the electron-3-0 branch from c38e45c to a41b69e Jan 18, 2019

Update StyleManager specs to address deprecated ::shadow selectors
As of Chromium 63, ::shadow CSS selectors have been fully removed:

https://developers.google.com/web/updates/2017/10/remove-shadow-piercing

As a result, any usage of ::shadow in a stylesheet seems to get removed as soon
as the stylesheet is applied to an HTMLStyleElement.  Since we have a couple of tests
that expect ::shadow selectors to be present, we must remove those expectations
since those selectors do not appear any longer.

@daviwil daviwil changed the title WIP: Upgrade to Electron 3.0 Upgrade to Electron 3.0 Jan 29, 2019

daviwil added some commits Jan 30, 2019

Remove cached-run-in-this-context dependency
This dependency is no longer needed now that we use Node's built-in APIs

@daviwil daviwil merged commit b92ae2a into master Feb 1, 2019

3 checks passed

Atom Pull Requests #20190201.2 succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@daviwil daviwil deleted the electron-3-0 branch Feb 1, 2019

jasonrudolph added a commit that referenced this pull request Feb 25, 2019

⬇️ electron@2.0.17
- Downgrade to latest version of Electron 2.0.x
- Revert script/lib/generate-startup-snapshot.js to the state it was in
  prior to the Electron 3 upgrade in
  #18603. This change is needed to
  resolve the error shown below:

```
Moving generated startup blob into "./out/Atom Dev.app/Contents/Frameworks/Electron Framework.framework/Resources/v8_context_snapshot.bin"
Error: ENOENT: no such file or directory, rename './out/v8_context_snapshot.bin' -> './out/Atom Dev.app/Contents/Frameworks/Electron Framework.framework/Resources/v8_context_snapshot.bin'
  at Object.fs.renameSync (fs.js:766:18)
  at electronLink.then (./script/lib/generate-startup-snapshot.js:128:10)
  at <anonymous>:null:null
```

jasonrudolph added a commit that referenced this pull request Feb 25, 2019

Revert "Merge #18603 from atom/electron-3-0"
This reverts commit b92ae2a, reversing
changes made to d4fe5cc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.