MM-39161 : Show more recently used reactions in the RHS hover menu (#23937)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
a2adc0e33e
Коммит
831a7db73d
@@ -8,7 +8,7 @@ import {FormattedMessage} from 'react-intl';
|
|||||||
import {Posts} from 'mattermost-redux/constants/index';
|
import {Posts} from 'mattermost-redux/constants/index';
|
||||||
import {isPostEphemeral} from 'mattermost-redux/utils/post_utils';
|
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 {isSystemMessage, fromAutoResponder} from 'utils/post_utils';
|
||||||
import ActionsMenu from 'components/actions_menu';
|
import ActionsMenu from 'components/actions_menu';
|
||||||
import DotMenu from 'components/dot_menu';
|
import DotMenu from 'components/dot_menu';
|
||||||
@@ -129,13 +129,17 @@ const PostOptions = (props: Props): JSX.Element => {
|
|||||||
|
|
||||||
let showRecentReactions: ReactNode;
|
let showRecentReactions: ReactNode;
|
||||||
if (showRecentlyUsedReactions) {
|
if (showRecentlyUsedReactions) {
|
||||||
|
const showMoreReactions = props.isExpanded ||
|
||||||
|
props.location === 'CENTER' ||
|
||||||
|
(document.getElementById('sidebar-right')?.getBoundingClientRect().width ?? 0) > Constants.SIDEBAR_MINIMUM_WIDTH;
|
||||||
|
|
||||||
showRecentReactions = (
|
showRecentReactions = (
|
||||||
<PostRecentReactions
|
<PostRecentReactions
|
||||||
channelId={post.channel_id}
|
channelId={post.channel_id}
|
||||||
postId={post.id}
|
postId={post.id}
|
||||||
teamId={props.teamId}
|
teamId={props.teamId}
|
||||||
emojis={props.recentEmojis}
|
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_LEFT_OFFSET: 87,
|
||||||
DEFAULT_EMOJI_PICKER_RIGHT_OFFSET: 15,
|
DEFAULT_EMOJI_PICKER_RIGHT_OFFSET: 15,
|
||||||
EMOJI_PICKER_WIDTH_OFFSET: 295,
|
EMOJI_PICKER_WIDTH_OFFSET: 295,
|
||||||
|
SIDEBAR_MINIMUM_WIDTH: 400,
|
||||||
THEME_ELEMENTS: [
|
THEME_ELEMENTS: [
|
||||||
{
|
{
|
||||||
group: 'sidebarElements',
|
group: 'sidebarElements',
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user