ui: intent-gated fold, measured height caps, the Problem eyebrow, fold fade
Owner round (2026-10-05), Slice D — the dock mechanics: - INTENT-GATED FOLD: a ResizeObserver on the scroller's content stamps the existing 400ms mute whenever the transcript GROWS — growth frames (a live turn streaming under stick-to-bottom's chase) can never fold the dock; and a fold now needs the distance AND stick-to-bottom's isAtBottom agreeing the learner left. Fixes the generation churn (dock disappearing and reappearing while the agent works). Shrinks stamp nothing (the fold's own morph must not self-mute re-expand). - MEASURED HEIGHT CAPS: the question (55dvh) and problem (40vh) areas now cap at the available column (scroller clientHeight − 2rem, re-measured on resize) via --dock-max-h — questions stretch to the top bar with sensible padding and scroll internally only when genuinely huge. - The practice dock's statement area carries the 'Problem' eyebrow — the quiz cards' label row, mirrored (dock and transcript card read identically). - The fold's CONTENT fade: a 160ms WAAPI fade/rise on the bar↔form toggle — no remount, so the question form's state survives; the shell height morph was already animated.
This commit is contained in:
@@ -510,8 +510,10 @@ function QuestionDockForm({
|
||||
|
||||
return (
|
||||
<div ref={rootRef} data-testid="question-dock">
|
||||
{/* Question area — scrolls internally if very tall; the bottom row stays put. */}
|
||||
<div className="max-h-[55dvh] overflow-y-auto px-4 pt-3">
|
||||
{/* Question area — scrolls internally if very tall; the bottom row stays put.
|
||||
Capped by the measured column (--dock-max-h; the old fixed 55dvh cut
|
||||
long questions short — owner round, 2026-10-05). */}
|
||||
<div className="max-h-[var(--dock-max-h,55dvh)] overflow-y-auto px-4 pt-3">
|
||||
<div className="mb-1 text-xs font-medium uppercase tracking-wide text-muted-foreground">
|
||||
{kind === "quiz" ? (qd.questionType === "predict" ? "Prediction" : "Quiz") : kind === "explain" ? "Explain" : "Question"}
|
||||
{qd.mode === "multi-select" && " · select all that apply"}
|
||||
|
||||
Reference in New Issue
Block a user