fix(web): bring back the live shimmer on work log rows (#16372)
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
1 parent
0ecb78ed0d
commit
8f75697b9e
2 files changed
+39
-3
No files matched your search
@@ -3554,7 +3554,7 @@ function LiveActivityRow({
|
||||
const showShimmer = animated && shimmer;
|
||||
return (
|
||||
<div
|
||||
ref={showShimmer ? observeVisibleAnimation : undefined}
|
||||
ref={animated ? observeVisibleAnimation : undefined}
|
||||
className="relative min-h-6 w-fit max-w-full min-w-0 overflow-hidden rounded-md text-sm leading-relaxed"
|
||||
>
|
||||
<LiveActivityContent
|
||||
@@ -3620,7 +3620,13 @@ function LiveActivityContent({
|
||||
) : null
|
||||
}
|
||||
label={
|
||||
<span className={cn("block truncate", (highlighted || active) && "text-foreground")}>
|
||||
<span
|
||||
className={cn(
|
||||
"block truncate",
|
||||
highlighted && "text-foreground",
|
||||
active && "live-tool-shine",
|
||||
)}
|
||||
>
|
||||
{label}
|
||||
</span>
|
||||
}
|
||||
@@ -3756,6 +3762,7 @@ function WorkGroupHeader(props: {
|
||||
}) {
|
||||
return (
|
||||
<WorkLogButton
|
||||
ref={props.active && !props.failed ? observeVisibleAnimation : undefined}
|
||||
aria-label={props.failed ? `${props.label}, tool call failed` : props.label}
|
||||
aria-expanded={props.expanded}
|
||||
onClick={props.onToggle}
|
||||
@@ -3768,7 +3775,7 @@ function WorkGroupHeader(props: {
|
||||
/>
|
||||
}
|
||||
label={
|
||||
<span className={cn("block truncate", props.active && !props.failed && "text-foreground")}>
|
||||
<span className={cn("block truncate", props.active && !props.failed && "live-tool-shine")}>
|
||||
{props.label}
|
||||
</span>
|
||||
}
|
||||
|
||||
@@ -499,6 +499,35 @@ html[data-mobile-composer-route-transition="true"]::view-transition-old(t3-mobil
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes live-tool-shine {
|
||||
from {
|
||||
background-position:
|
||||
-4.5rem 0,
|
||||
0 0;
|
||||
}
|
||||
to {
|
||||
background-position:
|
||||
calc(100% + 4.5rem) 0,
|
||||
0 0;
|
||||
}
|
||||
}
|
||||
|
||||
@utility live-tool-shine {
|
||||
@media (prefers-reduced-motion: no-preference) and (forced-colors: none) {
|
||||
color: transparent;
|
||||
background-image:
|
||||
linear-gradient(to right, transparent, var(--contrast-foreground), transparent),
|
||||
linear-gradient(var(--contrast-secondary-label), var(--contrast-secondary-label));
|
||||
background-size:
|
||||
4.5rem 100%,
|
||||
100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-clip: text;
|
||||
animation: live-tool-shine 2.2s steps(30) infinite;
|
||||
animation-play-state: var(--visible-animation-state, paused);
|
||||
}
|
||||
}
|
||||
|
||||
@utility visible-animate-spin {
|
||||
animation: var(--animate-spin);
|
||||
animation-play-state: var(--visible-animation-state, paused);
|
||||
|
||||
Reference in new issue
Block a user