diff --git a/.changeset/thread-drawer-root-separator.md b/.changeset/thread-drawer-root-separator.md new file mode 100644 index 000000000..f474a72f5 --- /dev/null +++ b/.changeset/thread-drawer-root-separator.md @@ -0,0 +1,5 @@ +--- +default: patch +--- + +Improve thread drawer separation between the pinned root message and replies with a border. diff --git a/src/app/features/room/ThreadDrawer.css.ts b/src/app/features/room/ThreadDrawer.css.ts index d44d1b103..607f2ac06 100644 --- a/src/app/features/room/ThreadDrawer.css.ts +++ b/src/app/features/room/ThreadDrawer.css.ts @@ -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', diff --git a/src/app/features/room/ThreadDrawer.tsx b/src/app/features/room/ThreadDrawer.tsx index 6a243bca1..070cdaf58 100644 --- a/src/app/features/room/ThreadDrawer.tsx +++ b/src/app/features/room/ThreadDrawer.tsx @@ -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 && ( - - - + + - {renderMatrixEvent( - rootEvent.getType(), - typeof rootEvent.getStateKey() === 'string', - rootEvent.getId()!, - rootEvent, - processedEvents.find((e) => e.id === threadRootId)?.itemIndex ?? 0, - thread?.timelineSet ?? room.getUnfilteredTimelineSet(), - false - )} - - + + {renderMatrixEvent( + rootEvent.getType(), + typeof rootEvent.getStateKey() === 'string', + rootEvent.getId()!, + rootEvent, + processedEvents.find((e) => e.id === threadRootId)?.itemIndex ?? 0, + thread?.timelineSet ?? room.getUnfilteredTimelineSet(), + false + )} + + + -
)} {/* Replies */}