-
Notifications
You must be signed in to change notification settings - Fork 3.7k
improvement(chat): shimmer active subagent and tool labels instead of spinners #5612
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
848b9e8
improvement(chat): shimmer active subagent and tool labels instead of…
waleedlatif1 13e90f2
improvement(chat): address review — focus-visible chevron, single shi…
waleedlatif1 cba6794
improvement(chat): pulse shimmer text under reduced motion so running…
waleedlatif1 ccd0b18
improvement(chat): reset background-clip in reduced-motion shimmer fa…
waleedlatif1 8bb0808
fix(chat): apply reduced-motion shimmer fallback in dark mode too
waleedlatif1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| /** | ||
| * Claude-style text shimmer: the text paints from a gradient with a light band | ||
| * that sweeps across the glyphs via background-clip. This is the single source | ||
| * of truth for the treatment — the ThinkingLoader label composes it. Under | ||
| * reduced motion the sweep is replaced by a gentle opacity pulse in solid ink: | ||
| * the shimmer conveys essential in-progress state, so it needs a vestibular-safe | ||
| * fallback rather than none. Consumers whose resting text is not body ink set | ||
| * `--shimmer-rest` to their resting color. | ||
| */ | ||
| .shimmer { | ||
| background-image: linear-gradient(90deg, #4a4a4a 40%, #b0b0b0 50%, #4a4a4a 60%); | ||
| background-size: 200% 100%; | ||
| -webkit-background-clip: text; | ||
| background-clip: text; | ||
| color: transparent; | ||
| animation: shimmer-sweep 2.2s linear infinite; | ||
| } | ||
|
|
||
| :global(.dark) .shimmer { | ||
| background-image: linear-gradient(90deg, #b9b9b9 40%, #f8f8f8 50%, #b9b9b9 60%); | ||
| } | ||
|
|
||
| @keyframes shimmer-sweep { | ||
| to { | ||
| background-position: 200% 0; | ||
| } | ||
| } | ||
|
waleedlatif1 marked this conversation as resolved.
|
||
|
|
||
| @media (prefers-reduced-motion: reduce) { | ||
| .shimmer, | ||
| :global(.dark) .shimmer { | ||
| background-image: none; | ||
| -webkit-background-clip: initial; | ||
| background-clip: initial; | ||
| color: var(--shimmer-rest, var(--text-body)); | ||
| animation: shimmer-pulse 2.2s ease-in-out infinite; | ||
| } | ||
|
waleedlatif1 marked this conversation as resolved.
waleedlatif1 marked this conversation as resolved.
|
||
| } | ||
|
|
||
| @keyframes shimmer-pulse { | ||
| 50% { | ||
| opacity: 0.55; | ||
| } | ||
|
waleedlatif1 marked this conversation as resolved.
|
||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import { cn } from '@sim/emcn' | ||
| import styles from '@/components/ui/shimmer-text.module.css' | ||
|
|
||
| interface ShimmerTextProps { | ||
| children: React.ReactNode | ||
| className?: string | ||
| } | ||
|
|
||
| /** | ||
| * Sweeping-highlight shimmer over a text phrase — the same treatment as the | ||
| * ThinkingLoader's "Thinking…" label, reusable on any active/streaming row. | ||
| * Size and weight come from the consumer's className; the gradient replaces | ||
| * the text color, so color classes are ignored while shimmering. | ||
| */ | ||
| export function ShimmerText({ children, className }: ShimmerTextProps) { | ||
| return <span className={cn(styles.shimmer, className)}>{children}</span> | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.