mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
MM-39161 : Show more recently used reactions in the RHS hover menu (#23937)
This commit is contained in:
parent
a2adc0e33e
commit
831a7db73d
@ -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 = (
|
||||
<PostRecentReactions
|
||||
channelId={post.channel_id}
|
||||
postId={post.id}
|
||||
teamId={props.teamId}
|
||||
emojis={props.recentEmojis}
|
||||
size={props.isExpanded || props.location === 'CENTER' ? 3 : 1}
|
||||
size={showMoreReactions ? 3 : 1}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user