Skip to content

Commit 13e90f2

Browse files
committed
improvement(chat): address review — focus-visible chevron, single shimmer source, reduced-motion rest color
1 parent 848b9e8 commit 13e90f2

4 files changed

Lines changed: 14 additions & 27 deletions

File tree

apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/agent-group/agent-group.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export function AgentGroup({
9898
)}
9999
<ChevronDown
100100
className={cn(
101-
'h-[7px] w-[9px] text-[var(--text-icon)] opacity-0 transition-[transform,opacity] duration-150 group-hover/agent:opacity-100',
101+
'h-[7px] w-[9px] text-[var(--text-icon)] opacity-0 transition-[transform,opacity] duration-150 group-hover/agent:opacity-100 group-focus-visible/agent:opacity-100',
102102
!expanded && '-rotate-90'
103103
)}
104104
/>

apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/agent-group/tool-call-item.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ export function ToolCallItem({ toolName, displayTitle, status, streamingArgs }:
140140
<StatusIcon status={status} toolName={toolName} />
141141
</div>
142142
{isExecuting ? (
143-
<ShimmerText className='text-[13px]'>{title}</ShimmerText>
143+
<ShimmerText className='text-[13px] [--shimmer-rest:var(--text-secondary)]'>
144+
{title}
145+
</ShimmerText>
144146
) : (
145147
<span className='text-[13px] text-[var(--text-secondary)]'>{title}</span>
146148
)}

apps/sim/components/ui/shimmer-text.module.css

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
/**
22
* Claude-style text shimmer: the text paints from a gradient with a light band
3-
* that sweeps across the glyphs via background-clip. Gradient stops and timing
4-
* match the ThinkingLoader label so every "working" phrase in the app shares
5-
* one treatment.
3+
* that sweeps across the glyphs via background-clip. This is the single source
4+
* of truth for the treatment — the ThinkingLoader label composes it. Under
5+
* reduced motion the text settles to a solid ink; consumers whose resting text
6+
* is not body ink set `--shimmer-rest` to their resting color.
67
*/
78
.shimmer {
89
background-image: linear-gradient(90deg, #4a4a4a 40%, #b0b0b0 50%, #4a4a4a 60%);
@@ -27,6 +28,6 @@
2728
.shimmer {
2829
animation: none;
2930
background-image: none;
30-
color: var(--text-body);
31+
color: var(--shimmer-rest, var(--text-body));
3132
}
3233
}

apps/sim/components/ui/thinking-loader.module.css

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -92,23 +92,14 @@
9292
white-space: nowrap;
9393
}
9494

95-
/* Claude-style shimmer: the text paints from a gradient with a light band
96-
that sweeps across the glyphs via background-clip. */
95+
/* The sweeping-band treatment itself (gradient, timing, dark mode, reduced
96+
motion) is owned by the shared shimmer-text module; this class only adds the
97+
loader-scaled font sizing. Canonical normal weight per emcn rules: body text
98+
is 400, never medium. */
9799
.label {
100+
composes: shimmer from "./shimmer-text.module.css";
98101
font-size: var(--tl-label-size, 14px);
99-
/* Canonical normal weight (per emcn rules: body text is 400, never medium).
100-
Reads light and clean under the shimmer gradient on light surfaces. */
101102
font-weight: 400;
102-
background-image: linear-gradient(90deg, #4a4a4a 40%, #b0b0b0 50%, #4a4a4a 60%);
103-
background-size: 200% 100%;
104-
-webkit-background-clip: text;
105-
background-clip: text;
106-
color: transparent;
107-
animation: label-shimmer 2.2s linear infinite;
108-
}
109-
110-
:global(.dark) .label {
111-
background-image: linear-gradient(90deg, #b9b9b9 40%, #f8f8f8 50%, #b9b9b9 60%);
112103
}
113104

114105
/* Static label (shimmer off): the phrase in solid body ink, no gradient sweep. */
@@ -118,12 +109,6 @@
118109
color: var(--text-body);
119110
}
120111

121-
@keyframes label-shimmer {
122-
to {
123-
background-position: 200% 0;
124-
}
125-
}
126-
127112
/* Phrase crossfade — the incoming phrase rises and fades in while the outgoing
128113
one rises and fades out (stacked over it), so phrases rotate smoothly. */
129114
.labelStack {
@@ -366,7 +351,6 @@
366351

367352
@media (prefers-reduced-motion: reduce) {
368353
.frame *,
369-
.label,
370354
.labelIn {
371355
animation: none;
372356
}

0 commit comments

Comments
 (0)