Repository navigation
fix(carousel): keep banner slot from collapsing before the caught-up message - #47769
Conversation
…message Dismissing the last banner removed the carousel immediately, then mounted the caught-up message after the exit animation delay. The slot dropped to zero height and popped back, so content below jumped up, down, then up again. Mount the caught-up message in the same render the last slide leaves so the slot holds its height until the fold.
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
✨ Files requiring CODEOWNER review ✨👨🔧 @MetaMask/core-extension-ux (3 files, +129 -6)
|
Builds ready [e2583da]
⚡ Performance Benchmarks (Total: 🟢 9 pass · 🟡 1 warn · 🔴 3 fail)
Bundle Size Diffs
|
Builds ready [fc3f3aa]
⚡ Performance Benchmarks (Total: 🟢 9 pass · 🟡 2 warn · 🔴 2 fail)
Bundle Size Diffs
|
react-hooks/refs rejects writing the ref during render, which failed lint. Co-authored-by: Cursor <cursoragent@cursor.com>
Builds ready [be91769]
⚡ Performance Benchmarks (Total: 🟢 9 pass · 🟡 2 warn · 🔴 2 fail)
Bundle Size Diffs
|
|
There was a problem hiding this comment.
@cursoragent make a note that we don't usually put tests inside a __tests__ subfolder anymore
There was a problem hiding this comment.





Description
Dismissing the last home banner made the content below jump. The carousel unmounted as soon as the last slide was dismissed, then "You're all caught up!" mounted about 300ms later (after the exit animation delay) and folded away. The banner slot dropped to zero height, popped back, then collapsed again.
The caught-up message now mounts in the same render the last slide leaves, so the slot keeps its height until the fold. Nothing changes for the fold timing or for new slides arriving afterwards.
Changelog
CHANGELOG entry: Fixed content jumping when dismissing the last banner on the home screen
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/CEUX-1454
Manual testing steps
CONTENTFUL_ACCESS_SPACE_IDandCONTENTFUL_ACCESS_TOKEN) and unlock the wallet.Screenshots/Recordings
Before
Not captured.
After
Screen.Recording.2026-11-10.at.9.04.41.AM.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
UI-only carousel empty-state timing with regression tests; no auth, data, or payment paths touched.
Overview
Fixes layout jump when the last home banner is dismissed by mounting the "all caught up" empty state in the same render the final slide disappears, instead of waiting for the carousel exit animation callback.
CarouselWithEmptyStatenow treatslastSlideDismissedlike the fold path and rendersEmptyStateComponentimmediately so the banner slot stays at full height until the fold runs.useTransitionToEmptystoresonEmptyStateCompletein a ref so home-screen re-renders during the hold do not reset the 100ms stabilize → fold sequence.Adds RTL tests in
carousel-wrapper.test.tsxfor never-had-slides, hold/collapse timing, and recovery when slides return.Reviewed by Cursor Bugbot for commit be91769. Bugbot is set up for automated code reviews on this repo. Configure here.