From 792f7d97ad282fe183ebd04b6713b5f3a6e2003b Mon Sep 17 00:00:00 2001 From: it33 Date: Mon, 26 Oct 2015 07:09:19 -0700 Subject: [PATCH 01/10] Update CONTRIBUTING.md --- CONTRIBUTING.md | 52 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8ffce2a9e5..7f321a87ad 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,5 +1,51 @@ -# Contributing +# Code Contribution Guidelines + +Thank you for your interest in contributing to Mattermost. This guide provides an overview of important information for contributors to know. + +## Choose a Ticket + +1. Review the list of [Good First Contribution](https://mattermost.atlassian.net/issues/?filter=10206) tickets listed in Jira. +2. These projects are intended to be a straight forward first pull requests from new contributors. + - If you don't find something appropriate for your interests, please see the full list of tickets [Accepting Pull Requests](https://mattermost.atlassian.net/issues/?filter=10101). + - Also, feel free to fix bugs you find, or items in GitHub issues that the core team has approved, but not yet added to Jira. + +3. If you have any questions at all about a ticket, there are several options to ask: + 1. Start a topic in the [Mattermost forum](http://forum.mattermost.org/) + 2. Join the [Mattermost core team discussion](https://pre-release.mattermost.com/signup_user_complete/?id=rcgiyftm7jyrxnma1osd8zswby) and post in the "Tickets" channel + +## Install Mattermost and set up a Fork + +1. Follow [developer setup instructions](https://github.com/mattermost/platform/blob/master/doc/developer/Setup.md) to install Mattermost. + +2. Create a branch with set to the ID of the ticket you're working on, for example ```PLT-394```, using command: + +``` +git checkout -b +``` + +## Programming and Testing + +1. Please review the [Mattermost Style Guide](Style-Guide.md) prior to making changes. + + To keep code clean and well structured, Mattermost uses ESLint to check that pull requests adhere to style guidelines for React. Code will need to follow Mattermost's React style guidelines in order to pass the automated build tests when a pull request is submitted. + +2. Please make sure to thoroughly test your change before submitting a pull request. + + Please review the ["Fast, Obvious, Forgiving" experience design principles](http://www.mattermost.org/design-principles/) for Mattermost and check that your feature meets the criteria. Also, for any changes to user interface or help text, please read the changes out loud, as a quick and easy way to catch any inconsitencies. + + +## Submitting a Pull Request + +1. Please add yourself to the Mattermost [approved contributor list](https://docs.google.com/spreadsheets/d/1NTCeG-iL_VS9bFqtmHSfwETo5f-8MQ7oMDE5IUYJi_Y/pubhtml?gid=0&single=true) prior to submitting by completing the [contributor license agreement](http://www.mattermost.org/mattermost-contributor-agreement/). + +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. + +3. Once submitted, your pull request will be checked via an automated build process and will be reviewed by at least two members of the Mattermost core team, who may either accept the PR or follow-up with feedback. It would then get merged into `master` for the next release. + +4. If you've included your mailing address in Step 1, you'll be receiving a [Limited Edition Mattermost Mug](http://forum.mattermost.org/t/limited-edition-mattermost-mugs/143) as a thank you gift after your first pull request has been accepted. + + -## Contributing Code -Please see [Mattermost Code Contribution Guidelines](https://github.com/mattermost/platform/blob/master/doc/developer/Code-Contribution-Guidelines.md) From 0d7d74189a355208491cc9401b82f7efe914dc17 Mon Sep 17 00:00:00 2001 From: it33 Date: Mon, 26 Oct 2015 07:10:51 -0700 Subject: [PATCH 02/10] Update Code-Contribution-Guidelines.md --- doc/developer/Code-Contribution-Guidelines.md | 45 +------------------ 1 file changed, 1 insertion(+), 44 deletions(-) diff --git a/doc/developer/Code-Contribution-Guidelines.md b/doc/developer/Code-Contribution-Guidelines.md index 48bbf24916..38822e2fb5 100644 --- a/doc/developer/Code-Contribution-Guidelines.md +++ b/doc/developer/Code-Contribution-Guidelines.md @@ -1,48 +1,5 @@ # Code Contribution Guidelines -Thank you for your interest in contributing to Mattermost. This guide provides an overview of important information for contributors to know. - -## Choose a Ticket - -1. Review the list of [Good First Contribution](https://mattermost.atlassian.net/issues/?filter=10206) tickets listed in Jira. -2. These projects are intended to be a straight forward first pull requests from new contributors. -If you don't find something appropriate for your interests, please see the full list of tickets [Accepting Pull Requests](https://mattermost.atlassian.net/issues/?filter=10101). - -3. If you have any questions at all about a ticket, please post to the [Contributor Discussion section](http://forum.mattermost.org/) of the Mattermost forum, or email the [Mattermost Developer Mailing list](https://groups.google.com/a/mattermost.com/forum/#!forum/developer/join). - -## Install Mattermost and set up a Fork - -1. Follow [developer setup instructions](https://github.com/mattermost/platform/blob/master/doc/developer/Setup.md) to install Mattermost. - -2. Create a branch with set to the ID of the ticket you're working on, for example ```PLT-394```, using command: - -``` -git checkout -b -``` - -## Programming and Testing - -1. Please review the [Mattermost Style Guide](Style-Guide.md) prior to making changes. - - To keep code clean and well structured, Mattermost uses ESLint to check that pull requests adhere to style guidelines for React. Code will need to follow Mattermost's React style guidelines in order to pass the automated build tests when a pull request is submitted. - -2. Please make sure to thoroughly test your change before submitting a pull request. - - Please review the ["Fast, Obvious, Forgiving" experience design principles](http://www.mattermost.org/design-principles/) for Mattermost and check that your feature meets the criteria. Also, for any changes to user interface or help text, please read the changes out loud, as a quick and easy way to catch any inconsitencies. - - -## Submitting a Pull Request - -1. Please add yourself to the Mattermost [approved contributor list](https://docs.google.com/spreadsheets/d/1NTCeG-iL_VS9bFqtmHSfwETo5f-8MQ7oMDE5IUYJi_Y/pubhtml?gid=0&single=true) prior to submitting by completing the [contributor license agreement](http://www.mattermost.org/mattermost-contributor-agreement/). - -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. - -3. Once submitted, your pull request will be checked via an automated build process and will be reviewed by at least two members of the Mattermost core team, who may either accept the PR or follow-up with feedback. It would then get merged into `master` for the next release. - -4. If you've included your mailing address in Step 1, you'll be receiving a [Limited Edition Mattermost Mug](http://forum.mattermost.org/t/limited-edition-mattermost-mugs/143) as a thank you gift after your first pull request has been accepted. - - +Please see [CONTRIBUTING.md](../../CONTRIBUTING.md) From 12124d87f2b16266abd94d6ca36d4ed9457595df Mon Sep 17 00:00:00 2001 From: it33 Date: Mon, 26 Oct 2015 12:00:41 -0700 Subject: [PATCH 03/10] Update CONTRIBUTING.md --- CONTRIBUTING.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7f321a87ad..db34a40ed6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,7 +4,10 @@ Thank you for your interest in contributing to Mattermost. This guide provides a ## Choose a Ticket -1. Review the list of [Good First Contribution](https://mattermost.atlassian.net/issues/?filter=10206) tickets listed in Jira. +1. Review the list of [Good First Contribution](https://mattermost.atlassian.net/issues/?filter=10206) tickets listed in Jira. + - You are welcome to work on any ticket, even if it is assigned, so long as it is not yet marked "in progress" + - (optional) You can share with the community that you're working on a specific ticket so no one else inadvertently duplicates your work by sharing on the forum or in the core team Mattermost instance as described in step 3. + 2. These projects are intended to be a straight forward first pull requests from new contributors. - If you don't find something appropriate for your interests, please see the full list of tickets [Accepting Pull Requests](https://mattermost.atlassian.net/issues/?filter=10101). - Also, feel free to fix bugs you find, or items in GitHub issues that the core team has approved, but not yet added to Jira. From 733fc9e2b118beac9e0e92a8ef80736abec3e032 Mon Sep 17 00:00:00 2001 From: it33 Date: Mon, 26 Oct 2015 12:02:01 -0700 Subject: [PATCH 04/10] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index db34a40ed6..a00a610023 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,7 +6,7 @@ Thank you for your interest in contributing to Mattermost. This guide provides a 1. Review the list of [Good First Contribution](https://mattermost.atlassian.net/issues/?filter=10206) tickets listed in Jira. - You are welcome to work on any ticket, even if it is assigned, so long as it is not yet marked "in progress" - - (optional) You can share with the community that you're working on a specific ticket so no one else inadvertently duplicates your work by sharing on the forum or in the core team Mattermost instance as described in step 3. + - (optional) Comment on the ticket that you're starting so no one else inadvertently duplicates your work 2. These projects are intended to be a straight forward first pull requests from new contributors. - If you don't find something appropriate for your interests, please see the full list of tickets [Accepting Pull Requests](https://mattermost.atlassian.net/issues/?filter=10101). From bbeda9b0e743f7a7611b7307f1f8f3f9062870f3 Mon Sep 17 00:00:00 2001 From: it33 Date: Mon, 26 Oct 2015 12:03:16 -0700 Subject: [PATCH 05/10] Update CONTRIBUTING.md --- CONTRIBUTING.md | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a00a610023..2addf440af 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,13 +4,13 @@ Thank you for your interest in contributing to Mattermost. This guide provides a ## Choose a Ticket -1. Review the list of [Good First Contribution](https://mattermost.atlassian.net/issues/?filter=10206) tickets listed in Jira. +1. Review the list of [Good First Contribution](https://mattermost.atlassian.net/issues/?filter=10206) tickets listed in Jira - You are welcome to work on any ticket, even if it is assigned, so long as it is not yet marked "in progress" - (optional) Comment on the ticket that you're starting so no one else inadvertently duplicates your work 2. These projects are intended to be a straight forward first pull requests from new contributors. - - If you don't find something appropriate for your interests, please see the full list of tickets [Accepting Pull Requests](https://mattermost.atlassian.net/issues/?filter=10101). - - Also, feel free to fix bugs you find, or items in GitHub issues that the core team has approved, but not yet added to Jira. + - If you don't find something appropriate for your interests, please see the full list of tickets [Accepting Pull Requests](https://mattermost.atlassian.net/issues/?filter=10101) + - Also, feel free to fix bugs you find, or items in GitHub issues that the core team has approved, but not yet added to Jira 3. If you have any questions at all about a ticket, there are several options to ask: 1. Start a topic in the [Mattermost forum](http://forum.mattermost.org/) @@ -18,7 +18,7 @@ Thank you for your interest in contributing to Mattermost. This guide provides a ## Install Mattermost and set up a Fork -1. Follow [developer setup instructions](https://github.com/mattermost/platform/blob/master/doc/developer/Setup.md) to install Mattermost. +1. Follow [developer setup instructions](https://github.com/mattermost/platform/blob/master/doc/developer/Setup.md) to install Mattermost 2. Create a branch with set to the ID of the ticket you're working on, for example ```PLT-394```, using command: @@ -28,27 +28,23 @@ git checkout -b ## Programming and Testing -1. Please review the [Mattermost Style Guide](Style-Guide.md) prior to making changes. +1. Please review the [Mattermost Style Guide](Style-Guide.md) prior to making changes - To keep code clean and well structured, Mattermost uses ESLint to check that pull requests adhere to style guidelines for React. Code will need to follow Mattermost's React style guidelines in order to pass the automated build tests when a pull request is submitted. + To keep code clean and well structured, Mattermost uses ESLint to check that pull requests adhere to style guidelines for React. Code will need to follow Mattermost's React style guidelines in order to pass the automated build tests when a pull request is submitted -2. Please make sure to thoroughly test your change before submitting a pull request. +2. Please make sure to thoroughly test your change before submitting a pull request - Please review the ["Fast, Obvious, Forgiving" experience design principles](http://www.mattermost.org/design-principles/) for Mattermost and check that your feature meets the criteria. Also, for any changes to user interface or help text, please read the changes out loud, as a quick and easy way to catch any inconsitencies. + Please review the ["Fast, Obvious, Forgiving" experience design principles](http://www.mattermost.org/design-principles/) for Mattermost and check that your feature meets the criteria. Also, for any changes to user interface or help text, please read the changes out loud, as a quick and easy way to catch any inconsitencies ## Submitting a Pull Request 1. Please add yourself to the Mattermost [approved contributor list](https://docs.google.com/spreadsheets/d/1NTCeG-iL_VS9bFqtmHSfwETo5f-8MQ7oMDE5IUYJi_Y/pubhtml?gid=0&single=true) prior to submitting by completing the [contributor license agreement](http://www.mattermost.org/mattermost-contributor-agreement/). -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. - -3. Once submitted, your pull request will be checked via an automated build process and will be reviewed by at least two members of the Mattermost core team, who may either accept the PR or follow-up with feedback. It would then get merged into `master` for the next release. - -4. If you've included your mailing address in Step 1, you'll be receiving a [Limited Edition Mattermost Mug](http://forum.mattermost.org/t/limited-edition-mattermost-mugs/143) as a thank you gift after your first pull request has been accepted. - +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 +3. Once submitted, your pull request will be checked via an automated build process and will be reviewed by at least two members of the Mattermost core team, who may either accept the PR or follow-up with feedback. It would then get merged into `master` for the next release +4. If you've included your mailing address in Step 1, you'll be receiving a [Limited Edition Mattermost Mug](http://forum.mattermost.org/t/limited-edition-mattermost-mugs/143) as a thank you gift after your first pull request has been accepted From 6651844801cfe84b7fbe3122875d5c1e11a4037b Mon Sep 17 00:00:00 2001 From: it33 Date: Mon, 26 Oct 2015 12:03:50 -0700 Subject: [PATCH 06/10] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2addf440af..f2d52a47f6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,7 +8,7 @@ Thank you for your interest in contributing to Mattermost. This guide provides a - You are welcome to work on any ticket, even if it is assigned, so long as it is not yet marked "in progress" - (optional) Comment on the ticket that you're starting so no one else inadvertently duplicates your work -2. These projects are intended to be a straight forward first pull requests from new contributors. +2. These projects are intended to be a straight forward first pull requests from new contributors - If you don't find something appropriate for your interests, please see the full list of tickets [Accepting Pull Requests](https://mattermost.atlassian.net/issues/?filter=10101) - Also, feel free to fix bugs you find, or items in GitHub issues that the core team has approved, but not yet added to Jira From fd74c3177d14aaba22d0a6b4229a2614194c1488 Mon Sep 17 00:00:00 2001 From: it33 Date: Mon, 26 Oct 2015 16:57:05 -0700 Subject: [PATCH 07/10] Fixing link --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f2d52a47f6..db8c90023f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -28,7 +28,7 @@ git checkout -b ## Programming and Testing -1. Please review the [Mattermost Style Guide](Style-Guide.md) prior to making changes +1. Please review the [Mattermost Style Guide](doc/developer/Style-Guide.md) prior to making changes To keep code clean and well structured, Mattermost uses ESLint to check that pull requests adhere to style guidelines for React. Code will need to follow Mattermost's React style guidelines in order to pass the automated build tests when a pull request is submitted From 34fff89e9df00ac0337187b07e6de6073e100669 Mon Sep 17 00:00:00 2001 From: it33 Date: Tue, 27 Oct 2015 07:10:32 -0700 Subject: [PATCH 08/10] Update Code-Contribution-Guidelines.md --- doc/developer/Code-Contribution-Guidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/developer/Code-Contribution-Guidelines.md b/doc/developer/Code-Contribution-Guidelines.md index 38822e2fb5..18be4aa0b4 100644 --- a/doc/developer/Code-Contribution-Guidelines.md +++ b/doc/developer/Code-Contribution-Guidelines.md @@ -1,5 +1,5 @@ # Code Contribution Guidelines -Please see [CONTRIBUTING.md](../../CONTRIBUTING.md) +Please see [CONTRIBUTING.md](https://github.com/mattermost/platform/blob/master/CONTRIBUTING.md) From c91f4f8ab12c07db0ddac1de5dfda12961cf95ba Mon Sep 17 00:00:00 2001 From: Florian Orben Date: Wed, 28 Oct 2015 01:19:15 +0100 Subject: [PATCH 09/10] Dont display '1 minute ago' timestamps for post posted < than 1 minute ago --- web/react/utils/utils.jsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index fadab27a71..3140a5d77f 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -211,11 +211,15 @@ export function displayDateTime(ticks) { } interval = Math.floor(seconds / 60); - if (interval > 1) { + if (interval >= 2) { return interval + ' minutes ago'; } - return '1 minute ago'; + if (interval >= 1) { + return '1 minute ago'; + } + + return 'just now'; } export function displayCommentDateTime(ticks) { From 36308f949d434675eca31b8eb1cd04c863273c93 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Tue, 27 Oct 2015 22:55:10 -0700 Subject: [PATCH 10/10] PLT-25 fixing issues with stats page --- api/user.go | 6 ++++++ web/react/components/admin_console/team_analytics.jsx | 4 ++++ web/react/components/admin_console/team_users.jsx | 10 ---------- web/sass-files/sass/partials/_admin-console.scss | 1 - 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/api/user.go b/api/user.go index 3796a50eee..c9958767f3 100644 --- a/api/user.go +++ b/api/user.go @@ -652,6 +652,12 @@ func getProfiles(c *Context, w http.ResponseWriter, r *http.Request) { for k, p := range profiles { options := utils.SanitizeOptions options["passwordupdate"] = false + + if c.HasSystemAdminPermissions("getProfiles") { + options["fullname"] = true + options["email"] = true + } + p.Sanitize(options) profiles[k] = p } diff --git a/web/react/components/admin_console/team_analytics.jsx b/web/react/components/admin_console/team_analytics.jsx index dd8812ad01..a945a551ca 100644 --- a/web/react/components/admin_console/team_analytics.jsx +++ b/web/react/components/admin_console/team_analytics.jsx @@ -56,6 +56,8 @@ export default class TeamAnalytics extends React.Component { teamId, 'post_counts_day', (data) => { + data.reverse(); + var chartData = { labels: [], datasets: [{ @@ -89,6 +91,8 @@ export default class TeamAnalytics extends React.Component { teamId, 'user_counts_with_posts_day', (data) => { + data.reverse(); + var chartData = { labels: [], datasets: [{ diff --git a/web/react/components/admin_console/team_users.jsx b/web/react/components/admin_console/team_users.jsx index ffb412159a..b44aba56e7 100644 --- a/web/react/components/admin_console/team_users.jsx +++ b/web/react/components/admin_console/team_users.jsx @@ -33,14 +33,6 @@ export default class UserList extends React.Component { this.getTeamProfiles(this.props.team.id); } - // this.setState({ - // teamId: this.state.teamId, - // users: this.state.users, - // serverError: this.state.serverError, - // showPasswordModal: this.state.showPasswordModal, - // user: this.state.user - // }); - getTeamProfiles(teamId) { Client.getProfilesForTeam( teamId, @@ -95,8 +87,6 @@ export default class UserList extends React.Component { } doPasswordResetDismiss() { - this.state.showPasswordModal = false; - this.state.user = null; this.setState({ teamId: this.state.teamId, users: this.state.users, diff --git a/web/sass-files/sass/partials/_admin-console.scss b/web/sass-files/sass/partials/_admin-console.scss index d0241f7957..9c65e2d1e7 100644 --- a/web/sass-files/sass/partials/_admin-console.scss +++ b/web/sass-files/sass/partials/_admin-console.scss @@ -38,7 +38,6 @@ .recent-active-users { width: 365px; - height: 375px; border: 1px solid #ddd; padding: 5px 10px 10px 10px; margin: 10px 10px 10px 10px;