Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Tak-Iwamoto/mattermost-webapp int…
Browse files Browse the repository at this point in the history
…o MM-20462

* 'master' of github.com:Tak-Iwamoto/mattermost-webapp:
  fix getType is not a function (mattermost#6566)
  MM-29028 Remove findDOMNode from Slack import (mattermost#6554)
  MM-28997 Remove references to old context API (mattermost#6545)
  Add custom slash command tests (mattermost#6391)
  Cypress/E2E: Fix guest experience ui spec (mattermost#6563)
  [MM-28784] Migrate string refs to functional ones (mattermost#6494)
  [MM-28680] fix blank page on undefined message (mattermost#6450)
  MM-28733 : Admin Advisor v2 (mattermost#6461)
  MM 20547 user settings security ts (mattermost#6216)
  MM-20904 Add E2E tests for custom categories (mattermost#5981)
  Update NOTICE.txt (mattermost#6550)
  Check if emojiMap is undefined before invoking method for it (mattermost#6495)
  [MM-28151] Cypress/E2E: Automate backlogs - System Console > User Password (mattermost#6538)
  [MM-28295] e2e/messaging/reactions: add reactions spec (mattermost#6535)
  [MM-28706] revert ordering change for `in:` auto-suggest search results (mattermost#6493)
  Remove usage of t function with useIntl (mattermost#6552)
  MM-28992 Remove unused notPresent and mustBePresent props from MultiSelectSetting (mattermost#6544)
  MM-27530 Fix for Multiselect items not scrolling into view on arrow keys (mattermost#6286)
  Demoting failed test from prod (mattermost#6534)
  • Loading branch information
Tak-Iwamoto committed Sep 28, 2020
2 parents 467f050 + 029cc54 commit 7bbb5ca
Show file tree
Hide file tree
Showing 118 changed files with 1,692 additions and 766 deletions.
197 changes: 69 additions & 128 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,28 +50,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI

---

## @types/highlight.js"

This product contains '@types/highlight' by DefinitelyTyped.

The repository for high quality TypeScript type definitions.

* HOMEPAGE:
* https://github.com/DefinitelyTyped/DefinitelyTyped

* LICENSE: MIT

This project is licensed under the MIT license.
Copyrights are respective of each contributor listed at the beginning of each definition file.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

---

## @types/react-custom-scrollbars

This product contains '@types/react-custom-scrollbars' by Malte Wessel.
Expand All @@ -93,44 +71,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI

---

## @typescript-eslint/parser

This product contains '@typescript-eslint/parser' by TypeScript ESLint.

Monorepo for all the tooling which enables ESLint to support TypeScript

* HOMEPAGE:
* https://github.com/typescript-eslint/typescript-eslint

* LICENSE: TypeScript ESLint

Originally extracted from:

TypeScript ESLint Parser
Copyright JS Foundation and other contributors, https://js.foundation

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

---

## bootstrap

This product contains 'bootstrap' by The Bootstrap Authors.
Expand Down Expand Up @@ -167,41 +107,6 @@ THE SOFTWARE.

---

## bootstrap-colorpicker

This product contains 'bootstrap-colorpicker' by Javi Aguilar.

Bootstrap Colorpicker is a modular color picker plugin for Bootstrap 4.

* HOMEPAGE:
* https://github.com/itsjavi/bootstrap-colorpicker

* LICENSE: MIT

MIT License

Copyright (c) 2017 Javi Aguilar

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

---

## chart.js

This product contains 'chart.js' by Chart.js.
Expand Down Expand Up @@ -956,39 +861,6 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND

---

## intl

This product contains 'intl' by Symfony.

A PHP replacement layer for the C intl extension that also provides access to the localization data of the ICU library.

* HOMEPAGE:
* https://github.com/symfony/intl

* LICENSE: MIT

Copyright (c) 2004-2020 Fabien Potencier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

---

## jasny-bootstrap

This product contains 'jasny-bootstrap' by Arnold Daniels.
Expand Down Expand Up @@ -2395,6 +2267,41 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

---

## react-is

This product contains 'react-is' by Facebook.

This package allows you to test arbitrary values and see if they're a particular React element type

* HOMEPAGE:
* https://github.com/facebook/react

* LICENSE: MIT

MIT License

Copyright (c) Facebook, Inc. and its affiliates.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

---

## react-overlays

This product contains 'react-overlays' by Jason Quense.
Expand Down Expand Up @@ -2859,6 +2766,40 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

---

## tinycolor2

This product contains 'tinycolor2' by MobileHero.

TinyColor is a small, fast library for color manipulation and conversion in JavaScript

* HOMEPAGE:
* https://github.com/mobilehero/mobile-tinycolor2

* LICENSE: MIT

Copyright (c), Brian Grinstead, http:https://briangrinstead.com

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

---

## typescript

This product contains 'typescript' by Microsoft.
Expand Down
13 changes: 10 additions & 3 deletions actions/websocket_actions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ import {loadProfilesForSidebar} from 'actions/user_actions.jsx';
import store from 'stores/redux_store.jsx';
import WebSocketClient from 'client/web_websocket_client.jsx';
import {loadPlugin, loadPluginsIfNecessary, removePlugin} from 'plugins';
import {ActionTypes, Constants, AnnouncementBarMessages, SocketEvents, UserStatuses, ModalIdentifiers} from 'utils/constants';
import {ActionTypes, Constants, AnnouncementBarMessages, SocketEvents, UserStatuses, ModalIdentifiers, WarnMetricTypes} from 'utils/constants';
import {getSiteURL} from 'utils/url';
import {isGuest} from 'utils/utils';
import RemovedFromChannelModal from 'components/removed_from_channel_modal';
Expand Down Expand Up @@ -1256,14 +1256,21 @@ function handleGroupNotAssociatedToChannelEvent(msg) {
}

function handleWarnMetricStatusReceivedEvent(msg) {
var receivedData = JSON.parse(msg.data.warnMetricStatus);
let bannerData;
if (receivedData.id === WarnMetricTypes.SYSTEM_WARN_METRIC_NUMBER_OF_ACTIVE_USERS_500) {
bannerData = AnnouncementBarMessages.WARN_METRIC_STATUS_NUMBER_OF_USERS;
} else if (receivedData.id === WarnMetricTypes.SYSTEM_WARN_METRIC_NUMBER_OF_POSTS_2M) {
bannerData = AnnouncementBarMessages.WARN_METRIC_STATUS_NUMBER_OF_POSTS;
}
store.dispatch(batchActions([
{
type: GeneralTypes.WARN_METRIC_STATUS_RECEIVED,
data: JSON.parse(msg.data.warnMetricStatus),
data: receivedData,
},
{
type: ActionTypes.SHOW_NOTICE,
data: [AnnouncementBarMessages.NUMBER_OF_ACTIVE_USERS_WARN_METRIC_STATUS],
data: [bannerData],
},
]));
}
Expand Down
3 changes: 3 additions & 0 deletions components/__snapshots__/generic_modal.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ exports[`components/GenericModal should match snapshot for base case 1`] = `
dialogClassName="a11y__modal GenericModal"
dialogComponentClass={[Function]}
enforceFocus={true}
id="genericModal"
keyboard={true}
manager={
ModalManager {
Expand Down Expand Up @@ -71,6 +72,7 @@ exports[`components/GenericModal should match snapshot with both buttons 1`] = `
dialogClassName="a11y__modal GenericModal"
dialogComponentClass={[Function]}
enforceFocus={true}
id="genericModal"
keyboard={true}
manager={
ModalManager {
Expand Down Expand Up @@ -153,6 +155,7 @@ exports[`components/GenericModal should match snapshot with disabled confirm but
dialogClassName="a11y__modal GenericModal"
dialogComponentClass={[Function]}
enforceFocus={true}
id="genericModal"
keyboard={true}
manager={
ModalManager {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ exports[`components/AddGroupsToChannelModal should match snapshot 1`] = `
perPage={50}
placeholderText="Search and add groups"
saving={false}
selectedItemRef={
Object {
"current": null,
}
}
valueRenderer={[Function]}
values={Array []}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ export default class AddGroupsToChannelModal extends React.PureComponent {
addError: null,
loadingGroups: true,
};

this.selectedItemRef = React.createRef();
}

componentDidMount() {
Expand Down Expand Up @@ -174,13 +176,13 @@ export default class AddGroupsToChannelModal extends React.PureComponent {
this.props.actions.setModalSearchTerm(term);
}

renderOption(option, isSelected, onAdd, onMouseMove) {
renderOption = (option, isSelected, onAdd, onMouseMove) => {
const rowSelected = isSelected ? 'more-modal__row--selected' : '';

return (
<div
key={option.id}
ref={isSelected ? 'selected' : option.id}
ref={isSelected ? this.selectedItemRef : option.id}
className={'more-modal__row clickable ' + rowSelected}
onClick={() => onAdd(option)}
onMouseMove={() => onMouseMove(option)}
Expand Down Expand Up @@ -280,6 +282,7 @@ export default class AddGroupsToChannelModal extends React.PureComponent {
key='addGroupsToChannelKey'
options={groupsToShow}
optionRenderer={this.renderOption}
selectedItemRef={this.selectedItemRef}
values={this.state.values}
valueRenderer={this.renderValue}
perPage={GROUPS_PER_PAGE}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ exports[`components/AddGroupsToTeamModal should match snapshot 1`] = `
perPage={50}
placeholderText="Search and add groups"
saving={false}
selectedItemRef={
Object {
"current": null,
}
}
valueRenderer={[Function]}
values={Array []}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ export default class AddGroupsToTeamModal extends React.PureComponent {
addError: null,
loadingGroups: true,
};

this.selectedItemRef = React.createRef();
}

componentDidMount() {
Expand Down Expand Up @@ -168,13 +170,13 @@ export default class AddGroupsToTeamModal extends React.PureComponent {
this.props.actions.setModalSearchTerm(term);
}

renderOption(option, isSelected, onAdd, onMouseMove) {
renderOption = (option, isSelected, onAdd, onMouseMove) => {
const rowSelected = isSelected ? 'more-modal__row--selected' : '';

return (
<div
key={option.id}
ref={isSelected ? 'selected' : option.id}
ref={isSelected ? this.selectedItemRef : option.id}
className={'more-modal__row clickable ' + rowSelected}
onClick={() => onAdd(option)}
onMouseMove={() => onMouseMove(option)}
Expand Down Expand Up @@ -276,6 +278,7 @@ export default class AddGroupsToTeamModal extends React.PureComponent {
key='addGroupsToTeamKey'
options={groupsToShow}
optionRenderer={this.renderOption}
selectedItemRef={this.selectedItemRef}
values={this.state.values}
valueRenderer={this.renderValue}
perPage={GROUPS_PER_PAGE}
Expand Down
Loading

0 comments on commit 7bbb5ca

Please sign in to comment.