Skip to content

Commit 131f4b0

Browse files
noisysocksclaude
andcommitted
Stagger table fade-in after title in makeDefaultSingle step
The comparison table and actions now fade in 100ms after the title, configurable via the bubbleFadeInDelay URL param. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e16f0be commit 131f4b0

File tree

2 files changed

+39
-9
lines changed

2 files changed

+39
-9
lines changed

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

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ import { useFlip } from '../hooks/useFlip';
1313
import cn from 'classnames';
1414
import styles from './MakeDefaultContent.module.css';
1515

16+
/** @type {string|null} */
17+
const bubbleFadeInDelayOverride = new URLSearchParams(window.location.search).get('bubbleFadeInDelay');
18+
1619
/**
1720
* Top bubble content for the makeDefaultSingle step.
1821
* Shows title (changes after user makes default), comparison table, and Skip/Make Default buttons.
@@ -78,6 +81,11 @@ export function MakeDefaultContent({ advance, updateSystemValue }) {
7881
})();
7982
};
8083

84+
const defaultBubbleDelay = 400;
85+
const defaultOffset = 100;
86+
const parsedOffset = bubbleFadeInDelayOverride ? Number.parseInt(bubbleFadeInDelayOverride, 10) : defaultOffset;
87+
const staggerDelay = defaultBubbleDelay + (Number.isNaN(parsedOffset) ? defaultOffset : parsedOffset);
88+
8189
return (
8290
<Container class={styles.root}>
8391
<div class={styles.titleContainer}>
@@ -95,17 +103,19 @@ export function MakeDefaultContent({ advance, updateSystemValue }) {
95103
/>
96104
</div>
97105

98-
<ComparisonTable />
106+
<div class={styles.content} style={{ '--stagger-delay': `${staggerDelay}ms` }}>
107+
<ComparisonTable />
99108

100-
<div class={styles.actions}>
101-
{skipButtonMounted && (
102-
<Button buttonRef={skipButtonRef} class={styles.skipButton} variant="secondary" onClick={advance}>
103-
{t('skipButton')}
109+
<div class={styles.actions}>
110+
{skipButtonMounted && (
111+
<Button buttonRef={skipButtonRef} class={styles.skipButton} variant="secondary" onClick={advance}>
112+
{t('skipButton')}
113+
</Button>
114+
)}
115+
<Button buttonRef={primaryButtonRef} disabled={isPending} onClick={showSkipButton ? enableDefaultBrowser : advance}>
116+
{showSkipButton ? t('makeDefaultButton') : t('nextButton')}
104117
</Button>
105-
)}
106-
<Button buttonRef={primaryButtonRef} disabled={isPending} onClick={showSkipButton ? enableDefaultBrowser : advance}>
107-
{showSkipButton ? t('makeDefaultButton') : t('nextButton')}
108-
</Button>
118+
</div>
109119
</div>
110120
</Container>
111121
);

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@
2323
}
2424
}
2525

26+
.content {
27+
display: flex;
28+
flex-direction: column;
29+
align-items: center;
30+
align-self: stretch;
31+
gap: var(--sp-8); /* 32px — match Container gap */
32+
animation: stagger-fade-in 267ms cubic-bezier(0.66, 0, 0.34, 1) var(--stagger-delay, 500ms) backwards;
33+
}
34+
2635
.actions {
2736
position: relative;
2837
display: flex;
@@ -39,3 +48,14 @@
3948
.skipButton {
4049
flex: 1;
4150
}
51+
52+
@keyframes stagger-fade-in {
53+
from { opacity: 0; }
54+
to { opacity: 1; }
55+
}
56+
57+
@media (prefers-reduced-motion: reduce) {
58+
.content {
59+
animation: none;
60+
}
61+
}

0 commit comments

Comments
 (0)