Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

⬆️ Electron 3 (Take Two) #18916

Merged
merged 14 commits into from May 20, 2019
Merged

⬆️ Electron 3 (Take Two) #18916

merged 14 commits into from May 20, 2019

Conversation

jasonrudolph
Copy link
Contributor

@jasonrudolph jasonrudolph commented Feb 26, 2019

Description of the Change

#18603 and #18815 upgraded Atom from Electron 2 to Electron 3, but we unfortunately experienced frequent crashes following those changes. As a short-term solution, #18908 reverted those changes.

This pull request restores the changes from #18603 and #18815. (It does so by reverting the changes from #18908.) Before we merge this pull request, we'll need to resolve the crashes that led to us having to revert the previous Electron 3 upgrade.

Issues to resolve

I think these issues are all caused by the upgrade to Electron 3. If we discover that they're not directly related to the Electron 3 upgrade, we can remove them from this list and address them separately.

Fixes #6666.
Fixes #18535.
Fixes atom/tabs#544

@Arcanemagus

This comment has been minimized.

@jasonrudolph

This comment has been minimized.

@carlos157oliveira

This comment has been minimized.

package.json Outdated Show resolved Hide resolved
@jasonrudolph

This comment has been minimized.

@as-cii
Copy link
Contributor

as-cii commented May 16, 2019

I also think we should consider looking into how text is being rendered in this new version before shipping it. Below you can find a zoomed-in screenshot of rendering the word Lorem in a variety of environments. Please, click on all of the images and quickly browse through the tabs to appreciate how stark the difference is for this pull request.

Atom on Electron 3 (this pull request)

Atom on Electron 3 0

VS Code on Electron 3 (latest published version)

VS Code

Atom on Electron 2 (Atom 1.38.0-beta0)

Atom on Electron 2 0

You can reproduce the above tests by using Fira Code Retina, 15px. I suspect some of the styling we do in TextEditorComponent is interacting oddly with the new Chromium version.

@jasonrudolph
Copy link
Contributor Author

I also think we should consider looking into how text is being rendered in this new version before shipping it.

Thanks, @as-cii. I've added this to the task list in the PR body.

@jasonrudolph

This comment has been minimized.

@50Wliu

This comment has been minimized.

@50Wliu

This comment has been minimized.

@rafeca

This comment has been minimized.

@rafeca

This comment has been minimized.

@rafeca

This comment has been minimized.

@as-cii as-cii marked this pull request as ready for review May 17, 2019 14:59
@as-cii
Copy link
Contributor

as-cii commented May 17, 2019

@rafeca and I think this pull request is ready to be merged. The sooner we do this, the more time we will have to catch bugs before it goes to Beta. Please, note that we are purposely ignoring #18915 for now because we haven't been able to reproduce it, and it's unclear how it would be related to the Electron upgrade.

Feedback on this is super welcome! Especially after this pull request gets merged, it would be useful to get as many 👀 on Nightly as possible to catch potential regressions that we didn't notice.

/cc: @atom/maintainers

@jasonrudolph
Copy link
Contributor Author

@rafeca and I think this pull request is ready to be merged.

Have you had a chance to run through the regression test plan? Once we've tested out all the items on that checklist, I'm 👍 on merging this pull request.

It's a pretty long checklist, so I'd be perfectly happy to divide and conquer with y'all.

@Arcanemagus
Copy link
Contributor

Note: The libgconf-2-4 dependency to be added in #19358 will need to be removed when this is merged, as Electron 3 doesn't require it.

@as-cii
Copy link
Contributor

as-cii commented May 20, 2019

Check for regressions experienced in previous upgrades

  • 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

Text Input/Keybindings

See how to setup keyboard layouts.

  • IME not working (1.19.0-beta2: Cursor stucks at the first letter when using macOS Chinese IME #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 (key-mappings with alt don't suppress Mac OS composition characters anymore (atom-1.19) #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 (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 (Keystrokes involving ctrl on Linux 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 (Display the correct drag image on Electron >= 1.14 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 (Fix missing drop indicator on Electron >= 1.14 tree-view#1055, Fix missing drop indicator on Electron >= 1.4 tabs#426, Fix mistakenly shown docks drop indicator on Electron >= 1.4 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 (Bad rendering after ~1 million lines #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 (Loss of subpixel AA on soft-wrapped line #16889, Don't break subpixel AA when cursor is at the end of longest line #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 (Upgrade Electron to v1.6.x #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 (Upgrade Electron to v1.6.x #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 (1.19, Linux: Middle-clicking an unsaved tab causes entire desktop to be unresponsive to clicks #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 (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 (Upgrade Electron to v1.6.x #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 (Atom 1.19.0 crashes instantly after launching #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 (Native tabs on macOS #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 (Globalmenu consumes 100% CPU and does not work electron/electron#8455, Menus not working in plasma 5.9 with global menu enabled #13885) Omitted

    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 (Slovak QWERTZ does not resolve keys correctly on macOS 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 (1.20.0: Popup jump when using macOS Chinese IME #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

@rafeca
Copy link
Contributor

rafeca commented May 20, 2019

I've done the sanity checks on Linux and haven't found any regression related to this upgrade. I have some notes though about some items:

Large file rendering (#16591)

I've tried with a several million lines file and the editor becomes almost unresponsive (good thing is that Atom shows a warning saying that the file is too big and may cause issues with the editor). When I tried to scroll to ~800k line Atom ended up crashing.

This same behaviour happened on current Atom beta, so it's not an electron issue.

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

I'm not able to test this one because I don't have a wheel mouse.

Middle clicking on unsaved tab (#15197)

I'm not able to test this one because I don't have a wheel mouse.

@as-cii as-cii merged commit dc39210 into master May 20, 2019
@as-cii as-cii deleted the electron-3.1 branch May 20, 2019 13:20
@nathansobo
Copy link
Contributor

Probable regression: #19372

@nathansobo nathansobo added the electron-3 Tasks related to upgrade to electron v3 label May 20, 2019
nathansobo pushed a commit that referenced this pull request May 20, 2019
This reverts commit dc39210, reversing
changes made to e18559f.
@nathansobo
Copy link
Contributor

Hate to have to say this, but I reverted this in 3da827b due to crashes related to #19372. The saga continues.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
electron-3 Tasks related to upgrade to electron v3
Projects
None yet
9 participants