Repository navigation
fix(agents-ui): respect reduced motion in AgentChatIndicator and popup trigger - #1527
bganderson95 wants to merge 1 commit into
Conversation
|
@bganderson95 is attempting to deploy a commit to the LiveKit Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Thanks @bganderson95 for the contribution, we've been meaning to button this up. |
Added screenshots to the description, thanks for taking a look! |
|
@thomasyuill-livekit a couple of updates since adding the screenshots:
One thing I left alone on purpose: without motion, thinking and listening look the same on the bar and grid, because speed is the only difference today. That felt like your design call. More detail in the description. |
|
@bganderson95 we recently merged the approach to I think there are still somethings missing that are addressed in your PR, like the Do you mind rebasing on Thank you for your contributions |
8b5c4ea to
a2e5d0a
Compare
@thomasyuill-livekit Thanks! Rebased on main and slimmed this down to the two pieces #1528 didn't cover. AgentChatIndicator now uses useAgentMotion and takes the same motion prop as the visualizers: with reduced motion on it drops the scale pulse and keeps a slow, shallow fade (still holds a steady dot). The popup trigger's connecting ring stops spinning, same as the Radial. Both also ship the use-agent-motion hook in the registry. |
@bganderson95 thanks! |
@thomasyuill-livekit Done, the description is updated to match the new scope. |
Issue
Follow-up to #1528. That PR covered the audio visualizers, but
AgentChatIndicatorstill pulses forever and the popup trigger's connecting ring still spins withprefers-reduced-motionon. This rebases on main and moves both ontouseAgentMotion, so they follow the same setting (and<MotionConfig reducedMotion="always">) as the visualizers.Screenshots
Videos are clearer than stills here, since the difference is in how things move.
Default:
indicators-no-preference.mp4
prefers-reduced-motion: reduce:indicators-reduce.mp4
Overview
AgentChatIndicatortakes the samemotionprop as the visualizers.fullis unchanged.calm, which is whatautouses under reduced motion, drops the scale pulse and keeps a slow, shallow opacity fade frompulseForMotion. The dot still reads as "working" without moving.stillholds a steady dot.Popup trigger: the connecting ring stops spinning unless motion is
full, the same way the Radial's thinking spin stops. The conic gradient still reads as in-progress when it's static. The trigger doesn't take amotionprop because it's internal to the block, so it usesauto.Summary of changes
agent-chat-indicator.tsxmotionprop.calmandstillswap the pulse forpulseForMotionopacity only.trigger.tsx(agent-popup-01)useAgentMotion()isfull.registry.jsonuse-agent-motion.tswithagent-chat-indicatorandagent-popup-01, same as the visualizers.agent-chat-indicator.test.tsx,trigger.test.tsxstillsettles on a steady dot with no transform; the ring doesn't spin under<MotionConfig reducedMotion="always">..changeset/patchchangeset for@livekit/agents-ui.Testing
pnpm --filter @livekit/agents-ui test: 377 tests pass.motion="still": the dot sits at 0.75.