Merge branch 'chats-scrollbars' into 'develop'

Fix chat overflow-x

See merge request soapbox-pub/soapbox!2285
renovate/tabler-icons-2.x
Alex Gleason 2023-02-14 20:21:40 +00:00
commit 63ca831d16
3 zmienionych plików z 25 dodań i 18 usunięć

Wyświetl plik

@ -105,14 +105,16 @@ const StatusReactionWrapper: React.FC<IStatusReactionWrapper> = ({ statusId, chi
ref: setReferenceElement,
})}
<Portal>
<EmojiSelector
placement='top-start'
referenceElement={referenceElement}
onReact={handleReact}
visible={visible}
/>
</Portal>
{visible && (
<Portal>
<EmojiSelector
placement='top-start'
referenceElement={referenceElement}
onReact={handleReact}
visible={visible}
/>
</Portal>
)}
</div>
);
};

Wyświetl plik

@ -113,7 +113,7 @@ const EmojiSelector: React.FC<IEmojiSelector> = ({
return (
<div
className={clsx('z-50 transition-opacity duration-100', {
className={clsx('z-[101] transition-opacity duration-100', {
'opacity-0 pointer-events-none': !visible,
})}
ref={setPopperElement}

Wyświetl plik

@ -1,6 +1,7 @@
import React, { useState, useEffect } from 'react';
import EmojiSelector from '../../../../components/ui/emoji-selector/emoji-selector';
import { Portal } from 'soapbox/components/ui';
import EmojiSelector from 'soapbox/components/ui/emoji-selector/emoji-selector';
interface IChatMessageReactionWrapper {
onOpen(isOpen: boolean): void
@ -36,14 +37,18 @@ function ChatMessageReactionWrapper(props: IChatMessageReactionWrapper) {
onClick: onToggleVisibility,
})}
<EmojiSelector
visible={isOpen}
referenceElement={referenceElement}
onReact={handleSelect}
onClose={() => setIsOpen(false)}
offset={[-10, 12]}
all={false}
/>
{isOpen && (
<Portal>
<EmojiSelector
visible={isOpen}
referenceElement={referenceElement}
onReact={handleSelect}
onClose={() => setIsOpen(false)}
offset={[-10, 12]}
all={false}
/>
</Portal>
)}
</React.Fragment>
);
}