SIGN IN SIGN UP

slider: Add a hover ring around the thumb (#2757)

## Summary

Adds the translucent ring shadcn's slider draws around a hovered thumb,
with the grow/collapse animation.

- The ring appears while the pointer is over a thumb: 3px wide,
`theme.ring` at 50% opacity, animating out from the thumb's edge over
150ms (`ease_out_cubic`) and collapsing back on leave.
- Geometry follows the project's existing focus ring — absolutely
positioned, negative inset, border only — so it costs no layout space
and does not tint the thumb.
- Width and opacity are interpolated through `gpui_base::transition`, so
reduced motion is handled by the base transition.
- The ring stays up while the thumb is dragged. Hover alone drops out
for a frame on every move (the thumb travels under the pointer) and at
the track ends, which would make it flicker; the press is read in the
capture phase because the base thumb stops propagation on mouse down to
own the drag.
- Single and range sliders track their thumbs independently; a disabled
slider installs no listeners and draws no ring.

No public API change.

## Test plan

- `cargo clippy -p gpui-component --all-targets` and `rustfmt --check`
clean; `cargo test -p gpui-component --lib slider` passes.
- Verified the state chain with temporary instrumentation and a
simulated pointer: hover raises progress 0 → 1 over the duration and it
falls back on leave; while pressed it holds at 1 through moves and falls
back on release. The instrumentation and its scratch test are not part
of this change (per the repo's rule against tests that only assert
presentation).
- Checked the rendered ring in a real window: flush against the thumb
edge, correct in both single and range sliders.

## AI-generated code

The implementation in `crates/ui/src/slider.rs` was written with Claude
Code and reviewed by hand.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
J
Jason Lee committed
1c4e681315052fc38a881a3b5b6f9df12934ba3c
Parent: aff8f09
Committed by GitHub <noreply@github.com> on 8/18/2026, 8:13:53 AM