From d5a4ed3d77361a539e8a63facc62622c8862f3e3 Mon Sep 17 00:00:00 2001 From: william garrity Date: Tue, 31 Mar 2026 21:23:33 -0400 Subject: [PATCH 1/4] feat(condensed): add condensed view support for Messaging components - Add 31 data-slot attributes across 7 files: MessageThread (5), ConversationHeader (7), MessageList (7), MessageBubble (8), MessageComposer (6), AttachmentPicker (1) - Add ~315 lines of condensed CSS covering: conversation header, conversation list items, message list, date separators, typing indicator, empty state, load more, message bubbles, composer with aligned input/buttons/char count - Fix composer vertical alignment: flex centering, textarea height override, character counter repositioning --- src/components/Messaging/AttachmentPicker.tsx | 1 + .../Messaging/ConversationHeader.tsx | 20 +- src/components/Messaging/MessageBubble.tsx | 13 +- src/components/Messaging/MessageComposer.tsx | 11 +- src/components/Messaging/MessageList.tsx | 15 +- src/components/Messaging/MessageThread.tsx | 5 + src/styles/condensed-view.css | 315 ++++++++++++++++++ 7 files changed, 371 insertions(+), 9 deletions(-) diff --git a/src/components/Messaging/AttachmentPicker.tsx b/src/components/Messaging/AttachmentPicker.tsx index 414788d1..9e297932 100644 --- a/src/components/Messaging/AttachmentPicker.tsx +++ b/src/components/Messaging/AttachmentPicker.tsx @@ -364,6 +364,7 @@ const AttachmentPicker = React.forwardRef< type="button" onClick={handleClick} disabled={disabled} + data-slot="attachment-picker-button" className={cn( 'inline-flex items-center justify-center', 'rounded-full p-2', diff --git a/src/components/Messaging/ConversationHeader.tsx b/src/components/Messaging/ConversationHeader.tsx index aabdb8de..4cc214e2 100644 --- a/src/components/Messaging/ConversationHeader.tsx +++ b/src/components/Messaging/ConversationHeader.tsx @@ -165,6 +165,7 @@ const ConversationHeader = React.forwardRef< return (
@@ -201,7 +202,10 @@ const ConversationHeader = React.forwardRef< ))} {/* Avatar */} -
+
{/* Title and subtitle */} -
+

{displayTitle}

@@ -325,6 +329,7 @@ const ConversationListItem = React.forwardRef< ref={ref} type="button" onClick={() => onSelect?.(conversation)} + data-slot="conversation-list-item" className={cn( 'flex w-full items-center gap-3 px-4 py-3', 'text-left transition-colors', @@ -338,7 +343,10 @@ const ConversationListItem = React.forwardRef< {...props} > {/* Avatar */} -
+
{/* Content */} -
+

{isUnread && ( ( return (
( return (
( > {/* Avatar */} {showAvatar && !isOutgoing && ( -
+
( > {/* Sender name (for group chats) */} {showSenderName && !isOutgoing && ( - + {message.sender.name} )} @@ -528,6 +533,7 @@ const MessageBubble = React.forwardRef( {/* Reply preview */} {message.replyTo && (
( {/* Bubble */}
( {/* Footer: timestamp, status, read receipts */}
( {/* Reactions */} {message.reactions && message.reactions.length > 0 && (
( ref={ref} type="submit" disabled={disabled || !canSend || isLoading} + data-slot="composer-send-button" className={cn(sendButtonVariants({ variant, canSend }), className)} aria-label={isLoading ? 'Sending message' : 'Send message'} {...props} @@ -420,10 +421,15 @@ const MessageComposer = React.forwardRef< onError={onError} className={cn('w-full', className)} > -
+ {/* Reply preview */} {replyTo && (
0 && (