diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-05-31 16:51:42 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-31 16:51:42 -0400 |
commit | 5aaedb9663b987caf1fb11ea6062bcc44e6bafca (patch) | |
tree | bd77c10168f9fb1b0f998b08a3b2a3761512a451 /webapp/components/suggestion/suggestion_list.jsx | |
parent | 8ce72aedc3a5b4f783fb6ebab38aac8bf5f413ae (diff) | |
download | chat-5aaedb9663b987caf1fb11ea6062bcc44e6bafca.tar.gz chat-5aaedb9663b987caf1fb11ea6062bcc44e6bafca.tar.bz2 chat-5aaedb9663b987caf1fb11ea6062bcc44e6bafca.zip |
PLT-5699 Improvements to channel switcher (#6486)
* Refactor channel switcher to not wait on server results
* Change channel switcher to quick switcher and include team switching
* Add sections, update ordering and add discoverability button
* Fix styling error
* Use CMD in text if on mac
* Clean yarn cache on every install
* Various UX updates per feedback
* Add shortcut help text for team switcher
* Couple more updates per feedback
* Some minor fixes for GM and autocomplete race
* Updating UI for channel switcher (#6504)
* Updating channel switcher button (#6506)
* Updating switcher modal on mobile (#6507)
* Removed jQuery usage
* Rename function to toggleQuickSwitchModal
Diffstat (limited to 'webapp/components/suggestion/suggestion_list.jsx')
-rw-r--r-- | webapp/components/suggestion/suggestion_list.jsx | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/webapp/components/suggestion/suggestion_list.jsx b/webapp/components/suggestion/suggestion_list.jsx index 59f0d02f8..64e8713c5 100644 --- a/webapp/components/suggestion/suggestion_list.jsx +++ b/webapp/components/suggestion/suggestion_list.jsx @@ -1,14 +1,14 @@ // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See License.txt for license information. +import SuggestionStore from 'stores/suggestion_store.jsx'; + import $ from 'jquery'; -import PropTypes from 'prop-types'; import React from 'react'; import ReactDOM from 'react-dom'; +import PropTypes from 'prop-types'; import {FormattedMessage} from 'react-intl'; -import SuggestionStore from 'stores/suggestion_store.jsx'; - export default class SuggestionList extends React.Component { static propTypes = { suggestionId: PropTypes.string.isRequired, @@ -111,6 +111,17 @@ export default class SuggestionList extends React.Component { ); } + renderLoading(type) { + return ( + <div + key={type + '-loading'} + className='suggestion-loader' + > + <i className='fa fa-spinner fa-pulse fa-fw margin-bottom'/> + </div> + ); + } + render() { if (this.state.items.length === 0) { return null; @@ -131,6 +142,11 @@ export default class SuggestionList extends React.Component { lastType = item.type; } + if (item.loading) { + items.push(this.renderLoading(item.type)); + continue; + } + items.push( <Component key={term} |