Skip to content

fix(web): float and fade the jump-to-latest button without shrinking the composer - #21

Merged
lbgos merged 1 commit into
mainfrom
t3/jump-button-fade
Nov 26, 2026
Merged

lbgos merged 1 commit into
mainfrom
t3/jump-button-fade

Conversation

@lbgos

@lbgos lbgos commented Nov 26, 2026

Copy link
Copy Markdown
Owner

When scrolling up in a phone chat, the jump-to-latest button popped in instantly and shrank the message field to sit inline beside it.

  • Phone placement. Removed the rules that reduced the composer's width when the button was shown, and floated the jump-to-latest disc just above the composer at its right edge so the field keeps the same width and position in both states.
  • Fade transition. Kept ScrollToEndButton mounted with a data-visible state (and inert / aria-hidden / pointer-events: none while hidden) so it fades in and out over 160ms ease-out, hides with visibility: hidden once settled so nothing repaints continuously, and switches immediately under prefers-reduced-motion: reduce.
  • Wide screens. Preserved the right-gutter placement beside the composer so the button stays outside the field.

Each before/after grid shows before on the left and after on the right, using synthetic data.

Phone, 390x844 — dark (top: at the bottom with button hidden; bottom: scrolled up with button shown)

Phone, dark

Phone, 390x844 — light (top: at the bottom with button hidden; bottom: scrolled up with button shown)

Phone, light

Phone, 390x844 — mid-fade frame (dark and light, captured mid-transition)

Phone, mid-fade

Desktop, 1440x900 — scrolled up (dark and light)

Desktop

…the composer

On narrow screens, the jump-to-latest button sat inline beside the composer and shrunk the message field when scrolled up, and it popped in and out instantly everywhere.

Keep ScrollToEndButton mounted with a visibility attribute so its opacity transitions over 160ms ease-out (hiding with visibility: hidden and pointer-events: none when settled, and no transition under reduced motion). On narrow bot chats, remove the composer width-shrinking rules and float the button just above the composer at the right edge; wide screens keep the gutter placement outside the field.
@lbgos
lbgos deployed to leak-gate November 26, 2026 09:02 — with GitHub Actions Active
@lbgos
lbgos merged commit 06ef231 into main Nov 26, 2026
12 checks passed

This branch was successfully deployed

1 active deployment
leak-gate — c8991433 Deployed Nov 26, 2026 by lbgos via Denylist #48
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