Skip to content

Motion polish for the new 0.1.5 features - #69

Merged
devin-ai-integration[bot] merged 1 commit into
mainfrom
devin/1791313892-motion-polish
Oct 6, 2026
Merged

devin-ai-integration[bot] merged 1 commit into
mainfrom
devin/1791313892-motion-polish

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

Six abrupt state changes now animate with the app's existing motion vocabulary (ease_out_quint, MOTION_IN_MS/MOTION_OUT_MS/MOTION_HOVER_MS, Presence, hover_bg). Everything honors cx.reduce_motion() by snapping to the end state.

  • Focus-mode chrome: render_tabs now returns an element whose height (34→0) and opacity collapse in the same 280ms with_animation keyed on sidebar_gen as the sidebar slide — previously the strip returned None and vanished in one frame while the sidebar kept sliding.
  • Focus dimming: LiveEditor keeps a DimFade { cur, prev, at }; RunStyle::dim_runs computes a per-line dim_amount (out of prev → out of cur, eased) and lerps each run toward pal.muted, requesting frames until t=1. Lines re-entering the block fade back.
  • Programmatic scroll: Layout gained a glide flag; prepaint steps layout.scroll halfway toward the autoscroll target and repaints until <0.5px — the same pattern as the caret glide. The wheel path still writes scroll_y directly and clears autoscroll, so trackpad scrolling stays 1:1.
  • Tabs: pill/close hovers use hover_bg; new pills fade in via with_animation(("tab-in", id)); closing a tab pushes a ClosingTab ghost (capped at 8) that renders at its old index and fades out over MOTION_OUT_MS while siblings hold position until the fade ends; the unsaved dot fades via Presence. (Said ghost approach means closed-tab fade-out IS mounted — no instant removal needed.)
  • Text width: set_max_col seeds col_anim (from, to, at) (from the current eased value when retargeting mid-flight); prepaint eases max_col and requests frames while running.
  • Theme: apply_theme in spaces_ui.rs captures the old Palette, applies the target via theme::apply, then sets the old global back and spawns a task lerping cx.set_global(theme::lerp(&from,&to,t)) + cx.notify() each ~16ms until done — no render-site edits needed. theme::lerp is a channel-wise u32 lerp (3-channel for rgb, 4-channel for rgba fields) with a unit test.

GUI verification (macOS, release build)

Verified live in the app with 60fps capture; every transition shows multi-frame intermediate states (not one-frame snaps).

Focus mode — sidebar slide + tab-strip collapse together; dim fades on caret moves; typewriter recenter glides:

Focus-mode enter/exit: chrome collapse, dim fade, typewriter glide

Focus mode: dimmed surroundings, no chrome

Tabs — pill fades in on open; closed pill leaves a fading ghost while siblings hold position:

Tab pill fade-in + ghost fade-out

Theme crossfade — palette lerps over ~160ms (mid-fade is visibly mixed):

Light↔dark crossfade

Light Mid-fade Dark
light mid dark

Also verified live: find-next scroll glides with an asymptotic tail while wheel scrolling steps discretely 1:1; Settings → Text width glides the column; the unsaved dot fades in with the dirty state.

Notes for reviewers

  • RunStyle now takes fade_from/fade_t alongside focus; dimmed() was replaced by the eased dim_amount().
  • A plain sidebar click retargets the current tab (open_path); Cmd+click opens a second tab — pre-existing behavior, unrelated to this PR.
  • Reduced-motion snap is code-gated at every site but was not toggled live (macOS accessibility flag doesn't reliably propagate to a running process).

Link to Devin session: https://app.devin.ai/sessions/308b6c12ce7b420588973691e7035d63
Open in Devin Desktop: https://app.devin.ai/desktop/session/308b6c12ce7b420588973691e7035d63?variant=devin
Requested by: @horizzon3507

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

… theme

- Tab strip collapses height + fades in step with the sidebar slide when
  focus mode hides chrome (same 280ms, keyed on sidebar_gen)
- Focus dimming fades lines toward/from muted over MOTION_IN_MS using the
  previous lit block; reduced motion snaps
- Autoscroll (typing, find, typewriter recenter) glides scroll_y toward the
  target like the caret glide; wheel/trackpad stays 1:1
- Tab pills and the close button use hover_bg; new tabs fade in, closed
  tabs fade out via a brief ghost pill, and the unsaved dot fades via
  Presence
- Text width eases the column cap over MOTION_IN_MS
- Light/dark switches crossfade the Palette global via theme::lerp

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration
devin-ai-integration Bot force-pushed the devin/1791313892-motion-polish branch from a899504 to 7fa2ac8 Compare October 6, 2026 20:31
@devin-ai-integration
devin-ai-integration Bot merged commit dd155c1 into main Oct 6, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant