From 327676afa373b23f62e34fa3bb97d70df7fcdaf8 Mon Sep 17 00:00:00 2001 From: Jason Blais Date: Sat, 29 Apr 2017 02:48:15 -0400 Subject: [PATCH 01/10] Update CHANGELOG.md --- CHANGELOG.md | 71 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 41 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9ba51b7..c8795a87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,53 +1,64 @@ # Mattermost Desktop Application Changelog -## UNDER DEVELOPMENT +## Release v3.7.0 -The "UNDER DEVELOPMENT" section of the Mattermost Desktop changelog appears -in the product's `master` branch to note key changes committed to `master` -and are on their way to the next stable release. -When a stable release is pushed, "UNDER DEVELOPMENT" heading is removed -from the final changelog of the release. - -Release date: TBD +Release date: May 9, 2017 ### Improvements -- Added spell checker for English, French, German, Spanish, and Dutch. -- Removed "Display secure content only" option it's no longer necessary. -- Reset the window position if it's restored off-screen from minimized state. + +#### All Platforms + - Added an inline spell checker for English, French, German, Spanish, and Dutch. [#225](https://github.com/mattermost/desktop/issues/225) + - Removed an obsolete "Display secure content only" option, following an [upgrade of the Electron app to Chrome v56](https://github.com/electron/electron/commit/2e0780308c7ef2258422efd34c968091d7cd5b65). [#469](https://github.com/mattermost/desktop/pull/469) + - Refactored main app window code for ... [#470](https://github.com/mattermost/desktop/pull/470) + - Reset app window position when restoring it off-screen from a minimized state. [#471](https://github.com/mattermost/desktop/issues/471) + - Improved page loading and app view rendering when waking computer from sleep. #### Windows -- Removed Japanese fonts support it's no longer necessary. -- Added support for sound notifications on Windows 7 and 8. -- The application now respects 125% of display scaling. + - [Windows 7/8] Added support for sound when a desktop notification is received. [#467](https://github.com/mattermost/desktop/issues/467) + - Removed obsolete support for Japanese fonts. + - Removed blurriness on the app window at 125% display resolution. ### Bug Fixes #### All Platforms -- Fixed an issue where an unexpected row appeared after switching channels with `CTRL+K` shortcut. [#426](https://github.com/mattermost/desktop/issues/426) -- Fixed an issue where an unexpected extra window opened when clicking the public link for an uploaded file. - [#390](https://github.com/mattermost/desktop/issues/390) + - An extra row is no longer added after switching channels with CTRL/CMD+K shortcut. [#426](https://github.com/mattermost/desktop/issues/426) + - Fixed an issue where an unexpected extra app window opened after clicking a public link of an uploaded file. [#390](https://github.com/mattermost/desktop/issues/390) + - Fixed JavaScript errors when refreshing the page. [#440](https://github.com/mattermost/desktop/issues/440), [#448](https://github.com/mattermost/desktop/issues/448) + - Fixed vertical alignment of the Add Server "+" button in the server tab bar. [#460](https://github.com/mattermost/desktop/issues/460) #### Windows -- Fixed an issue where the main window still has focus and exists - in the classic Alt+Tab switcher after it's closed. - [#430](https://github.com/mattermost/desktop/issues/430) - [#431](https://github.com/mattermost/desktop/issues/431) + - Focus is now set to the next top-level window after closing the main app window. [#430](https://github.com/mattermost/desktop/issues/430) + - Fixed an issue where the app remained in the ["classic" ALT+TAB window switcher](http://www.askvg.com/how-to-get-windows-xp-styled-classic-alttab-screen-in-windows-vista-and-7/) after closing the main app window. [#431](https://github.com/mattermost/desktop/issues/431) #### Mac -- Fixed an issue where the application was not avaliable on the Dock after a reboot. - [#411](https://github.com/mattermost/desktop/issues/411) -- Fixed an issue where Quick Look doesn't close in file upload dialog. - [#498](https://github.com/mattermost/desktop/issues/498) + - Fixed an issue where the application was not available on the Dock after a computer reboot. [#411](https://github.com/mattermost/desktop/issues/411) + - Fixed an issue where Quick Look couldn't be closed after opening the file upload dialog. [#498](https://github.com/mattermost/desktop/issues/498) -#### Linux -- Fixed an issue where the setting was not saved when changing tray icon theme. - [#456](https://github.com/mattermost/desktop/issues/456) +#### Linux (Beta) + - Fixed an issue where the setting was not saved after changing the tray icon theme. [#456](https://github.com/mattermost/desktop/issues/456) -### New known issues +### Known Issues + +#### All Platforms + - [If you click twice on the tab bar, and then attempt to use the "Zoom in/out" to change font size, the app window doesn't render properly](https://github.com/mattermost/desktop/issues/334) + - [Holding down CTRL, SHIFT or ALT buttons and clicking a channel opens a new application window](https://github.com/mattermost/desktop/issues/406) + +#### Windows + - [Windows 7] [Sometimes the app tries to render the page inside the app instead of in a new browser tab when clicking links](https://github.com/mattermost/desktop/issues/369) #### Mac -- The application crashes when a file upload dialog is canceled without closing Quick Look. + - [After uploading a file with a keyboard shortcut, focus isn't set back to the message box](https://github.com/mattermost/desktop/issues/341) + - The application crashes when a file upload dialog is canceled without closing Quick Look. +#### Linux (Beta) + - [Ubuntu - 64 bit] [Right clicking taskbar icon and choosing **Quit** only minimizes the app](https://github.com/mattermost/desktop/issues/90#issuecomment-233712183) + - [Ubuntu - 64 bit] [Direct message notification comes as a streak of line instead of a pop up](https://github.com/mattermost/platform/issues/3589) + +### Contributors + +Many thanks to all our contributors. In alphabetical order: + + - [jasonblais](https://github.com/jasonblais), [jnugh](https://github.com/jnugh), [yuya-oc](https://github.com/yuya-oc) ---- From 3d5bde254cc5448d3d0c6c69e5d055c60c4e494f Mon Sep 17 00:00:00 2001 From: Jason Blais Date: Sat, 29 Apr 2017 10:13:02 -0400 Subject: [PATCH 02/10] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8795a87..c586f983 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,7 @@ Release date: May 9, 2017 #### Windows - [Windows 7/8] Added support for sound when a desktop notification is received. [#467](https://github.com/mattermost/desktop/issues/467) - Removed obsolete support for Japanese fonts. - - Removed blurriness on the app window at 125% display resolution. + - The application window now respects 125% display resolution. [#489](https://github.com/mattermost/desktop/pull/489) ### Bug Fixes From 7f52a416641802a40f6070d4b76c098073730e5a Mon Sep 17 00:00:00 2001 From: Jason Blais Date: Sat, 29 Apr 2017 10:13:51 -0400 Subject: [PATCH 03/10] Update CHANGELOG.md --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c586f983..73b87a66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,6 @@ Release date: May 9, 2017 #### All Platforms - Added an inline spell checker for English, French, German, Spanish, and Dutch. [#225](https://github.com/mattermost/desktop/issues/225) - Removed an obsolete "Display secure content only" option, following an [upgrade of the Electron app to Chrome v56](https://github.com/electron/electron/commit/2e0780308c7ef2258422efd34c968091d7cd5b65). [#469](https://github.com/mattermost/desktop/pull/469) - - Refactored main app window code for ... [#470](https://github.com/mattermost/desktop/pull/470) - Reset app window position when restoring it off-screen from a minimized state. [#471](https://github.com/mattermost/desktop/issues/471) - Improved page loading and app view rendering when waking computer from sleep. From ca651b0ad63a14e5e5b7ebda4b4f483fe6026434 Mon Sep 17 00:00:00 2001 From: Jason Blais Date: Sat, 29 Apr 2017 18:42:32 -0400 Subject: [PATCH 04/10] Add one more known issue to 3.7 changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 73b87a66..0566d6d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ Release date: May 9, 2017 #### All Platforms - [If you click twice on the tab bar, and then attempt to use the "Zoom in/out" to change font size, the app window doesn't render properly](https://github.com/mattermost/desktop/issues/334) - [Holding down CTRL, SHIFT or ALT buttons and clicking a channel opens a new application window](https://github.com/mattermost/desktop/issues/406) + - [Unable to upload a SAML certificate file from the file upload dialog](https://github.com/mattermost/desktop/issues/497) #### Windows - [Windows 7] [Sometimes the app tries to render the page inside the app instead of in a new browser tab when clicking links](https://github.com/mattermost/desktop/issues/369) From ab1254b7b964e58628cde21ee6e92ee8061331cd Mon Sep 17 00:00:00 2001 From: Jason Blais Date: Sun, 30 Apr 2017 00:35:36 -0400 Subject: [PATCH 05/10] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0566d6d9..66d3bb0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ Release date: May 9, 2017 - Added an inline spell checker for English, French, German, Spanish, and Dutch. [#225](https://github.com/mattermost/desktop/issues/225) - Removed an obsolete "Display secure content only" option, following an [upgrade of the Electron app to Chrome v56](https://github.com/electron/electron/commit/2e0780308c7ef2258422efd34c968091d7cd5b65). [#469](https://github.com/mattermost/desktop/pull/469) - Reset app window position when restoring it off-screen from a minimized state. [#471](https://github.com/mattermost/desktop/issues/471) - - Improved page loading and app view rendering when waking computer from sleep. + - Improved page loading and app view rendering. [#515](https://github.com/mattermost/desktop/pull/515) #### Windows - [Windows 7/8] Added support for sound when a desktop notification is received. [#467](https://github.com/mattermost/desktop/issues/467) From 13172570c01245018385bb450a658b6a0a070e56 Mon Sep 17 00:00:00 2001 From: Yuya Ochiai Date: Tue, 2 May 2017 23:00:40 +0900 Subject: [PATCH 06/10] Reset misspelled state after changing spelling language --- src/browser/webview/mattermost.js | 12 ++++++++++++ src/main.js | 9 +++++++++ src/main/SpellChecker.js | 6 +++++- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/browser/webview/mattermost.js b/src/browser/webview/mattermost.js index 24e7c4a0..ef4d59ce 100644 --- a/src/browser/webview/mattermost.js +++ b/src/browser/webview/mattermost.js @@ -148,6 +148,17 @@ notification.override({ } }); +function resetMisspelledState() { + ipc.once('spellchecker-is-ready', () => { + const element = document.activeElement; + if (element) { + element.blur(); + element.focus(); + } + }); + ipc.send('reply-on-spellchecker-is-ready'); +} + function setSpellChecker() { const spellCheckerLocale = ipc.sendSync('get-spellchecker-locale'); webFrame.setSpellCheckProvider(spellCheckerLocale, false, { @@ -156,6 +167,7 @@ function setSpellChecker() { return res === null ? true : res; } }); + resetMisspelledState(); } setSpellChecker(); ipc.on('set-spellcheker', setSpellChecker); diff --git a/src/main.js b/src/main.js index 90a0da1c..b83b44d3 100644 --- a/src/main.js +++ b/src/main.js @@ -542,6 +542,15 @@ app.on('ready', () => { ipcMain.on('get-spellchecker-locale', (event) => { event.returnValue = config.spellCheckerLocale; }); + ipcMain.on('reply-on-spellchecker-is-ready', (event) => { + if (spellChecker.isReady()) { + event.sender.send('spellchecker-is-ready'); + return; + } + spellChecker.once('ready', () => { + event.sender.send('spellchecker-is-ready'); + }); + }); ipcMain.emit('update-dict'); // Open the DevTools. diff --git a/src/main/SpellChecker.js b/src/main/SpellChecker.js index cea93d4b..a35451f4 100644 --- a/src/main/SpellChecker.js +++ b/src/main/SpellChecker.js @@ -1,5 +1,6 @@ 'use strict'; +const EventEmitter = require('events'); const simpleSpellChecker = require('simple-spellchecker'); /// Following approach for contractions is derived from electron-spellchecker. @@ -26,17 +27,20 @@ const contractionMap = contractions.reduce((acc, word) => { /// End: derived from electron-spellchecker. -class SpellChecker { +class SpellChecker extends EventEmitter { constructor(locale, dictDir, callback) { + super(); this.dict = null; this.locale = locale; simpleSpellChecker.getDictionary(locale, dictDir, (err, dict) => { if (err) { + this.emit('error', err); if (callback) { callback(err); } } else { this.dict = dict; + this.emit('ready'); if (callback) { callback(null, this); } From c333f7b87b866df29f4e0344588bb266fd681fd3 Mon Sep 17 00:00:00 2001 From: Yuya Ochiai Date: Wed, 3 May 2017 20:30:23 +0900 Subject: [PATCH 07/10] Enable spellchecker as default setting The language should be determined by user's locale. If it's not available in spellchecker, en-US is used. --- src/common/settings.js | 2 +- src/main.js | 3 ++- test/specs/browser/settings_test.js | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/common/settings.js b/src/common/settings.js index 18c47f8b..e4aab48a 100644 --- a/src/common/settings.js +++ b/src/common/settings.js @@ -24,7 +24,7 @@ function loadDefault(version, spellCheckerLocale) { flashWindow: 0 // 0 = flash never, 1 = only when idle (after 10 seconds), 2 = always }, showUnreadBadge: true, - useSpellChecker: false, + useSpellChecker: true, spellCheckerLocale: spellCheckerLocale || 'en-US' }; default: diff --git a/src/main.js b/src/main.js index b83b44d3..bcf284d0 100644 --- a/src/main.js +++ b/src/main.js @@ -96,7 +96,8 @@ try { settings.writeFileSync(configFile, config); } } catch (e) { - config = settings.loadDefault(); + const spellCheckerLocale = SpellChecker.getSpellCheckerLocale(app.getLocale()); + config = settings.loadDefault(null, spellCheckerLocale); console.log('Failed to read or upgrade config.json', e); } diff --git a/test/specs/browser/settings_test.js b/test/specs/browser/settings_test.js index ddbba9bb..ba1075ef 100644 --- a/test/specs/browser/settings_test.js +++ b/test/specs/browser/settings_test.js @@ -208,11 +208,12 @@ describe('browser/settings.html', function desc() { loadSettingsPage(). isExisting('#inputSpellChecker').then((existing) => existing.should.equal(true)). scroll('#inputSpellChecker'). + isSelected('#inputSpellChecker').then((selected) => selected.should.equal(true)). click('#inputSpellChecker'). pause(700). then(() => { const config1 = JSON.parse(fs.readFileSync(env.configFilePath, 'utf-8')); - config1.useSpellChecker.should.equal(true); + config1.useSpellChecker.should.equal(false); }); }); }); From 0389f6f7ebe18df764a51d77f2358188b1e10f05 Mon Sep 17 00:00:00 2001 From: Jason Blais Date: Thu, 4 May 2017 22:21:35 -0400 Subject: [PATCH 08/10] Add bug reporter for 3.7 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 66d3bb0f..ddfdda25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -60,6 +60,10 @@ Many thanks to all our contributors. In alphabetical order: - [jasonblais](https://github.com/jasonblais), [jnugh](https://github.com/jnugh), [yuya-oc](https://github.com/yuya-oc) +Thanks also to those who reported bugs that benefited the release, in alphabetical order: + +- esethna ([#524](https://github.com/mattermost/desktop/issues/524)) + ---- ## Release v3.6.0 From 179629bb08eed199c428db37d393154feaa559d1 Mon Sep 17 00:00:00 2001 From: Jason Blais Date: Thu, 4 May 2017 22:26:56 -0400 Subject: [PATCH 09/10] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ddfdda25..665c7cfc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -62,7 +62,7 @@ Many thanks to all our contributors. In alphabetical order: Thanks also to those who reported bugs that benefited the release, in alphabetical order: -- esethna ([#524](https://github.com/mattermost/desktop/issues/524)) +- [esethna](https://github.com/esethna) ([#524](https://github.com/mattermost/desktop/issues/524)) ---- From 34a56acdee9343713a2c268ceb3b3347ef91d4ae Mon Sep 17 00:00:00 2001 From: Jason Blais Date: Sat, 6 May 2017 08:08:15 -0400 Subject: [PATCH 10/10] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 665c7cfc..722054a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -62,7 +62,7 @@ Many thanks to all our contributors. In alphabetical order: Thanks also to those who reported bugs that benefited the release, in alphabetical order: -- [esethna](https://github.com/esethna) ([#524](https://github.com/mattermost/desktop/issues/524)) +- [esethna](https://github.com/esethna) ([#524](https://github.com/mattermost/desktop/issues/524)), [hanzei](https://github.com/hanzei) ([#523](https://github.com/mattermost/desktop/issues/523)) ----