Skip to content

Commit f5cfccd

Browse files
noisysocksclaude
andcommitted
Stagger bubble fade-in so titles lead content
When transitioning between steps, the top bubble (title/subtitle) now fades in 100ms before the bottom bubble (body content). This sequences the load-in to guide the user's eye and improve comprehension. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d1baba2 commit f5cfccd

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

special-pages/pages/onboarding/app/v4/components/Bubble.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { ProgressIndicator } from './ProgressIndicator';
1515
* @property {boolean} [exiting] - When true, fades out the container via CSS animation
1616
* @property {() => void} [onExitComplete] - Called when the fade-out animation ends
1717
* @property {import('../data/data-types').Progress} [progress] - When provided, renders a progress badge pinned to the bubble's top edge
18+
* @property {number} [fadeInDelay] - Delay in ms before the fade-in animation starts (default 400ms via CSS)
1819
*/
1920

2021
/**
@@ -48,6 +49,7 @@ export function Bubble({
4849
exiting = false,
4950
onExitComplete,
5051
progress,
52+
fadeInDelay,
5153
...props
5254
}) {
5355
const { isReducedMotion } = useEnv();
@@ -142,6 +144,7 @@ export function Bubble({
142144
<div
143145
ref={containerCallback}
144146
class={cn(styles.container, isMounted.current && (exiting ? styles.fadeOut : styles.fadeIn))}
147+
style={fadeInDelay !== undefined ? { '--fade-in-delay': `${fadeInDelay}ms` } : undefined}
145148
onAnimationEnd={complete}
146149
>
147150
<div ref={contentRef} class={styles.content}>

special-pages/pages/onboarding/app/v4/components/Bubble.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
}
3838

3939
.fadeIn {
40-
animation: fade-in 267ms cubic-bezier(0.66, 0, 0.34, 1) 400ms backwards;
40+
animation: fade-in 267ms cubic-bezier(0.66, 0, 0.34, 1) var(--fade-in-delay, 400ms) backwards;
4141
}
4242

4343
/* Clip wrapper for bottom-left tail — overflow creates the tuck/untuck effect */

special-pages/pages/onboarding/app/v4/components/SingleStep.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ export function SingleStep() {
6767
exiting={globalState.exiting}
6868
onExitComplete={topBubble ? undefined : advance}
6969
progress={showProgress && !topBubble ? progress : undefined}
70+
fadeInDelay={topBubble ? 500 : undefined}
7071
>
7172
{bottomBubble?.content}
7273
</Bubble>

0 commit comments

Comments
 (0)