fix(app): broken scroll in message list popouts (#49)
This commit is contained in:
parent
00fcf59120
commit
21e489638b
@ -18,12 +18,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
|
--pins-popout-max-height: min(calc(100vh - 120px), 720px);
|
||||||
|
--pins-popout-header-height: 68px;
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
max-height: min(calc(100vh - 120px), 720px);
|
|
||||||
min-height: 200px;
|
|
||||||
width: 480px;
|
width: 480px;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
min-height: 200px;
|
||||||
|
max-height: var(--pins-popout-max-height);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border-radius: var(--radius-md);
|
border-radius: var(--radius-md);
|
||||||
border: 1px solid var(--background-header-secondary);
|
border: 1px solid var(--background-header-secondary);
|
||||||
@ -36,6 +38,17 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.25rem;
|
gap: 0.25rem;
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
|
min-height: var(--pins-popout-header-height);
|
||||||
|
}
|
||||||
|
|
||||||
|
.body {
|
||||||
|
flex: 1 1 0%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: 100%;
|
||||||
|
min-height: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
max-height: calc(var(--pins-popout-max-height) - var(--pins-popout-header-height));
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
|
|||||||
@ -32,7 +32,9 @@ export const ChannelPinsPopout = observer(({channel}: {channel: ChannelRecord})
|
|||||||
<PushPinIcon className={styles.iconLarge} />
|
<PushPinIcon className={styles.iconLarge} />
|
||||||
<h1 className={styles.title}>{t`Pinned Messages`}</h1>
|
<h1 className={styles.title}>{t`Pinned Messages`}</h1>
|
||||||
</div>
|
</div>
|
||||||
<ChannelPinsContent channel={channel} />
|
<div className={styles.body}>
|
||||||
|
<ChannelPinsContent channel={channel} />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -98,13 +98,15 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
flex: 1 1 0%;
|
flex: 1 1 0%;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tabContent {
|
.tabContent {
|
||||||
position: absolute;
|
|
||||||
inset: 0;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
flex: 1 1 0%;
|
||||||
|
min-height: 0;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.iconSmall {
|
.iconSmall {
|
||||||
|
|||||||
@ -51,10 +51,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.scroller {
|
.scroller {
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
min-width: 0;
|
||||||
max-height: 700px;
|
max-height: 700px;
|
||||||
padding-left: 8px;
|
padding-block: 8px;
|
||||||
padding-right: 8px;
|
padding-inline-start: 12px;
|
||||||
padding-top: 8px;
|
padding-inline-end: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.groupContainer {
|
.groupContainer {
|
||||||
|
|||||||
@ -193,7 +193,7 @@ export const RecentMentionsContent = observer(
|
|||||||
className={styles.scroller}
|
className={styles.scroller}
|
||||||
onScroll={handleScroll}
|
onScroll={handleScroll}
|
||||||
key="recent-mentions-scroller"
|
key="recent-mentions-scroller"
|
||||||
reserveScrollbarTrack={false}
|
reserveScrollbarTrack
|
||||||
>
|
>
|
||||||
{accessibleMentions.map((message) => {
|
{accessibleMentions.map((message) => {
|
||||||
const channel = ChannelStore.getChannel(message.channelId);
|
const channel = ChannelStore.getChannel(message.channelId);
|
||||||
|
|||||||
@ -69,7 +69,7 @@ export const SavedMessagesContent = observer(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Scroller className={previewStyles.scroller} key="saved-messages-scroller" reserveScrollbarTrack={false}>
|
<Scroller className={previewStyles.scroller} key="saved-messages-scroller" reserveScrollbarTrack>
|
||||||
{missingSavedMessages.map((entry) => renderMissingSavedMessage(entry.id))}
|
{missingSavedMessages.map((entry) => renderMissingSavedMessage(entry.id))}
|
||||||
{savedMessages.map((message) => {
|
{savedMessages.map((message) => {
|
||||||
const channel = ChannelStore.getChannel(message.channelId);
|
const channel = ChannelStore.getChannel(message.channelId);
|
||||||
|
|||||||
@ -84,7 +84,7 @@ export const ScheduledMessagesContent = observer(() => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Scroller className={previewStyles.scroller} key="scheduled-messages-scroller" reserveScrollbarTrack={false}>
|
<Scroller className={previewStyles.scroller} key="scheduled-messages-scroller" reserveScrollbarTrack>
|
||||||
{scheduledMessages.map((message) => (
|
{scheduledMessages.map((message) => (
|
||||||
<div key={message.id} className={previewStyles.previewCard}>
|
<div key={message.id} className={previewStyles.previewCard}>
|
||||||
<div className={styles.cardHeader}>
|
<div className={styles.cardHeader}>
|
||||||
|
|||||||
@ -153,7 +153,7 @@ export const ChannelPinsContent = observer(({channel, onJump}: ChannelPinsConten
|
|||||||
className={clsx(previewStyles.scroller, mobileLayout.enabled && previewStyles.scrollerMobile)}
|
className={clsx(previewStyles.scroller, mobileLayout.enabled && previewStyles.scrollerMobile)}
|
||||||
key="channel-pins-scroller"
|
key="channel-pins-scroller"
|
||||||
onScroll={handleScroll}
|
onScroll={handleScroll}
|
||||||
reserveScrollbarTrack={false}
|
reserveScrollbarTrack
|
||||||
>
|
>
|
||||||
{mobileLayout.enabled && <div className={previewStyles.topSpacer} />}
|
{mobileLayout.enabled && <div className={previewStyles.topSpacer} />}
|
||||||
{pinnedPins.slice().map(({message}) => {
|
{pinnedPins.slice().map(({message}) => {
|
||||||
|
|||||||
@ -104,7 +104,9 @@
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
padding: 8px;
|
padding-block: 8px;
|
||||||
|
padding-inline-start: 12px;
|
||||||
|
padding-inline-end: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scrollerMobile {
|
.scrollerMobile {
|
||||||
|
|||||||
@ -24,6 +24,7 @@
|
|||||||
min-height: 0;
|
min-height: 0;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
max-height: inherit;
|
||||||
flex: 1 1 0%;
|
flex: 1 1 0%;
|
||||||
padding-inline-end: var(--scroller-track-size);
|
padding-inline-end: var(--scroller-track-size);
|
||||||
}
|
}
|
||||||
@ -34,6 +35,7 @@
|
|||||||
min-height: 0;
|
min-height: 0;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
max-height: inherit;
|
||||||
flex: 1 1 0%;
|
flex: 1 1 0%;
|
||||||
overscroll-behavior: contain;
|
overscroll-behavior: contain;
|
||||||
overflow-anchor: none;
|
overflow-anchor: none;
|
||||||
@ -115,9 +117,7 @@
|
|||||||
|
|
||||||
.scrollerChildren {
|
.scrollerChildren {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex: 1 1 0%;
|
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
min-height: 0;
|
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user