diff --git a/CHANGELOG.md b/CHANGELOG.md index 42844548..1eef0979 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,69 +1,85 @@ # Mattermost Desktop Application Changelog -## UNDER DEVELOPMENT +## Release v4.1.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 16, 2018 ### Improvements #### All Platforms -- Added "Enable GPU hardware acceleration" option. It's disabled by default for stability. -[#734](https://github.com/mattermost/desktop/pull/734) -[#750](https://github.com/mattermost/desktop/pull/750) -- Enabled Certificate Transparency verification in HTTPS. -[#741](https://github.com/mattermost/desktop/pull/741) -- Clear memory cache at a certain interval in order to reduce memory usage. -[#746](https://github.com/mattermost/desktop/pull/746) -- Hide hovering URL bar for internal links. -[#745](https://github.com/mattermost/desktop/pull/745) -- Truncate long server names in server tabs. -[#518](https://github.com/mattermost/desktop/issues/518) -- Updated Mattermost animation icon which is displayed when loading a page. + - Improved stability and performance + - Reduced memory usage by periodically clearing cache. [#746](https://github.com/mattermost/desktop/issues/710) + - Fixed app crashing when a server tab was drag-and-dropped to the message view. +[#667](https://github.com/mattermost/desktop/issues/667) + - Added an option to disable GPU hardware acceleration in App Settings to improve stability in some systems. [#734](https://github.com/mattermost/desktop/pull/734) + - Fixed Windows crash issues during installation. [#728](https://github.com/mattermost/desktop/issues/728) + - Fixed Mac and Linux crashing after toggling "Show Mattermost icon in menu bar" app setting. +- Updated design for loading animation icon. [#748](https://github.com/mattermost/desktop/issues/748) + - Improved appearance of server tabs. +[#518](https://github.com/mattermost/desktop/issues/518) +[#717](https://github.com/mattermost/desktop/issues/717) + - Enabled [Certificate Transparency](https://www.certificate-transparency.org/what-is-ct) verification in HTTPS. +[#741](https://github.com/mattermost/desktop/pull/741) #### Windows -- [Windows 7/8] Desktop notifications now respect the duration setting of Control Panel. + - [Windows 7/8] Desktop notifications now respect the duration setting set in the Control Panel. [#601](https://github.com/mattermost/desktop/issues/601) ### Architectural Changes -- Major version upgrade of Electron to v1.7.x to v1.8.x. Electron is the underlying technology used to build the Desktop apps. + - Major version upgrade of Electron from v1.7.13 to v1.8.4. Electron is the underlying technology used to build the Desktop apps. [#711](https://github.com/mattermost/desktop/pull/711) [#741](https://github.com/mattermost/desktop/pull/741) - -- `require` and `module.exports` were replaced with `import` and `export`. + - Mac download files now use Zip packages rather than tar.gz files. [#749](https://github.com/mattermost/desktop/pull/749) + - ES6 `import` and `export` now replace the `require` and `modul.export` modules for better development. [#756](https://github.com/mattermost/desktop/pull/756) + - Storybook added to more easily develop React componets without executing the desktop app. [#757](https://github.com/mattermost/desktop/pull/757) ### Bug Fixes #### All Platforms -- Fixed correct spellchecker language not used for non en-US locales on initial installation. + + - Fixed an issue where an incorrect spellchecker language was used for non `en-US` locales on initial installation. [#632](https://github.com/mattermost/desktop/issues/632) -- Fixed an issue where error page appears when U2F device is used for multi-factor authentication through single sign-on. + - Fixed an issue where error page appeared when U2F device was used for multi-factor authentication through single sign-on. [#708](https://github.com/mattermost/desktop/issues/708) -- Fixed an issue where the main screen opens a blank page when a tab is dropped into the screen. -[#667](https://github.com/mattermost/desktop/issues/667) -- Fixed "Save Image" context menu not working. -[#707](https://github.com/mattermost/desktop/issues/707) + - Fixed an issue where right-clicking an image, then choosing "Save Image", did nothing. +[#774](https://github.com/mattermost/desktop/issues/707) + - Fixed an issue that prevented typing in the form fields on the add server dialog when launched from the server tab bar. +[#780](https://github.com/mattermost/desktop/issues/780) + - Fixed an issue that could cause an error message on the add new server dialog to be misleading. +[#438](https://github.com/mattermost/desktop/issues/438) #### Windows -- Fixed `file://` protocol not working. But localhost URL will not continue to work. + - Fixed an issue where `file://` protocol was not working. Note that localhost URLs are not yet supported. [#579](https://github.com/mattermost/desktop/issues/579) -- Fixed an issue where Windows installer crashed in some cases. -[#728](https://github.com/mattermost/desktop/issues/728) + +### Known Issues + +#### All Platforms + - [Clicking on a video preview opens another Mattermost window in addition to downloading the file](https://github.com/mattermost/desktop/issues/792). + - [Insecure connection produces hundreds of log messages](https://github.com/mattermost/desktop/issues/569). + +#### Windows + - [App window doesn't save "floating" app position](https://github.com/mattermost/desktop/issues/617). + - [Windows 7] [Sometimes app tries to render a page inside the app instead of in a new browser tab when clicking links](https://github.com/mattermost/desktop/issues/369). + - [Windows 10] [Incorrect task name in Windows 10 startup list](https://github.com/mattermost/desktop/issues/559). + - [Mattermost UI sometimes bleeds over a file explorer](https://github.com/mattermost/desktop/issues/753). + - [When auto-starting the desktop app, the application window is included in Windows tab list](https://github.com/mattermost/desktop/issues/738). #### Mac -- Fixed an issue where app crashed after toggling "Show Mattermost icon in menu bar" setting. -[#706](https://github.com/mattermost/desktop/issues/706) + - The application crashes when a file upload dialog is canceled without closing Quick Look. + - [When the app auto-starts, app page opens on screen instead of being minimized to Dock](https://github.com/mattermost/desktop/issues/583). -#### Linux -- Fixed an issue where app crashed after toggling "Show icon in the notification area" setting. -[#706](https://github.com/mattermost/desktop/issues/706) +#### 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 sometimes 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: + + - [Autre31415](https://github.com/Autre31415), [dmeza](https://github.com/dmeza), [hmhealey](https://github.com/hmhealey), [jasonblais](https://github.com/jasonblais), [kethinov](https://github.com/kethinov), [lieut-data](https://github.com/lieut-data), [lip-d](https://github.com/lip-d), [mkraft](https://github.com/mkraft), [yuya-oc](https://github.com/yuya-oc) ---- diff --git a/src/assets/loading.gif b/src/assets/loading.gif index 43d88316..acfd1e55 100644 Binary files a/src/assets/loading.gif and b/src/assets/loading.gif differ diff --git a/src/assets/loading@2x.gif b/src/assets/loading@2x.gif index 47452196..ad40b33d 100644 Binary files a/src/assets/loading@2x.gif and b/src/assets/loading@2x.gif differ diff --git a/src/browser/components/MainPage.jsx b/src/browser/components/MainPage.jsx index 6c40c9a6..9d17dcca 100644 --- a/src/browser/components/MainPage.jsx +++ b/src/browser/components/MainPage.jsx @@ -317,7 +317,6 @@ const MainPage = createReactClass({ authServerURL = `${tmpURL.protocol}//${tmpURL.host}`; authInfo = this.state.loginQueue[0].authInfo; } - var currentTeamURL = this.props.teams[this.state.key].url; var modal = ( - { (this.state.targetURL === '' || this.state.targetURL.startsWith(currentTeamURL)) ? + { (this.state.targetURL === '') ? null : { + e.stopPropagation(); + }} /> {'The name of the server displayed on your desktop app tab bar.'} @@ -163,6 +176,9 @@ export default class NewTeamModal extends React.Component { value={this.state.teamUrl} placeholder='https://example.com' onChange={this.handleTeamUrlChange.bind(this)} + onClick={(e) => { + e.stopPropagation(); + }} /> {'The URL of your Mattermost server. Must start with http:// or https://.'} diff --git a/src/browser/css/components/TabBar.css b/src/browser/css/components/TabBar.css index a4caa4d3..327a6a6d 100644 --- a/src/browser/css/components/TabBar.css +++ b/src/browser/css/components/TabBar.css @@ -18,6 +18,12 @@ padding: 0 15px; } +.TabBar>li.teamTabItem:not(.active)>a:hover { + background-color: #e6e6e6; + border: 1px solid #ddd; + transition: background-color 0.2s ease; +} + .TabBar .TabBar-addServerButton>a { border: none; background: transparent; @@ -30,6 +36,7 @@ color: #333; background-color: #e6e6e6; border-color: #adadad; + transition: background-color 0.2s ease; } .TabBar .TabBar-badge { diff --git a/src/common/config/defaultPreferences.js b/src/common/config/defaultPreferences.js index 3a8669c0..15ce7cb3 100644 --- a/src/common/config/defaultPreferences.js +++ b/src/common/config/defaultPreferences.js @@ -15,7 +15,7 @@ const defaultPreferences = { }, showUnreadBadge: true, useSpellChecker: true, - enableHardwareAcceleration: false, + enableHardwareAcceleration: true, }; export default defaultPreferences; diff --git a/src/main.js b/src/main.js index 3e4618e3..c320af38 100644 --- a/src/main.js +++ b/src/main.js @@ -46,6 +46,7 @@ import allowProtocolDialog from './main/allowProtocolDialog'; import PermissionManager from './main/PermissionManager'; import permissionRequestHandler from './main/permissionRequestHandler'; import AppStateManager from './main/AppStateManager'; +import initCookieManager from './main/cookieManager'; import SpellChecker from './main/SpellChecker'; @@ -423,6 +424,8 @@ app.on('ready', () => { } } + initCookieManager(session.defaultSession); + mainWindow = createMainWindow(config, { hideOnStartup, linuxAppIcon: path.join(assetsDir, 'appicon.png'), diff --git a/src/main/cookieManager.js b/src/main/cookieManager.js new file mode 100644 index 00000000..2ac526a6 --- /dev/null +++ b/src/main/cookieManager.js @@ -0,0 +1,22 @@ +import {app} from 'electron'; + +function flushCookiesStore(session) { + session.cookies.flushStore((err) => { + if (err) { + console.log(err); + } + }); +} + +export default function initCookieManager(session) { + // Somehow cookies are not immediately saved to disk. + // So manually flush cookie store to disk on closing the app. + // https://github.com/electron/electron/issues/8416 + app.on('before-quit', () => { + flushCookiesStore(session); + }); + + app.on('browser-window-blur', () => { + flushCookiesStore(session); + }); +} diff --git a/src/main/permissionRequestHandler.js b/src/main/permissionRequestHandler.js index 6ca03758..1424a406 100644 --- a/src/main/permissionRequestHandler.js +++ b/src/main/permissionRequestHandler.js @@ -37,7 +37,14 @@ export default function permissionRequestHandler(mainWindow, permissionManager) dequeueRequests(requestQueue, permissionManager, origin, permission, status); }); return (webContents, permission, callback) => { - const targetURL = new URL(webContents.getURL()); + let targetURL; + try { + targetURL = new URL(webContents.getURL()); + } catch (err) { + console.log(err); + callback(false); + return; + } if (permissionManager.isDenied(targetURL.origin, permission)) { callback(false); return; diff --git a/test/specs/browser/settings_test.js b/test/specs/browser/settings_test.js index fa6370e1..bbdd45a6 100644 --- a/test/specs/browser/settings_test.js +++ b/test/specs/browser/settings_test.js @@ -289,19 +289,19 @@ describe('browser/settings.html', function desc() { loadSettingsPage(). waitForExist(ID_INPUT_ENABLE_HARDWARE_ACCELERATION, 5000); const selected = await this.app.client.isSelected(ID_INPUT_ENABLE_HARDWARE_ACCELERATION); - selected.should.equal(false); // default is false + selected.should.equal(true); // default is true await this.app.client.click(ID_INPUT_ENABLE_HARDWARE_ACCELERATION). waitForVisible('#appOptionsSaveIndicator', 5000). waitForVisible('#appOptionsSaveIndicator', 5000, true); // at least 2500 ms to disappear const config0 = JSON.parse(fs.readFileSync(env.configFilePath, 'utf-8')); - config0.enableHardwareAcceleration.should.equal(true); + config0.enableHardwareAcceleration.should.equal(false); await this.app.client.click(ID_INPUT_ENABLE_HARDWARE_ACCELERATION). waitForVisible('#appOptionsSaveIndicator', 5000). waitForVisible('#appOptionsSaveIndicator', 5000, true); // at least 2500 ms to disappear const config1 = JSON.parse(fs.readFileSync(env.configFilePath, 'utf-8')); - config1.enableHardwareAcceleration.should.equal(false); + config1.enableHardwareAcceleration.should.equal(true); }); }); });