Skip to content

Commit 80d4e95

Browse files
author
Jose Cruz
committed
dashboard: quote slides down into place, no reserved empty band
User pointed out empty space sitting above the quote while the greeting was typing. That was the reserved space for the quote paragraph (opacity 0 but still occupying height). Wrapped the quote in an aria-hidden container whose max-height is 0 while the greeting is still typing and expands to 120px once greetingDone. Combined with a delayed opacity transition (0.55s ease, 0.15s delay), the quote now drops down visibly after the greeting finishes — no empty band above it during typing. Also bumped the quote's top margin from 8px to 22px so there's a clear gap below the greeting once both are visible.
1 parent 6663de8 commit 80d4e95

1 file changed

Lines changed: 26 additions & 12 deletions

File tree

frontend/src/components/screens/Dashboard.tsx

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -582,22 +582,36 @@ export function Dashboard() {
582582
>
583583
<Typewriter text={greetingText} onDone={() => setGreetingDone(true)} />
584584
</h1>
585+
{/* Quote row stays collapsed (max-height: 0) while the greeting
586+
is still typing — no reserved empty band above where the
587+
quote will land. When the greeting finishes, the row expands
588+
and the text fades in, so the quote drops down into place
589+
below the greeting. */}
585590
{quote && (
586-
<p
587-
className="body-serif"
591+
<div
592+
aria-hidden={!greetingDone}
588593
style={{
589-
margin: "8px auto 0",
590-
maxWidth: 640,
591-
fontSize: 14,
592-
fontStyle: "italic",
593-
color: "var(--text-dim)",
594-
lineHeight: 1.55,
595-
opacity: greetingDone ? 1 : 0,
596-
transition: "opacity 0.7s var(--ease)",
594+
maxHeight: greetingDone ? 120 : 0,
595+
overflow: "hidden",
596+
transition: "max-height 0.7s var(--ease)",
597597
}}
598598
>
599-
"{quote}"
600-
</p>
599+
<p
600+
className="body-serif"
601+
style={{
602+
margin: "22px auto 0",
603+
maxWidth: 640,
604+
fontSize: 14,
605+
fontStyle: "italic",
606+
color: "var(--text-dim)",
607+
lineHeight: 1.55,
608+
opacity: greetingDone ? 1 : 0,
609+
transition: "opacity 0.55s var(--ease) 0.15s",
610+
}}
611+
>
612+
"{quote}"
613+
</p>
614+
</div>
601615
)}
602616
</div>
603617

0 commit comments

Comments
 (0)