fix(web): restore the running tool label shine (#9777)
This commit is contained in:
1 parent
24aef0e6c1
commit
935917f50a
2 files changed
+35
-1
No files matched your search
@@ -1918,11 +1918,13 @@ function LiveActivityRow({
|
||||
iconName,
|
||||
toolIcon,
|
||||
failed = false,
|
||||
active = false,
|
||||
}: {
|
||||
label: string;
|
||||
iconName?: WorkEntryIconName;
|
||||
toolIcon?: ToolActivityIcon | undefined;
|
||||
failed?: boolean;
|
||||
active?: boolean;
|
||||
}) {
|
||||
return (
|
||||
<div className="min-h-6 w-fit max-w-full min-w-0 overflow-hidden rounded-md text-sm leading-relaxed">
|
||||
@@ -1932,6 +1934,7 @@ function LiveActivityRow({
|
||||
toolIcon={toolIcon}
|
||||
failed={failed}
|
||||
announceFailure={failed}
|
||||
active={active}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
@@ -1943,12 +1946,14 @@ function LiveActivityContent({
|
||||
toolIcon,
|
||||
failed = false,
|
||||
announceFailure = false,
|
||||
active = false,
|
||||
}: {
|
||||
label: string;
|
||||
iconName: WorkEntryIconName | undefined;
|
||||
toolIcon?: ToolActivityIcon | undefined;
|
||||
failed?: boolean;
|
||||
announceFailure?: boolean;
|
||||
active?: boolean;
|
||||
}) {
|
||||
const showTrailingFailureMark =
|
||||
failed && iconName !== undefined && !toolIconAcceptsTint(iconName, toolIcon);
|
||||
@@ -1978,7 +1983,7 @@ function LiveActivityContent({
|
||||
/>
|
||||
</span>
|
||||
) : null}
|
||||
<span className="min-w-0 flex-1 truncate">{label}</span>
|
||||
<span className={cn("min-w-0 flex-1 truncate", active && "live-tool-shine")}>{label}</span>
|
||||
{showTrailingFailureMark ? (
|
||||
<XIcon aria-hidden className={cn("size-3 shrink-0", failedToolIconClassName)} />
|
||||
) : null}
|
||||
@@ -2004,6 +2009,7 @@ function LiveWorkEntryTimelineRow({ row }: { row: Extract<TimelineRow, { kind: "
|
||||
iconName={workEntryIconName(row.entry)}
|
||||
toolIcon={row.entry.toolIcon ?? row.entry.toolSource?.icon}
|
||||
failed={failed}
|
||||
active={row.active}
|
||||
/>
|
||||
</button>
|
||||
);
|
||||
|
||||
@@ -425,6 +425,34 @@ 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;
|
||||
}
|
||||
}
|
||||
|
||||
@property --assistant-citation-highlight-opacity {
|
||||
syntax: "<number>";
|
||||
inherits: true;
|
||||
|
||||
Reference in new issue
Block a user