Progressive disclosure in search dropdown based on guess count

Shows book names only (A-Z) for the first 3 guesses, reveals Old/New
Testament groupings after 3 guesses, and full section-level groupings
in canonical Bible order after 9 guesses. Adds a status banner above
the search bar to inform players when new structure becomes visible.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
George Powell
2026-02-22 23:19:00 -05:00
parent 1de436534c
commit ba45cbdc37
2 changed files with 248 additions and 26 deletions

View File

@@ -25,6 +25,7 @@
type StatsData,
} from "$lib/utils/stats-client";
import { createGamePersistence } from "$lib/stores/game-persistence.svelte";
import { SvelteSet } from "svelte/reactivity";
let { data }: PageProps = $props();
@@ -51,7 +52,7 @@
);
let guessedIds = $derived(
new Set(persistence.guesses.map((g) => g.book.id)),
new SvelteSet(persistence.guesses.map((g) => g.book.id)),
);
const currentDate = $derived(
@@ -302,7 +303,7 @@
{#if !isWon}
<div class="animate-fade-in-up animate-delay-400">
<SearchInput bind:searchQuery {guessedIds} {submitGuess} />
<SearchInput bind:searchQuery {guessedIds} {submitGuess} guessCount={persistence.guesses.length} />
</div>
{:else if showWinScreen}
<div class="animate-fade-in-up animate-delay-400">