mirror of
https://github.com/pupperpowell/bibdle.git
synced 2026-06-25 08:45:22 -04:00
feat: improve guesses collapse timing, win screen CTA, and progress page polish
- GuessesTable now accepts a `minimized` prop instead of deriving collapse from `isWon`, giving the parent control over timing - Delay collapsing guesses grid until win animations complete (1800ms), skipped for already-completed puzzles - Replace plain progress link on win screen with a styled green button matching other CTAs - Progress page: remove redundant subtitle and nav button from header, add book status legend, add axis labels to guess history chart Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+19
-1
@@ -53,6 +53,7 @@
|
||||
let statsData = $state<StatsData | null>(null);
|
||||
let streak = $state(0);
|
||||
let streakPercentile = $state<number | null>(null);
|
||||
let guessesMinimized = $state(false);
|
||||
|
||||
const persistence = createGamePersistence(
|
||||
() => dailyVerse.date,
|
||||
@@ -204,6 +205,23 @@
|
||||
}
|
||||
});
|
||||
|
||||
// Delay collapsing the guesses grid until animations complete (mirrors showWinScreen delay)
|
||||
$effect(() => {
|
||||
if (!isWon || persistence.guesses.length <= 3) {
|
||||
guessesMinimized = false;
|
||||
return;
|
||||
}
|
||||
if (persistence.isWinAlreadyTracked()) {
|
||||
guessesMinimized = true;
|
||||
} else {
|
||||
const animationDelay = 1800;
|
||||
const timeoutId = setTimeout(() => {
|
||||
guessesMinimized = true;
|
||||
}, animationDelay);
|
||||
return () => clearTimeout(timeoutId);
|
||||
}
|
||||
});
|
||||
|
||||
// Track win analytics
|
||||
$effect(() => {
|
||||
if (!browser || !isWon) return;
|
||||
@@ -333,7 +351,7 @@
|
||||
<GuessesTable
|
||||
guesses={persistence.guesses}
|
||||
{correctBookId}
|
||||
{isWon}
|
||||
minimized={guessesMinimized}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user