mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-21 09:31:17 -08:00
add border for thread drawer
This commit is contained in:
1 parent
604ad29728
commit
68ff2d6992
3 files changed
+52
-47
No files matched your search
@@ -0,0 +1,5 @@
|
||||
---
|
||||
default: patch
|
||||
---
|
||||
|
||||
Improve thread drawer separation between the pinned root message and replies with a border.
|
||||
@@ -28,6 +28,23 @@ export const ThreadDrawerHeader = style({
|
||||
borderBottomWidth: config.borderWidth.B300,
|
||||
});
|
||||
|
||||
export const threadRootShell = style({
|
||||
position: 'relative',
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
flexShrink: 0,
|
||||
});
|
||||
|
||||
export const threadRootScrollShadow = style({
|
||||
position: 'relative',
|
||||
flexShrink: 0,
|
||||
zIndex: 1,
|
||||
boxShadow: config.shadow.E100,
|
||||
borderBottomWidth: config.borderWidth.B300,
|
||||
borderBottomStyle: 'solid',
|
||||
borderBottomColor: color.Surface.ContainerLine,
|
||||
});
|
||||
|
||||
export const ThreadDrawerContent = style({
|
||||
position: 'relative',
|
||||
overflow: 'hidden',
|
||||
|
||||
@@ -1,18 +1,6 @@
|
||||
import type { MouseEventHandler } from 'react';
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import {
|
||||
Box,
|
||||
Header,
|
||||
Icon,
|
||||
IconButton,
|
||||
Icons,
|
||||
Scroll,
|
||||
Spinner,
|
||||
Text,
|
||||
color,
|
||||
config,
|
||||
toRem,
|
||||
} from 'folds';
|
||||
import { Box, Header, Icon, IconButton, Icons, Scroll, Spinner, Text, config, toRem } from 'folds';
|
||||
import type { IEvent, Room } from '$types/matrix-sdk';
|
||||
import {
|
||||
Direction,
|
||||
@@ -807,36 +795,38 @@ export function ThreadDrawer({ room, threadRootId, onClose, overlay }: ThreadDra
|
||||
|
||||
{/* Thread root message */}
|
||||
{rootEvent && (
|
||||
<Box style={{ position: 'relative', flexShrink: 0 }}>
|
||||
<Scroll
|
||||
variant="Background"
|
||||
visibility="Hover"
|
||||
direction="Vertical"
|
||||
size="300"
|
||||
hideTrack
|
||||
style={{
|
||||
height: toRem(curHeight),
|
||||
flexShrink: 0,
|
||||
}}
|
||||
>
|
||||
<Box
|
||||
className={css.messageList}
|
||||
direction="Column"
|
||||
<Box className={css.threadRootShell}>
|
||||
<Box className={css.threadRootScrollShadow}>
|
||||
<Scroll
|
||||
variant="Background"
|
||||
visibility="Hover"
|
||||
direction="Vertical"
|
||||
size="300"
|
||||
hideTrack
|
||||
style={{
|
||||
padding: `${config.space.S200} 0 ${config.space.S100} 0`,
|
||||
height: toRem(curHeight),
|
||||
flexShrink: 0,
|
||||
}}
|
||||
>
|
||||
{renderMatrixEvent(
|
||||
rootEvent.getType(),
|
||||
typeof rootEvent.getStateKey() === 'string',
|
||||
rootEvent.getId()!,
|
||||
rootEvent,
|
||||
processedEvents.find((e) => e.id === threadRootId)?.itemIndex ?? 0,
|
||||
thread?.timelineSet ?? room.getUnfilteredTimelineSet(),
|
||||
false
|
||||
)}
|
||||
</Box>
|
||||
</Scroll>
|
||||
<Box
|
||||
className={css.messageList}
|
||||
direction="Column"
|
||||
style={{
|
||||
padding: `${config.space.S200} 0 ${config.space.S100} 0`,
|
||||
}}
|
||||
>
|
||||
{renderMatrixEvent(
|
||||
rootEvent.getType(),
|
||||
typeof rootEvent.getStateKey() === 'string',
|
||||
rootEvent.getId()!,
|
||||
rootEvent,
|
||||
processedEvents.find((e) => e.id === threadRootId)?.itemIndex ?? 0,
|
||||
thread?.timelineSet ?? room.getUnfilteredTimelineSet(),
|
||||
false
|
||||
)}
|
||||
</Box>
|
||||
</Scroll>
|
||||
</Box>
|
||||
<SidebarResizer
|
||||
setCurWidth={setCurHeight}
|
||||
sidebarWidth={threadRootHeight}
|
||||
@@ -845,13 +835,6 @@ export function ThreadDrawer({ room, threadRootId, onClose, overlay }: ThreadDra
|
||||
maxValue={700}
|
||||
topSided
|
||||
/>
|
||||
<div
|
||||
style={{
|
||||
width: '100%',
|
||||
height: toRem(1),
|
||||
backgroundColor: color.Surface.ContainerLine,
|
||||
}}
|
||||
/>
|
||||
</Box>
|
||||
)}
|
||||
{/* Replies */}
|
||||
|
||||
Reference in new issue
Block a user