From 1808e8eafad30c5d1bb37924629cda23ea8224d2 Mon Sep 17 00:00:00 2001 From: hmhealey Date: Mon, 9 Nov 2015 16:13:02 -0500 Subject: [PATCH 01/11] Updated post components to re-render after first receiving user profiles --- web/react/components/post_body.jsx | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/web/react/components/post_body.jsx b/web/react/components/post_body.jsx index 5a157b792c..61a0c3e2d9 100644 --- a/web/react/components/post_body.jsx +++ b/web/react/components/post_body.jsx @@ -16,6 +16,7 @@ export default class PostBody extends React.Component { this.receivedYoutubeData = false; this.isGifLoading = false; + this.handleUserChange = this.handleUserChange.bind(this); this.parseEmojis = this.parseEmojis.bind(this); this.createEmbed = this.createEmbed.bind(this); this.createGifEmbed = this.createGifEmbed.bind(this); @@ -23,7 +24,13 @@ export default class PostBody extends React.Component { this.createYoutubeEmbed = this.createYoutubeEmbed.bind(this); const linkData = Utils.extractLinks(this.props.post.message); - this.state = {links: linkData.links, message: linkData.text}; + const profiles = UserStore.getProfiles(); + + this.state = { + links: linkData.links, + message: linkData.text, + hasUserProfiles: profiles && Object.keys(profiles).length > 1 + }; } getAllChildNodes(nodeIn) { @@ -47,12 +54,26 @@ export default class PostBody extends React.Component { componentDidMount() { this.parseEmojis(); + + UserStore.addChangeListener(this.handleUserChange); } componentDidUpdate() { this.parseEmojis(); } + componentWillUnmount() { + UserStore.removeChangeListener(this.handleUserChange); + } + + handleUserChange() { + if (!this.state.hasProfiles) { + const profiles = UserStore.getProfiles(); + + this.setState({hasProfiles: profiles && Object.keys(profiles).length > 1}); + } + } + componentWillReceiveProps(nextProps) { const linkData = Utils.extractLinks(nextProps.post.message); this.setState({links: linkData.links, message: linkData.text}); From f7b099ffdbd3b518601c9da71d08752fddb2f37d Mon Sep 17 00:00:00 2001 From: hmhealey Date: Tue, 10 Nov 2015 14:27:51 -0500 Subject: [PATCH 02/11] Added text to the edit channel purpose menu option on mobile --- web/react/components/navbar.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/react/components/navbar.jsx b/web/react/components/navbar.jsx index ff53816c7a..af29f219e6 100644 --- a/web/react/components/navbar.jsx +++ b/web/react/components/navbar.jsx @@ -140,7 +140,9 @@ export default class Navbar extends React.Component { role='menuitem' href='#' onClick={() => this.setState({showEditChannelPurposeModal: true})} - /> + > + {'Set Channel Purpose...'} + ); } From 782709aa56d8e3ad9d65cd05f33640887d771b89 Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Wed, 11 Nov 2015 12:53:18 -0500 Subject: [PATCH 03/11] Fix channel invite button on channel intro message and fix empty channel invite modal. --- web/react/components/posts_view_container.jsx | 12 ++++++++-- web/react/components/sidebar.jsx | 2 +- web/react/stores/user_store.jsx | 4 ++-- web/react/utils/channel_intro_mssages.jsx | 23 ++++++++----------- 4 files changed, 23 insertions(+), 18 deletions(-) diff --git a/web/react/components/posts_view_container.jsx b/web/react/components/posts_view_container.jsx index 5037a86cd4..8b92a26a79 100644 --- a/web/react/components/posts_view_container.jsx +++ b/web/react/components/posts_view_container.jsx @@ -3,6 +3,7 @@ const PostsView = require('./posts_view.jsx'); const LoadingScreen = require('./loading_screen.jsx'); +const ChannelInviteModal = require('./channel_invite_modal.jsx'); const ChannelStore = require('../stores/channel_store.jsx'); const PostStore = require('../stores/post_store.jsx'); @@ -50,6 +51,7 @@ export default class PostsViewContainer extends React.Component { }); } + state.showInviteModal = false; this.state = state; } componentDidMount() { @@ -248,7 +250,7 @@ export default class PostsViewContainer extends React.Component { postViewScrolled={this.handlePostsViewScroll} loadMorePostsTopClicked={this.loadMorePostsTop} numPostsToDisplay={this.state.numPostsToDisplay} - introText={channel ? createChannelIntroMessage(channel) : null} + introText={channel ? createChannelIntroMessage(channel, () => this.setState({showInviteModal: true})) : null} messageSeparatorTime={this.state.currentLastViewed} /> ); @@ -263,7 +265,13 @@ export default class PostsViewContainer extends React.Component { } return ( -
{postListCtls}
+
+ {postListCtls} + this.setState({showInviteModal: false})} + /> +
); } } diff --git a/web/react/components/sidebar.jsx b/web/react/components/sidebar.jsx index f5ce5c10ef..0b1abe4fe0 100644 --- a/web/react/components/sidebar.jsx +++ b/web/react/components/sidebar.jsx @@ -142,7 +142,7 @@ export default class Sidebar extends React.Component { } } - const hiddenDirectChannelCount = UserStore.getActiveOnlyProfileList().length - visibleDirectChannels.length; + const hiddenDirectChannelCount = UserStore.getActiveOnlyProfileList(true).length - visibleDirectChannels.length; visibleDirectChannels.sort(this.sortChannelsByDisplayName); diff --git a/web/react/stores/user_store.jsx b/web/react/stores/user_store.jsx index 6b7d671fce..b173c9ca02 100644 --- a/web/react/stores/user_store.jsx +++ b/web/react/stores/user_store.jsx @@ -193,13 +193,13 @@ class UserStoreClass extends EventEmitter { return BrowserStore.getItem('profiles', {}); } - getActiveOnlyProfiles() { + getActiveOnlyProfiles(skipCurrent) { const active = {}; const profiles = this.getProfiles(); const currentId = this.getCurrentId(); for (var key in profiles) { - if (profiles[key].delete_at === 0 && profiles[key].id !== currentId) { + if (!(profiles[key].id === currentId && skipCurrent) && profiles[key].delete_at === 0) { active[key] = profiles[key]; } } diff --git a/web/react/utils/channel_intro_mssages.jsx b/web/react/utils/channel_intro_mssages.jsx index 161c797618..87dc680c1f 100644 --- a/web/react/utils/channel_intro_mssages.jsx +++ b/web/react/utils/channel_intro_mssages.jsx @@ -9,15 +9,15 @@ const ChannelStore = require('../stores/channel_store.jsx'); const Constants = require('../utils/constants.jsx'); const TeamStore = require('../stores/team_store.jsx'); -export function createChannelIntroMessage(channel) { +export function createChannelIntroMessage(channel, showInviteModal) { if (channel.type === 'D') { - return createDMIntroMessage(channel); + return createDMIntroMessage(channel, showInviteModal); } else if (ChannelStore.isDefault(channel)) { return createDefaultIntroMessage(channel); } else if (channel.name === Constants.OFFTOPIC_CHANNEL) { - return createOffTopicIntroMessage(channel); + return createOffTopicIntroMessage(channel, showInviteModal); } else if (channel.type === 'O' || channel.type === 'P') { - return createStandardIntroMessage(channel); + return createStandardIntroMessage(channel, showInviteModal); } } @@ -71,7 +71,7 @@ export function createDMIntroMessage(channel) { ); } -export function createOffTopicIntroMessage(channel) { +export function createOffTopicIntroMessage(channel, showInviteModal) { return (

{'Beginning of ' + channel.display_name}

@@ -91,10 +91,9 @@ export function createOffTopicIntroMessage(channel) { {'Set a header'} {'Invite others to this channel'} @@ -155,7 +154,7 @@ export function createDefaultIntroMessage(channel) { ); } -export function createStandardIntroMessage(channel) { +export function createStandardIntroMessage(channel, showInviteModal) { var uiName = channel.display_name; var creatorName = ''; @@ -206,14 +205,12 @@ export function createStandardIntroMessage(channel) { {'Set a header'} {'Invite others to this ' + uiType} -
); } From b42404dcba657640185badd945afa74ce245ce94 Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Wed, 11 Nov 2015 12:54:57 -0500 Subject: [PATCH 04/11] Remove unneed argument --- web/react/utils/channel_intro_mssages.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/react/utils/channel_intro_mssages.jsx b/web/react/utils/channel_intro_mssages.jsx index 87dc680c1f..8a3acc0bc4 100644 --- a/web/react/utils/channel_intro_mssages.jsx +++ b/web/react/utils/channel_intro_mssages.jsx @@ -11,7 +11,7 @@ const TeamStore = require('../stores/team_store.jsx'); export function createChannelIntroMessage(channel, showInviteModal) { if (channel.type === 'D') { - return createDMIntroMessage(channel, showInviteModal); + return createDMIntroMessage(channel); } else if (ChannelStore.isDefault(channel)) { return createDefaultIntroMessage(channel); } else if (channel.name === Constants.OFFTOPIC_CHANNEL) { From 72c7e066446b7abdce74d74a9aee60c4eac0935c Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Wed, 11 Nov 2015 12:56:04 -0500 Subject: [PATCH 05/11] Remove unneed role --- web/react/utils/channel_intro_mssages.jsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/web/react/utils/channel_intro_mssages.jsx b/web/react/utils/channel_intro_mssages.jsx index 8a3acc0bc4..f27e23a823 100644 --- a/web/react/utils/channel_intro_mssages.jsx +++ b/web/react/utils/channel_intro_mssages.jsx @@ -91,7 +91,6 @@ export function createOffTopicIntroMessage(channel, showInviteModal) { {'Set a header'} @@ -205,7 +204,6 @@ export function createStandardIntroMessage(channel, showInviteModal) { {'Set a header'} From 7126d9817ef8481900d23ce029f3b6dce3dcbd5e Mon Sep 17 00:00:00 2001 From: it33 Date: Wed, 11 Nov 2015 13:03:05 -0800 Subject: [PATCH 06/11] Update CHANGELOG.md --- CHANGELOG.md | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 142e15d91d..a22b8ce16d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,32 @@ # Mattermost Changelog -## UNDER DEVELOPMENT Release v1.2.0 +## Release v1.2.0 -The "UNDER DEVELOPMENT" section of the Mattermost 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 the "UNDER DEVELOPMENT" heading is removed from the final changelog of the release. - -- **Release candidate anticipated:** 2015-11-10 - **Final release anticipated:** 2015-11-16 +### Release Highlights + +#### Outgoing webhooks + +- Mattermost users can now interact with external applications using [outgoing webhooks](https://github.com/mattermost/platform/blob/master/doc/integrations/webhooks/Outgoing-Webhooks.md) +- An [application template](https://github.com/mattermost/mattermost-integration-giphy) demonstrating user queries sent to the Giphy search engine via Mattermost webhooks now available +- A community application, [Matterbrige](https://github.com/42wim/matterbridge?files=1), shows how to use webhooks to connect Mattermost with IRC + +#### Search Scope Modifiers + +- Adding search term `in:[channel_url_name]` now limits searches within a specific channel +- Adding search term `from:[username]` now limits searches to messages from a specific user + +#### Syntax Highlighting + +- Syntax highlight for code blocks now available for `Diff, Apache, Makefile, HTTP, JSON, Markdown, Java, CSS, nginx, ObjectiveC, Python, XML, Perl, Bash, PHP, Coffee, C, SQL, Go, Ruby, Java, and ini` + +#### Usability Improvements + +- Added tutorial to teach new users how to use Mattermost +- Various performance improvements to support teams with hundreds of users +- Direct Messages "More" menu now lets you search for users by username and real name + ### Improvements Onboarding @@ -18,7 +38,7 @@ Messaging and Notifications - Users can now search for teammates to add to **Direct Message** list via **More** menu - Users can now personalize Direct Messages list by removing users listed - Link previews - Adding URL with .gif file adds image below message -- Added new browser tab alerts to indicate unread messages and mentions +- Added new browser tab alerts to indicate unread messages and mentions Search @@ -34,8 +54,8 @@ Integrations User Interface - Member list in Channel display now scrollable, and includes Message button to message channel members directly -- Added ability to edit previous message by hitting UP arrow -- Syntax highlighting added for code blocks +- Added ability to edit previous message by hitting UP arrow +- Syntax highlighting added for code blocks - Languages include `Diff, Apache, Makefile, HTTP, JSON, Markdown, Java, CSS, nginx, ObjectiveC, Python, XML, Perl, Bash, PHP, Coffee, C, SQL, Go, Ruby, Java, and ini`. - Use by adding the name of the language on the first link of the code block, for example: ```python - Syntax color theme can be defined under **Account Settings** > **Appearance Settings** > **Custom Theme** @@ -65,7 +85,7 @@ System Console - Fixed issue with the centre channel scroll position jumping when right hand side was opened and closed - Added support for simultaneous login to different teams in different browser tabs - Incoming webhooks no longer disrupted when channel is deleted - +- You can now paste a Mattermost incoming webhook URL into the same field designed for a Slack URL and integrations will work ### Compatibility - IE 11 new minimum version for IE, since IE 10 share fell below 5% on desktop @@ -108,7 +128,7 @@ The following is for informational purposes only, no action needed. Mattermost a - Editing a post so that it's text is blank (which should delete it) throws a 404 - No scroll bar in centre channel - Theme color import from Slack fails to import the “Active Channel” selection color -- Pasting images into text box fails to upload on [BROWSERS] +- Pasting images into text box fails to upload on Firefox and Safari - Users cannot claim accounts imported from Slack via password reset - Slack import @mentions break From 3de8a4ec635544e713ba6d2a405a7064444f4652 Mon Sep 17 00:00:00 2001 From: it33 Date: Wed, 11 Nov 2015 20:56:07 -0800 Subject: [PATCH 07/11] Adding known issue on jitter --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a22b8ce16d..90da0ba736 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -119,6 +119,7 @@ The following is for informational purposes only, no action needed. Mattermost a #### Known Issues +- When navigating to a page with new messages as well as message containing inline images added via markdown, the channel may move up and down while loading the inline images - Microsoft Edge does not yet support drag and drop - After upgrading to v1.2 existing users will see the newly added tutorial tips upon login (this is a special case for v1.2 and will not happen in future upgrades) - Channel list becomes reordered when there are lowercase channel names in a Postgres database From 04830fde0527d2f64bfa94288363ef830b45c149 Mon Sep 17 00:00:00 2001 From: it33 Date: Thu, 12 Nov 2015 00:48:28 -0800 Subject: [PATCH 08/11] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90da0ba736..3af4a6ae62 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -95,7 +95,7 @@ System Console Multiple settings were added to [`config.json`](./config/config.json). These options can be modified in the System Console, or manually updated in the existing config.json file. This is a list of changes and their new default values in a fresh install: - Under `TeamSettings` in `config.json`: - - Added: `"RestrictTeamNames": true` to control whether team names are restricted + - Added: `"RestrictTeamNames": true` to control whether team names can contain reserved words like www, admin, support, test, etc. - Added: `"EnableTeamListing": false` to control whether teams can be listed on the root page of the site - Under `ServiceSettings` in `config.json` - Added: `EnableOutgoingWebhooks": true` to turn on outgoing webhooks From 946ce3e2440946c68c068b8e54c127996a40f555 Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Thu, 12 Nov 2015 13:19:04 -0500 Subject: [PATCH 09/11] Make import/export theme input box editable --- web/react/components/user_settings/custom_theme_chooser.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/web/react/components/user_settings/custom_theme_chooser.jsx b/web/react/components/user_settings/custom_theme_chooser.jsx index 895d0c5008..3dbed72c38 100644 --- a/web/react/components/user_settings/custom_theme_chooser.jsx +++ b/web/react/components/user_settings/custom_theme_chooser.jsx @@ -129,7 +129,6 @@ export default class CustomThemeChooser extends React.Component { {'Copy and paste to share theme colors:'} Date: Thu, 12 Nov 2015 14:38:35 -0500 Subject: [PATCH 10/11] Adding safari 8 to list of unsupported browsers. --- web/web.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/web.go b/web/web.go index 1cae604ae4..ffc791cb71 100644 --- a/web/web.go +++ b/web/web.go @@ -132,7 +132,7 @@ func watchAndParseTemplates() { } } -var browsersNotSupported string = "MSIE/8;MSIE/9;MSIE/10;Internet Explorer/8;Internet Explorer/9;Internet Explorer/10;Safari/7" +var browsersNotSupported string = "MSIE/8;MSIE/9;MSIE/10;Internet Explorer/8;Internet Explorer/9;Internet Explorer/10;Safari/7;Safari/8" func CheckBrowserCompatability(c *api.Context, r *http.Request) bool { ua := user_agent.New(r.UserAgent()) @@ -143,7 +143,7 @@ func CheckBrowserCompatability(c *api.Context, r *http.Request) bool { version := strings.Split(browser, "/") if strings.HasPrefix(bname, version[0]) && strings.HasPrefix(bversion, version[1]) { - c.Err = model.NewAppError("CheckBrowserCompatability", "Your current browser is not supported, please upgrade to one of the following browsers: Google Chrome 21 or higher, Internet Explorer 11 or higher, FireFox 14 or higher, Safari 8 or higher", "") + c.Err = model.NewAppError("CheckBrowserCompatability", "Your current browser is not supported, please upgrade to one of the following browsers: Google Chrome 21 or higher, Internet Explorer 11 or higher, FireFox 14 or higher, Safari 9 or higher", "") return false } } From 10901b4d50db171fa83e0c289d0eb34f4422f156 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Thu, 12 Nov 2015 14:50:07 -0500 Subject: [PATCH 11/11] Updating dockerfile for release v1.2.0-rc2 --- docker/1.2/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/1.2/Dockerfile b/docker/1.2/Dockerfile index 6a8d691969..0e4e3e2428 100644 --- a/docker/1.2/Dockerfile +++ b/docker/1.2/Dockerfile @@ -34,7 +34,7 @@ VOLUME /var/lib/mysql WORKDIR /mattermost # Copy over files -ADD https://github.com/mattermost/platform/releases/download/v1.2.0-rc1/mattermost.tar.gz / +ADD https://github.com/mattermost/platform/releases/download/v1.2.0-rc2/mattermost.tar.gz / RUN tar -zxvf /mattermost.tar.gz --strip-components=1 && rm /mattermost.tar.gz ADD config_docker.json / ADD docker-entry.sh /