diff --git a/webapp/channels/src/components/post/post_options.tsx b/webapp/channels/src/components/post/post_options.tsx index f08a1c2c0b..2b45726a3b 100644 --- a/webapp/channels/src/components/post/post_options.tsx +++ b/webapp/channels/src/components/post/post_options.tsx @@ -8,7 +8,7 @@ import {FormattedMessage} from 'react-intl'; import {Posts} from 'mattermost-redux/constants/index'; import {isPostEphemeral} from 'mattermost-redux/utils/post_utils'; -import {Locations} from 'utils/constants'; +import {Locations, Constants} from 'utils/constants'; import {isSystemMessage, fromAutoResponder} from 'utils/post_utils'; import ActionsMenu from 'components/actions_menu'; import DotMenu from 'components/dot_menu'; @@ -129,13 +129,17 @@ const PostOptions = (props: Props): JSX.Element => { let showRecentReactions: ReactNode; if (showRecentlyUsedReactions) { + const showMoreReactions = props.isExpanded || + props.location === 'CENTER' || + (document.getElementById('sidebar-right')?.getBoundingClientRect().width ?? 0) > Constants.SIDEBAR_MINIMUM_WIDTH; + showRecentReactions = ( ); } diff --git a/webapp/channels/src/utils/constants.tsx b/webapp/channels/src/utils/constants.tsx index 6b683149af..3cfdbb12be 100644 --- a/webapp/channels/src/utils/constants.tsx +++ b/webapp/channels/src/utils/constants.tsx @@ -1581,6 +1581,7 @@ export const Constants = { DEFAULT_EMOJI_PICKER_LEFT_OFFSET: 87, DEFAULT_EMOJI_PICKER_RIGHT_OFFSET: 15, EMOJI_PICKER_WIDTH_OFFSET: 295, + SIDEBAR_MINIMUM_WIDTH: 400, THEME_ELEMENTS: [ { group: 'sidebarElements',