From 02b87361fb6ead9c2c9123a4643bab36a3eb8661 Mon Sep 17 00:00:00 2001 From: David Pine Date: Sat, 6 Jun 2026 08:32:32 -0500 Subject: [PATCH] fix(docs): re-run home scroll-reveal after View Transitions navigation The home page's scroll-reveal sections (.reveal) stayed invisible (opacity:0) after navigating away from the home page and back via Astro View Transitions (e.g. home -> search -> result -> logo home). The IntersectionObserver that adds the .visible class lived in a module diff --git a/docs/tests/hero-reveal.spec.mjs b/docs/tests/hero-reveal.spec.mjs new file mode 100644 index 000000000..44a6e0b60 --- /dev/null +++ b/docs/tests/hero-reveal.spec.mjs @@ -0,0 +1,73 @@ +import { test, expect } from '@playwright/test'; + +// Regression test for the home-page scroll-reveal sections disappearing after a +// View Transitions navigation away from and back to the home page. +// +// Repro steps (matches the reported bug): +// 1. Land on the home page. +// 2. Open search, run a query, click a result (navigates via View Transitions). +// 3. Click the logo to go back home (navigates via View Transitions). +// 4. Scroll the under-hero ".reveal" section into view. +// +// Before the fix the IntersectionObserver that adds `.visible` lived in a module +// `