Skip to content

fix(web): smooth composer folding during scroll - #1411

Merged
nixuuu merged 1 commit into
devfrom
fix/smooth-composer-scroll-transition
Nov 28, 2026
Merged

nixuuu merged 1 commit into
devfrom
fix/smooth-composer-scroll-transition

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 28, 2026

Copy link
Copy Markdown
Member

Slow scrolling let the toolbar drift below the composer and made the shortcut hint add a whole line when reopening. A large wheel delta could switch the composer from 150 to 52 px in one frame.

The toolbar now stays aligned with the primary action, and the shortcut hint folds with the editor. The fold tracks small scroll deltas and limits how far a large delta can move it per frame. Reversing a gesture continues from the current geometry. Pausing completes the nearer endpoint and scrolling back resumes from the distance where the composer folded.

Fixes: #756

Verification

  • Exercised the thread page against a local gateway and scripted worker in Chromium at 1200 and 390 px. Checked slow scrolling, a pause inside the end zone, large wheel deltas, rapid reversals and Jump to latest. The toolbar stayed within the composer and the feed reserve stayed constant.
  • Checked that a multiline draft survives folding and expands on focus. With reduced motion, every sampled frame showed one of the two endpoint heights.
  • Web typecheck, targeted lint, formatting and diff checks passed locally. Repository-wide verification runs in CI.

@nixuuu
nixuuu enabled auto-merge (squash) November 28, 2026 09:12
@nixuuu
nixuuu merged commit 1269e7c into dev Nov 28, 2026
24 checks passed
@nixuuu
nixuuu deleted the fix/smooth-composer-scroll-transition branch November 28, 2026 09:18
nixuuu added a commit that referenced this pull request Nov 28, 2026
The thread composer previously travelled at a fixed speed and stopped
abruptly when it reached the scroll position. Toolbar labels stayed
visible while their row was being clipped.

The composer now eases into the target using the shared surface motion
curve. The duration scales with the distance left to travel, so small
scroll deltas track the gesture. Reversing starts at the last painted
height. The toolbar, metadata and shortcut hint dissolve in place with a
2 px blur and sharpen as the composer reopens. The editor and primary
action stay sharp throughout.

Fixes: #1411

## Verification

- Exercised slow scrolling, a pause inside the end zone, full wheel
flicks and rapid reversals on the actual thread page in Chromium at 1200
and 390 px. Sampled heights decelerated towards the endpoint. The
toolbar stayed within the surface and the feed reserve stayed constant.
- At half height, the toolbar was at 3% opacity and 1.94 px blur in both
viewport sizes. Reduced motion switched directly between endpoint
heights without blur.
- Verified that scrolling, focusing and jumping to latest preserve a
multiline draft. Local web typecheck, targeted lint, formatting and diff
checks passed. Full repository checks run in CI.
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