summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTING.md2
-rw-r--r--doc/install/Upgrade-Guide.md2
-rw-r--r--doc/process/overview.md8
-rw-r--r--web/react/components/post_body.jsx14
-rw-r--r--web/react/components/suggestion/emoticon_provider.jsx23
-rw-r--r--web/react/stores/socket_store.jsx1
6 files changed, 38 insertions, 12 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 18fd7c229..41a8f9375 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -49,7 +49,7 @@ git checkout -b <branch name>
2. When you submit your pull request please make it against `master` and include the Ticket ID at the beginning of your pull request comment, followed by a colon
- For example, for a ticket ID `PLT-394` start your comment with: `PLT-394:`. See [previously closed pull requests](https://github.com/mattermost/platform/pulls?q=is%3Apr+is%3Aclosed) for examples
- - All pull requests must have a ticket ID so the issue can be tracked and tested properly. If there is no existing ticket in Jira, please [file an issue in GitHub](http://www.mattermost.org/filing-issues/) so a Jira ticket can be created
+ - All pull requests must have a ticket ID so the issue can be tracked and tested properly. If there is no existing ticket in Jira, please [file a bug in GitHub](http://www.mattermost.org/filing-issues/) or a [feature idea you're proposing to implement](http://www.mattermost.org/feature-requests/) so a Jira ticket can be created
3. Please include a comment on the pull request describing the changes
diff --git a/doc/install/Upgrade-Guide.md b/doc/install/Upgrade-Guide.md
index e01bdb9a0..edcc754f8 100644
--- a/doc/install/Upgrade-Guide.md
+++ b/doc/install/Upgrade-Guide.md
@@ -15,7 +15,7 @@ If you're upgrading across multiple major releases, from 1.0.x to 1.2.x for exam
3. Review Release Notes
1. Check the release notes for the version of Mattermost you are able to install, and note any setting changes in the **Compatibility** section that apply to your deployment (Release notes across versions are available from the [CHANGELOG](https://github.com/mattermost/platform/blob/master/CHANGELOG.md)).
4. Download the `mattermost.tar.gz` file with the correct version for your upgrade
- 1. You can use `wget` to retrieve a specific version. For example, to download v1.1.0 run `wget https://github.com/mattermost/platform/releases/download/v1.1.0/mattermost.tar.gz`
+ 1. You can use `wget` to retrieve a specific version. For example, to download v1.1.0 run `wget https://github.com/mattermost/platform/releases/download/v1.x.x/mattermost.tar.gz`
2. Stop the Mattermost Server
1. As best practice, consider posting to the Town Square channel of active teams pre-announcing the scheduled downtime to apply these upgrade procedures
2. To stop the server run `sudo stop mattermost`
diff --git a/doc/process/overview.md b/doc/process/overview.md
index a1201a8d6..8a4c0459d 100644
--- a/doc/process/overview.md
+++ b/doc/process/overview.md
@@ -1,6 +1,6 @@
# Development Process Overview
-This document describes the process through which feedback and design discussions flow into community systems, then into tickets, then into merge requests, then into monthly releases based on the purpose of the product.
+This document describes the process through which feedback and design discussions flow into community systems, then into tickets, then into pull requests, then into monthly releases based on the purpose of the product.
## Purpose
@@ -44,7 +44,7 @@ Please consider using more mainstream processes for [filing feature ideas to be
### GitHub Pull Requests
-A system for submitting merge requests for changes to Mattermost. See [Merge Requests](https://github.com/mattermost/platform/blob/master/doc/process/overview.md#merge-requests) section below.
+A system for submitting pull requests for changes to Mattermost. See [Pull Requests](https://github.com/mattermost/platform/blob/master/doc/process/overview.md#merge-requests) section below.
### General Forum
@@ -80,7 +80,7 @@ Release planning sets the "Fix Version" of tickets to one of the upcoming monthl
Tickets to be completed in the upcoming two weeks are organized on Tuesdays, with input from developers, and finalized on Fridays.
-## Merge Requests
+## Pull Requests
### Core Team Weekly Rhythm
@@ -92,7 +92,7 @@ Key contributors might also pick up tickets, or through conversations with the c
### Community Contributions
-Community members following the Contribution Guidelines might also submit pull requests.
+Community members following the [Contribution Guidelines](https://github.com/mattermost/platform/blob/master/CONTRIBUTING.md) might also submit pull requests. Pull requests should not disable existing functionality without a Jira ticket, which are opened [via the feature ideas process](http://www.mattermost.org/feature-requests/).
#### Bug Fixes
diff --git a/web/react/components/post_body.jsx b/web/react/components/post_body.jsx
index 296b9e7d7..35a7727e9 100644
--- a/web/react/components/post_body.jsx
+++ b/web/react/components/post_body.jsx
@@ -309,7 +309,15 @@ export default class PostBody extends React.Component {
let apostrophe = '';
let name = '...';
if (profile != null) {
- if (profile.username.slice(-1) === 's') {
+ let username = profile.username;
+ if (parentPost.props &&
+ parentPost.props.from_webhook &&
+ parentPost.props.override_username &&
+ global.window.mm_config.EnablePostUsernameOverride === 'true') {
+ username = parentPost.props.override_username;
+ }
+
+ if (username.slice(-1) === 's') {
apostrophe = '\'';
} else {
apostrophe = '\'s';
@@ -317,9 +325,9 @@ export default class PostBody extends React.Component {
name = (
<a
className='theme'
- onClick={Utils.searchForTerm.bind(null, profile.username)}
+ onClick={Utils.searchForTerm.bind(null, username)}
>
- {profile.username}
+ {username}
</a>
);
}
diff --git a/web/react/components/suggestion/emoticon_provider.jsx b/web/react/components/suggestion/emoticon_provider.jsx
index 7dcb86442..fd470cf21 100644
--- a/web/react/components/suggestion/emoticon_provider.jsx
+++ b/web/react/components/suggestion/emoticon_provider.jsx
@@ -51,23 +51,40 @@ export default class EmoticonProvider {
const text = captured[1];
const partialName = captured[2];
- const terms = [];
const names = [];
for (const emoticon of Emoticons.emoticonMap.keys()) {
if (emoticon.indexOf(partialName) !== -1) {
- terms.push(':' + emoticon + ':');
names.push(emoticon);
- if (terms.length >= MAX_EMOTICON_SUGGESTIONS) {
+ if (names.length >= MAX_EMOTICON_SUGGESTIONS) {
break;
}
}
}
+ // sort the emoticons so that emoticons starting with the entered text come first
+ names.sort((a, b) => {
+ const aPrefix = a.startsWith(partialName);
+ const bPrefix = b.startsWith(partialName);
+
+ if (aPrefix === bPrefix) {
+ return a.localeCompare(b);
+ } else if (aPrefix) {
+ return -1;
+ }
+
+ return 1;
+ });
+
+ const terms = names.map((name) => ':' + name + ':');
+
if (terms.length > 0) {
SuggestionStore.setMatchedPretext(suggestionId, text);
SuggestionStore.addSuggestions(suggestionId, terms, names, EmoticonSuggestion);
+
+ // force the selection to be cleared since the order of elements may have changed
+ SuggestionStore.clearSelection(suggestionId);
}
}
}
diff --git a/web/react/stores/socket_store.jsx b/web/react/stores/socket_store.jsx
index c8e3c8bdd..d5aed40cf 100644
--- a/web/react/stores/socket_store.jsx
+++ b/web/react/stores/socket_store.jsx
@@ -225,6 +225,7 @@ function handlePostEditEvent(msg) {
// Store post
const post = JSON.parse(msg.props.post);
PostStore.storePost(post);
+ PostStore.emitChange();
// Update channel state
if (ChannelStore.getCurrentId() === msg.channel_id) {