Message / Message Context Menu: Fix redundant width (#4506)

This commit is contained in:
Alexander Zinchuk 2024-05-03 14:38:07 +02:00
parent 8b31f33685
commit 714344dc2d
2 changed files with 6 additions and 3 deletions

View File

@ -23,7 +23,6 @@
padding: 0 !important; padding: 0 !important;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: stretch;
} }
&.with-reactions .bubble { &.with-reactions .bubble {
@ -72,6 +71,12 @@
.avatars { .avatars {
padding-inline-start: 1rem; padding-inline-start: 1rem;
} }
.ReactionSelector {
position: absolute;
top: 0;
transform: translateY(calc(-100% - 0.5rem));
}
} }
.ReactionSelector-hidden { .ReactionSelector-hidden {

View File

@ -127,7 +127,6 @@ type OwnProps = {
const SCROLLBAR_WIDTH = 10; const SCROLLBAR_WIDTH = 10;
const REACTION_SELECTOR_WIDTH_REM = 19.25; const REACTION_SELECTOR_WIDTH_REM = 19.25;
const REACTION_SELECTOR_HEIGHT_REM = 3;
const ANIMATION_DURATION = 200; const ANIMATION_DURATION = 200;
const MessageContextMenu: FC<OwnProps> = ({ const MessageContextMenu: FC<OwnProps> = ({
@ -293,7 +292,6 @@ const MessageContextMenu: FC<OwnProps> = ({
extraPaddingX: SCROLLBAR_WIDTH, extraPaddingX: SCROLLBAR_WIDTH,
extraTopPadding: (document.querySelector<HTMLElement>('.MiddleHeader')!).offsetHeight, extraTopPadding: (document.querySelector<HTMLElement>('.MiddleHeader')!).offsetHeight,
extraMarginTop: extraHeightPinned + extraHeightAudioPlayer, extraMarginTop: extraHeightPinned + extraHeightAudioPlayer,
topShiftY: withReactions && !isMobile ? -REACTION_SELECTOR_HEIGHT_REM * REM : 0,
shouldAvoidNegativePosition: !isDesktop, shouldAvoidNegativePosition: !isDesktop,
menuElMinWidth: withReactions && isMobile ? REACTION_SELECTOR_WIDTH_REM * REM : undefined, menuElMinWidth: withReactions && isMobile ? REACTION_SELECTOR_WIDTH_REM * REM : undefined,
}; };