fix(notifications): stop follow-back button layout shift and gap#6334
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The "Follow back" action on "is now following you" rows caused a layout shift while scrolling and sat under an oversized gap: - Reserve the button's height up front (flex min-h-8 items-center) so the row keeps a constant height instead of growing when the lazily-mounted button pops in as the row scrolls into view. - Drop the redundant stacked margins (mt-1 wrapper + mt-3 button) so the action sits tight under the headline. - Render it as a plain text link (!px-0, underline on hover) aligned to the row's content edge, replacing the padded Tertiary button whose hover fill overhung the label. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
tsahimatsliah
force-pushed
the
claude/follow-back-layout-shift-81b9cd
branch
from
July 17, 2026 14:14
b92132d to
18d2ba2
Compare
capJavert
approved these changes
Jul 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Fixes the "Follow back" row in the Activity/notifications feed, which caused layout shift on scroll and left a large gap under the headline.
{inView && ...}inside a zero-height container, so each row's follow-status query fired only once the row entered view — then theh-8button popped in, grew the row, and jerked the rows below it. Now the button's height is reserved up front (flex min-h-8 items-center, matchingButtonSize.Small=h-8), so the row height stays constant whether or not the button has mounted/resolved. The lazyinViewquery is preserved.mt-1on the wrapper span +mt-3on the button) so the button sits tight under the headline, relying on the parentflex-col gap-1for spacing.Manual Testing
The notifications page is auth-gated, so worth a visual sanity check on a real feed. The reserved-height value matches the button's actual height exactly, so there should be no residual shift.
Preview domain
https://claude-follow-back-layout-shift.preview.app.daily.dev