From cb311d32beb466d218424bd888210d821c28552e Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Mon, 25 Jun 2018 00:43:41 -0500 Subject: [PATCH] =?UTF-8?q?Bump=20to=20Electron=202.0.2=20=F0=9F=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/dashboard/metrics-components.jsx | 2 +- .../message-list/lib/message-controls.jsx | 2 +- .../message-list/lib/message-participants.jsx | 2 +- app/menus/darwin.json | 3 +- app/menus/linux.json | 3 +- app/menus/win32.json | 3 +- app/src/components/evented-iframe.jsx | 2 +- app/src/components/outline-view-item.jsx | 2 +- .../components/participants-text-field.jsx | 2 +- app/src/components/tokenizing-text-field.jsx | 2 +- app/src/flux/stores/workspace-store.es6 | 11 +++- app/src/sheet-toolbar.jsx | 2 +- app/src/window-event-handler.es6 | 2 +- app/static/index.html | 2 +- package-lock.json | 66 ++++++++++--------- package.json | 2 +- 16 files changed, 58 insertions(+), 50 deletions(-) diff --git a/app/internal_packages/activity/lib/dashboard/metrics-components.jsx b/app/internal_packages/activity/lib/dashboard/metrics-components.jsx index 7e639e2d2..660c009a6 100644 --- a/app/internal_packages/activity/lib/dashboard/metrics-components.jsx +++ b/app/internal_packages/activity/lib/dashboard/metrics-components.jsx @@ -84,7 +84,7 @@ export class MetricHistogram extends React.Component { export class MetricGraph extends React.Component { componentDidMount() { if (!this.props.loading) { - window.requestAnimationFrame(() => this._el && this._el.classList.add('visible')); + window.setTimeout(() => this._el && this._el.classList.add('visible'), 50); } } diff --git a/app/internal_packages/message-list/lib/message-controls.jsx b/app/internal_packages/message-list/lib/message-controls.jsx index e6e03549c..2bfd14dd6 100644 --- a/app/internal_packages/message-list/lib/message-controls.jsx +++ b/app/internal_packages/message-list/lib/message-controls.jsx @@ -91,7 +91,7 @@ export default class MessageControls extends React.Component { menu.append( new SystemMenuItem({ label: 'Copy Debug Info to Clipboard', click: this._onCopyToClipboard }) ); - menu.popup(remote.getCurrentWindow()); + menu.popup(); }; _onShowOriginal = async () => { diff --git a/app/internal_packages/message-list/lib/message-participants.jsx b/app/internal_packages/message-list/lib/message-participants.jsx index e3c588482..747b9eb8b 100644 --- a/app/internal_packages/message-list/lib/message-participants.jsx +++ b/app/internal_packages/message-list/lib/message-participants.jsx @@ -63,7 +63,7 @@ export default class MessageParticipants extends React.Component { click: () => Actions.composeNewDraftToRecipient(contact), }) ); - menu.popup(AppEnv.getCurrentWindow()); + menu.popup(); }; _renderFullContacts(contacts = []) { diff --git a/app/menus/darwin.json b/app/menus/darwin.json index 41bb37cce..f4b566f99 100644 --- a/app/menus/darwin.json +++ b/app/menus/darwin.json @@ -61,8 +61,7 @@ { "label": "View", "submenu": [ - { "type": "separator", "id": "mailbox-navigation"}, - { "label": "Go to Inbox", "command": "navigation:go-to-inbox" }, + { "label": "Go to Inbox", "command": "navigation:go-to-inbox", "id": "first" }, { "label": "Go to Starred", "command": "navigation:go-to-starred" }, { "label": "Go to Sent", "command": "navigation:go-to-sent" }, { "label": "Go to Drafts", "command": "navigation:go-to-drafts" }, diff --git a/app/menus/linux.json b/app/menus/linux.json index a8ef8eaca..2c4cbefd3 100644 --- a/app/menus/linux.json +++ b/app/menus/linux.json @@ -43,8 +43,7 @@ { "label": "&View", "submenu": [ - { "type": "separator", "id": "mailbox-navigation"}, - { "label": "Go to Inbox", "command": "navigation:go-to-inbox" }, + { "label": "Go to Inbox", "command": "navigation:go-to-inbox", "id": "first" }, { "label": "Go to Starred", "command": "navigation:go-to-starred" }, { "label": "Go to Sent", "command": "navigation:go-to-sent" }, { "label": "Go to Drafts", "command": "navigation:go-to-drafts" }, diff --git a/app/menus/win32.json b/app/menus/win32.json index 45f09b833..2f84d7750 100644 --- a/app/menus/win32.json +++ b/app/menus/win32.json @@ -23,8 +23,7 @@ { "label": "&View", "submenu": [ - { "type": "separator", "id": "mailbox-navigation"}, - { "label": "Go to Inbox", "command": "navigation:go-to-inbox" }, + { "label": "Go to Inbox", "command": "navigation:go-to-inbox", "id": "first" }, { "label": "Go to Starred", "command": "navigation:go-to-starred" }, { "label": "Go to Sent", "command": "navigation:go-to-sent" }, { "label": "Go to Drafts", "command": "navigation:go-to-drafts" }, diff --git a/app/src/components/evented-iframe.jsx b/app/src/components/evented-iframe.jsx index 775bbf0cb..3eea1f6cb 100644 --- a/app/src/components/evented-iframe.jsx +++ b/app/src/components/evented-iframe.jsx @@ -445,7 +445,7 @@ class EventedIFrame extends React.Component { } // Services menu appears here automatically - menu.popup(remote.getCurrentWindow()); + menu.popup(); }; } diff --git a/app/src/components/outline-view-item.jsx b/app/src/components/outline-view-item.jsx index a076f6eb7..be3bb8d1b 100644 --- a/app/src/components/outline-view-item.jsx +++ b/app/src/components/outline-view-item.jsx @@ -279,7 +279,7 @@ class OutlineViewItem extends Component { }) ); } - menu.popup(remote.getCurrentWindow()); + menu.popup(); }; // Renderers diff --git a/app/src/components/participants-text-field.jsx b/app/src/components/participants-text-field.jsx index 636df6309..84e70e4f2 100644 --- a/app/src/components/participants-text-field.jsx +++ b/app/src/components/participants-text-field.jsx @@ -182,7 +182,7 @@ export default class ParticipantsTextField extends React.Component { click: () => this._remove([participant]), }) ); - menu.popup(remote.getCurrentWindow()); + menu.popup(); }; _onInputTrySubmit = (inputValue, completions = [], selectedItem) => { diff --git a/app/src/components/tokenizing-text-field.jsx b/app/src/components/tokenizing-text-field.jsx index 7f3a5a30a..f41c15854 100644 --- a/app/src/components/tokenizing-text-field.jsx +++ b/app/src/components/tokenizing-text-field.jsx @@ -733,7 +733,7 @@ export default class TokenizingTextField extends React.Component { }) ); } - menu.popup(remote.getCurrentWindow()); + menu.popup(); }; // Copy and Paste diff --git a/app/src/flux/stores/workspace-store.es6 b/app/src/flux/stores/workspace-store.es6 index c476dff42..08f6fd3db 100644 --- a/app/src/flux/stores/workspace-store.es6 +++ b/app/src/flux/stores/workspace-store.es6 @@ -34,7 +34,7 @@ class WorkspaceStore extends MailspringStore { const { windowType } = AppEnv.getLoadSettings(); if (windowType !== 'onboarding') { - require('electron').webFrame.setZoomLevelLimits(1, 1); + require('electron').webFrame.setVisualZoomLevelLimits(1, 1); AppEnv.config.observe('core.workspace.interfaceZoom', z => { if (z && _.isNumber(z)) { require('electron').webFrame.setZoomFactor(z); @@ -67,14 +67,19 @@ class WorkspaceStore extends MailspringStore { type: 'radio', command: 'application:select-list-mode', checked: this._preferredLayoutMode === 'list', - position: 'before=mailbox-navigation', + position: 'before=first', }, { label: 'Reading Pane On', type: 'radio', + id: 'reading-pane-on', command: 'application:select-split-mode', checked: this._preferredLayoutMode === 'split', - position: 'before=mailbox-navigation', + position: 'before=first', + }, + { + type: 'separator', + position: 'before=first', }, ], }, diff --git a/app/src/sheet-toolbar.jsx b/app/src/sheet-toolbar.jsx index 53e482261..017414d1d 100644 --- a/app/src/sheet-toolbar.jsx +++ b/app/src/sheet-toolbar.jsx @@ -157,7 +157,7 @@ class ToolbarMenuControl extends React.Component { _onOpenMenu = () => { const { applicationMenu } = remote.getGlobal('application'); - applicationMenu.menu.popup(AppEnv.getCurrentWindow()); + applicationMenu.menu.popup(); }; render() { diff --git a/app/src/window-event-handler.es6 b/app/src/window-event-handler.es6 index a32473d77..364ace2ee 100644 --- a/app/src/window-event-handler.es6 +++ b/app/src/window-event-handler.es6 @@ -364,7 +364,7 @@ export default class WindowEventHandler { }, }) ); - menu.popup(remote.getCurrentWindow()); + menu.popup(); } showDevModeMessages() { diff --git a/app/static/index.html b/app/static/index.html index 97e09e5c7..e0679ff40 100644 --- a/app/static/index.html +++ b/app/static/index.html @@ -3,7 +3,7 @@ Mailspring - + diff --git a/package-lock.json b/package-lock.json index 05820c695..23a040a42 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,9 +5,9 @@ "requires": true, "dependencies": { "@types/node": { - "version": "8.10.17", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.17.tgz", - "integrity": "sha512-3N3FRd/rA1v5glXjb90YdYUa+sOB7WrkU2rAhKZnF4TKD86Cym9swtulGuH0p9nxo7fP5woRNa8b0oFTpCO1bg==", + "version": "8.10.20", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.20.tgz", + "integrity": "sha512-M7x8+5D1k/CuA6jhiwuSCmE8sbUWJF0wYsjcig9WrXvwUI5ArEoUBdOXpV4JcEMrLp02/QbDjw+kI+vQeKyQgg==", "dev": true }, "abab": { @@ -124,6 +124,18 @@ "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", "dev": true }, + "ansicolors": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/ansicolors/-/ansicolors-0.3.2.tgz", + "integrity": "sha1-ZlWX3oap/+Oqm/vmyuXG6kJrSXk=", + "dev": true + }, + "ansistyles": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ansistyles/-/ansistyles-0.1.3.tgz", + "integrity": "sha1-XeYEFb2gcbs3EnhUyGT0GyMlRTk=", + "dev": true + }, "anymatch": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", @@ -1091,6 +1103,12 @@ "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", "dev": true }, + "builtins": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-0.0.7.tgz", + "integrity": "sha1-NVIZzWzxjb58Acx/0tznZc/cVJo=", + "dev": true + }, "caller-path": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", @@ -1729,9 +1747,9 @@ } }, "electron": { - "version": "1.8.7", - "resolved": "https://registry.npmjs.org/electron/-/electron-1.8.7.tgz", - "integrity": "sha512-q6dn8bspX8u8z6tNU4bEas6ZrdNavnrjJ6d/oz49Nb4zFIPrdh8p29AFjFlSAavypGwAVR/PhYOAGwzZSQSSVQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/electron/-/electron-2.0.2.tgz", + "integrity": "sha512-XmkGVoHLOqmjZ2nU/0zEzMl3TZEz452Q1fTJFKjylg4pLYaq7na7V2uxzydVQNQukZGbERoA7ayjxXzTsXbtdA==", "dev": true, "requires": { "@types/node": "^8.0.24", @@ -9727,15 +9745,6 @@ "integrity": "sha1-xQYbbg74qBd15Q9dZhUb9r83EQc=", "dev": true }, - "ansicolors": { - "version": "0.3.2", - "dev": true - }, - "ansistyles": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/ansistyles/-/ansistyles-0.1.3.tgz", - "dev": true - }, "archy": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", @@ -10481,11 +10490,6 @@ } } }, - "path-is-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.1.tgz", - "dev": true - }, "read": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", @@ -11319,10 +11323,6 @@ "inherits": "2" } }, - "text-table": { - "version": "0.2.0", - "dev": true - }, "uid-number": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", @@ -11380,12 +11380,6 @@ "dev": true, "requires": { "builtins": "0.0.7" - }, - "dependencies": { - "builtins": { - "version": "0.0.7", - "dev": true - } } }, "which": { @@ -11423,11 +11417,23 @@ } } }, + "path-is-inside": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.1.tgz", + "integrity": "sha1-mNjx0DC/BL167uShulSF1AMY/Yk=", + "dev": true + }, "semver": { "version": "4.3.6", "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=", "dev": true + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true } } }, diff --git a/package.json b/package.json index 811fa652f..9dff2ed14 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "babel-preset-react": "6.x.x", "chalk": "1.x.x", "devtron": "^1.4.0", - "electron": "1.8.7", + "electron": "2.0.2", "electron-installer-dmg": "0.2.x", "electron-packager": "8.7.x", "electron-winstaller": "2.x.x",