fix(onboarding): hide search results until typed, trim gallery grid to 2 rows

- search demo results were greyed-but-visible while the query was still
  typing, as if the app pre-knew the search; they're now invisible (space
  reserved, no layout jump) and fade in only once typing completes
- gallery preview dropped from 3 rows to 2 so the 'Click any tile' explainer
  text is visible without scrolling
This commit is contained in:
2026-06-13 09:23:30 +01:00
parent 09810cb868
commit ed9c061ac1
2 changed files with 5 additions and 6 deletions
@@ -3,19 +3,16 @@ import { FakeTile, ReplayButton } from "./fakes";
const REVEAL_MS = 280; const REVEAL_MS = 280;
// Two rows (cols-4) keeps the explainer text visible without scrolling.
const TILE_PROPS: { favorite?: boolean; rating?: number; duration?: string }[] = [ const TILE_PROPS: { favorite?: boolean; rating?: number; duration?: string }[] = [
{}, {},
{ favorite: true }, { favorite: true },
{}, {},
{ duration: "1:24" }, { duration: "1:24" },
{ rating: 5 }, { rating: 5 },
{},
{ favorite: true, rating: 3 }, { favorite: true, rating: 3 },
{},
{ duration: "0:09" }, { duration: "0:09" },
{}, {},
{ rating: 4 },
{},
]; ];
const TILE_COUNT = TILE_PROPS.length; const TILE_COUNT = TILE_PROPS.length;
+4 -2
View File
@@ -82,8 +82,10 @@ export function StepSearchDemo() {
</span> </span>
</div> </div>
{/* Results — fixed-width tiles, centered, so 1/2/3 results all look right */} {/* Results — hidden (not greyed) until the query finishes typing, so it
<div className={`mt-3 flex flex-wrap justify-center gap-1.5 transition-opacity duration-300 ${fullyTyped ? "opacity-100" : "opacity-30"}`}> doesn't look like the app is reading the user's mind. Space is held
by the invisible tiles so the layout doesn't jump when they appear. */}
<div className={`mt-3 flex flex-wrap justify-center gap-1.5 transition-opacity duration-300 ${fullyTyped ? "opacity-100" : "opacity-0"}`}>
{demo.results.map((src, i) => ( {demo.results.map((src, i) => (
<div key={`${demoIndex}-${i}`} className="aspect-square w-36 overflow-hidden rounded-xl bg-white/[0.04]"> <div key={`${demoIndex}-${i}`} className="aspect-square w-36 overflow-hidden rounded-xl bg-white/[0.04]">
<img src={src} alt="" className="h-full w-full object-cover" /> <img src={src} alt="" className="h-full w-full object-cover" />