diff --git a/actions/views/rhs.js b/actions/views/rhs.js index e9b5960f6753..84b38cc293de 100644 --- a/actions/views/rhs.js +++ b/actions/views/rhs.js @@ -108,6 +108,16 @@ export function showSearchResults() { }; } +export function showRHSPlugin(pluginId) { + const action = { + type: ActionTypes.UPDATE_RHS_STATE, + state: RHSStates.PLUGIN, + pluginId, + }; + + return action; +} + export function showFlaggedPosts() { return async (dispatch, getState) => { const state = getState(); diff --git a/components/search_results/search_results.jsx b/components/search_results/search_results.jsx index 7ce27791a0dc..95b664f4328a 100644 --- a/components/search_results/search_results.jsx +++ b/components/search_results/search_results.jsx @@ -5,6 +5,8 @@ import PropTypes from 'prop-types'; import React from 'react'; import Scrollbars from 'react-custom-scrollbars'; +import {FormattedMessage} from 'react-intl'; + import {debounce} from 'mattermost-redux/actions/helpers'; import * as Utils from 'utils/utils.jsx'; @@ -58,6 +60,7 @@ export default class SearchResults extends React.PureComponent { isMentionSearch: PropTypes.bool, isFlaggedPosts: PropTypes.bool, isPinnedPosts: PropTypes.bool, + isCard: PropTypes.bool, channelDisplayName: PropTypes.string.isRequired, dataRetentionEnableMessageDeletion: PropTypes.bool.isRequired, dataRetentionMessageRetentionDays: PropTypes.string, @@ -209,18 +212,51 @@ export default class SearchResults extends React.PureComponent { } } - return ( -