Fix story direct Quick Reply and low height emoji picker limit

This commit is contained in:
ayumi-signal 2024-04-03 15:39:20 -07:00 committed by GitHub
parent e96a1e4bc3
commit 4d794eaf14
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 22 additions and 13 deletions

View file

@ -3,13 +3,16 @@
.StoryViewsNRepliesModal { .StoryViewsNRepliesModal {
min-width: 320px; min-width: 320px;
min-height: min(400px, 80vh);
max-height: 80vh; max-height: 80vh;
&--group { &--group {
display: flex; min-height: min(400px, 80vh);
flex-direction: column;
flex: 1; .StoryViewsNRepliesModal__content {
display: flex;
flex-direction: column;
flex: 1;
}
} }
&__body { &__body {
@ -29,6 +32,13 @@
padding-block-start: 16px; padding-block-start: 16px;
} }
// When picking from full emoji set, compensate for for hidden quick picker
&:has(.module-emoji-picker)::before {
content: '';
display: block;
height: 52px;
}
padding-block-end: 16px; padding-block-end: 16px;
padding-inline: 16px; padding-inline: 16px;
} }
@ -249,8 +259,9 @@
} }
.module-emoji-picker { .module-emoji-picker {
bottom: 55px;
position: absolute; position: absolute;
bottom: 55px;
max-height: calc(100vh - 100px);
} }
} }

View file

@ -188,7 +188,7 @@ export const InAGroupNoReplies = Template.bind({});
InAGroupNoReplies.args = { InAGroupNoReplies.args = {
group: {}, group: {},
}; };
InAGroupNoReplies.storyName = 'In a group (no replies)'; InAGroupNoReplies.storyName = 'In a group (no replies, can reply)';
export const InAGroup = Template.bind({}); export const InAGroup = Template.bind({});
{ {

View file

@ -440,18 +440,16 @@ export function StoryViewsNRepliesModal({
<Modal <Modal
modalName="StoryViewsNRepliesModal" modalName="StoryViewsNRepliesModal"
i18n={i18n} i18n={i18n}
moduleClassName="StoryViewsNRepliesModal" moduleClassName={classNames({
StoryViewsNRepliesModal: true,
'StoryViewsNRepliesModal--group': Boolean(group),
})}
onClose={onClose} onClose={onClose}
padded={false} padded={false}
useFocusTrap={Boolean(composerElement)} useFocusTrap={Boolean(composerElement)}
theme={Theme.Dark} theme={Theme.Dark}
> >
<div <div className="StoryViewsNRepliesModal__content">
className={classNames({
StoryViewsNRepliesModal__content: true,
'StoryViewsNRepliesModal--group': Boolean(group),
})}
>
{tabsElement || ( {tabsElement || (
<> <>
{viewsElement || repliesElement} {viewsElement || repliesElement}