mirror of
https://github.com/block/buzz.git
synced 2026-10-30 05:51:46 +00:00
fix(desktop): anchor activity message hover cues
Co-authored-by: Rizz <302abe414ca6e3134763d2539bfcf145aea2a63fe5f8455204ed602fd40cf381@buzz.block.builderlab.xyz> Signed-off-by: Rizz <302abe414ca6e3134763d2539bfcf145aea2a63fe5f8455204ed602fd40cf381@buzz.block.builderlab.xyz>
This commit is contained in:
@@ -151,6 +151,7 @@ export function CompactMessageSummary({
|
||||
? "text-xs leading-4"
|
||||
: "text-sm leading-relaxed",
|
||||
shouldClampBubble && "relative max-h-36 overflow-hidden",
|
||||
isConversation && "relative",
|
||||
canOpenMessage &&
|
||||
"group/bubble cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
||||
isCompactPreview
|
||||
|
||||
@@ -64,7 +64,20 @@ test("conversation renders the prompt as a filled right-aligned bubble with an a
|
||||
// soft tint, borderless surface, and `px-4 py-2` spacing.
|
||||
const bubble = row.querySelector(".rounded-2xl");
|
||||
assert.ok(bubble, "the prompt should match Buzz's chat-bubble radius");
|
||||
assert.match(bubble.className, /relative/);
|
||||
assert.match(bubble.className, /bg-muted\/60/);
|
||||
const openInChatCue = bubble.querySelector('[aria-hidden="true"]');
|
||||
assert.ok(openInChatCue, "linked prompts should retain the hover cue");
|
||||
assert.match(
|
||||
openInChatCue.className,
|
||||
/top-1\.5/,
|
||||
"the sender hover cue uses its native inset once the bubble is its containing block",
|
||||
);
|
||||
assert.doesNotMatch(
|
||||
openInChatCue.className,
|
||||
/top-3/,
|
||||
"the cue should not be pushed into the prompt text to compensate for the old containing-block bug",
|
||||
);
|
||||
assert.doesNotMatch(
|
||||
bubble.className,
|
||||
/(?<!\/)bg-muted(?!\/)/,
|
||||
|
||||
@@ -398,6 +398,7 @@ test("the same relay post outside a work block keeps its message bubble", async
|
||||
bubble,
|
||||
"outside a block a posted message is a destination the reader can open — the bubble stays",
|
||||
);
|
||||
assert.match(bubble.className, /relative/);
|
||||
assert.doesNotMatch(
|
||||
bubble.className,
|
||||
/max-h-36/,
|
||||
|
||||
@@ -185,7 +185,7 @@ export function UserMessageBubble({
|
||||
// `leading-normal` overrides the `leading-relaxed` base, as berd
|
||||
// does, so the prompt sits tighter than the agent's prose.
|
||||
isConversation &&
|
||||
"rounded-2xl border-0 bg-muted/60 px-4 py-2 leading-normal",
|
||||
"relative rounded-2xl border-0 bg-muted/60 px-4 py-2 leading-normal",
|
||||
bubbleClassName,
|
||||
)}
|
||||
ref={bubbleRef}
|
||||
@@ -206,11 +206,7 @@ export function UserMessageBubble({
|
||||
{hasBubbleOverflow ? (
|
||||
<span className="pointer-events-none absolute inset-x-0 bottom-0 h-8 rounded-b-2xl bg-linear-to-b from-transparent to-background" />
|
||||
) : null}
|
||||
{messageLink ? (
|
||||
<MessageLinkHoverCue
|
||||
className={isConversation ? "top-3" : undefined}
|
||||
/>
|
||||
) : null}
|
||||
{messageLink ? <MessageLinkHoverCue /> : null}
|
||||
</div>
|
||||
{isConversation && footer ? (
|
||||
// Timestamp/context row is chrome, not content: focus mode keeps it
|
||||
|
||||
Reference in New Issue
Block a user