mirror of
https://github.com/pupperpowell/bibdle.git
synced 2026-04-06 01:43:32 -04:00
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:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user