Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

style(channels/mobile): fix bg-surface for new channel mobile (#6056)

Seamusa4424ea145b1
diff --git a/apps/web/src/features/channel/Message/MessageFlag.tsx b/apps/web/src/features/channel/Message/MessageFlag.tsx
index bce67447ab..f807a58851 100644
--- a/apps/web/src/features/channel/Message/MessageFlag.tsx
+++ b/apps/web/src/features/channel/Message/MessageFlag.tsx
@@ -8,37 +8,36 @@ type MessageFlagProps = {
};
/**
- * Horizontal list divider with a centered label pill — used for day
- * boundaries and the unread marker. The hairline's left end lines up with
- * the thread rail column.
+ * Horizontal list divider with a centered label — used for day boundaries
+ * and the unread marker.
*/
export function MessageFlag(props: MessageFlagProps) {
return (
<div
- class={cn(
- 'relative flex h-14 mobile:h-16 items-center justify-center px-2',
- props.class
- )}
+ class={cn('flex h-14 mobile:h-16 items-center gap-2.5 px-2', props.class)}
>
- {/* One hairline at an integer y-offset (flex-centering a 1px line in a
- 56px row lands on a half pixel and renders soft/fat). Border-drawn
- like the rail so both strokes share one paint path. The label's
- background masks its middle. */}
- <div
+ <span
+ aria-hidden="true"
class={cn(
- 'absolute top-7 mobile:top-8 h-0 border-t inset-x-0',
- props.highlight ? 'border-accent/40' : 'border-thread-rail'
+ 'h-px grow',
+ props.highlight ? 'bg-accent/40' : 'bg-thread-rail'
)}
/>
- {/* Plain label; its surface background carves the gap in the line. */}
<span
class={cn(
- 'relative text-xs font-medium px-2.5 bg-surface',
+ 'text-xs font-medium',
props.highlight ? 'text-accent' : 'text-ink-muted'
)}
>
{props.text}
</span>
+ <span
+ aria-hidden="true"
+ class={cn(
+ 'h-px grow',
+ props.highlight ? 'bg-accent/40' : 'bg-thread-rail'
+ )}
+ />
</div>
);
}
diff --git a/apps/web/src/features/channel/Message/tests/date-divider.test.tsx b/apps/web/src/features/channel/Message/tests/date-divider.test.tsx
index c7de5fc01e..1eee798c43 100644
--- a/apps/web/src/features/channel/Message/tests/date-divider.test.tsx
+++ b/apps/web/src/features/channel/Message/tests/date-divider.test.tsx
@@ -101,9 +101,14 @@ describe('NewDivider', () => {
const label = screen.getByText('Today - New');
expect(label.classList.contains('text-accent')).toBe(true);
+ expect(label.previousElementSibling?.classList.contains('h-px')).toBe(true);
expect(
- label.previousElementSibling?.classList.contains('border-accent/40')
+ label.previousElementSibling?.classList.contains('bg-accent/40')
).toBe(true);
+ expect(label.nextElementSibling?.classList.contains('h-px')).toBe(true);
+ expect(label.nextElementSibling?.classList.contains('bg-accent/40')).toBe(
+ true
+ );
expect(screen.queryByText('Today')).toBeNull();
});
});
diff --git a/apps/web/src/features/channel/Thread/ThreadCollapsedIndicator.tsx b/apps/web/src/features/channel/Thread/ThreadCollapsedIndicator.tsx
index e1de82755b..33cc85e9d5 100644
--- a/apps/web/src/features/channel/Thread/ThreadCollapsedIndicator.tsx
+++ b/apps/web/src/features/channel/Thread/ThreadCollapsedIndicator.tsx
@@ -33,7 +33,7 @@ export function ThreadCollapsedIndicator(props: ThreadCollapsedIndicatorProps) {
type="button"
title="Expand thread"
class={cn(
- 'flex items-center gap-2 text-xs w-fit h-8 touch:min-h-(--user-icon-width) border bg-surface hover:bg-hover py-1 pr-2 pl-1.5 mb-2 select-none outline-none focus-visible:bg-active rounded-full',
+ 'flex items-center gap-2 text-xs w-fit h-8 touch:min-h-(--user-icon-width) border hover:bg-hover py-1 pr-2 pl-1.5 mb-2 select-none outline-none focus-visible:bg-active rounded-full',
local.hasNewMessages ? 'border-accent/40' : 'border-thread-rail',
local.class
)}
diff --git a/apps/web/src/features/channel/Thread/ThreadReplyButton.tsx b/apps/web/src/features/channel/Thread/ThreadReplyButton.tsx
index d372bfd201..8e3b60b9a1 100644
--- a/apps/web/src/features/channel/Thread/ThreadReplyButton.tsx
+++ b/apps/web/src/features/channel/Thread/ThreadReplyButton.tsx
@@ -14,7 +14,7 @@ export function ThreadReplyButton(props: ThreadReplyButtonProps) {
<button
type="button"
class={cn(
- 'rounded-full icon-plus mb-2 border border-thread-rail bg-surface hover:bg-hover flex flex-row justify-center items-center size-8 touch:min-h-(--user-icon-width) touch:min-w-(--user-icon-width) text-ink-muted hover:text-ink',
+ 'rounded-full icon-plus mb-2 border border-thread-rail hover:bg-hover flex flex-row justify-center items-center size-8 touch:min-h-(--user-icon-width) touch:min-w-(--user-icon-width) text-ink-muted hover:text-ink',
local.class
)}
ref={(el) => {