You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: complete Astro 7 migration, bump CI actions
Drop the `compressHTML: true` pin from ac977de and adopt Astro 7's `'jsx'`
default, after auditing every whitespace boundary it changes.
Of 607 boundaries where 'jsx' removes whitespace the v6 build emitted, 604
are benign: the two text runs are separated by a block-level box, or are
flex/grid items that space themselves with `gap-*` (nav, footer, breadcrumbs,
chip rows). The mobile menu looks like a regression in the markup but is not
— it is `hidden flex-col gap-4` and gets `display:flex` from the JS-toggled
`.nav-open` class, so its links are flex items.
The remaining 3 are real, all the same pattern in Pricing: `{plan.perLesson}
USD` followed by a newline and an inline unit <span>, which 'jsx' welds into
"24 USD/ lesson". Fixed with an explicit `{" "}`.
<EsTip> is fine as written — every usage already sits on one line with its
surrounding text — but it is inline-block in running prose, so it is the most
likely thing to break next. Both it and the price line are now covered by a
test asserting rendered spacing, a property nothing else in the suite read.
Verified the test fails ("24 USD/ lesson") when the fix is reverted.
Net: rendered text is identical to the pre-upgrade build apart from the
intended Pricing fix, structure is unchanged, and HTML shrinks ~2.9 KB.
Also bump actions/checkout and actions/setup-node v4 → v7, clearing the CI
annotation about being force-run on Node 24.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CLAUDE.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,8 @@ Requires Node.js >=22.12.0. Deployed to Cloudflare Workers Builds: push to `main
19
19
20
20
**Static site built with Astro 7 + Tailwind CSS 4.** Zero client-side JavaScript by default — games use inline `<script>` blocks with vanilla JS, no framework hydration. The homepage additionally ships three tiny progressive-enhancement scripts (seasonal papel-picado swap, daily word-of-the-day, EsTip width measurement); with JS disabled it renders the year-round banner, the fallback word, and Spanish-sized swap boxes.
21
21
22
+
**Whitespace (Astro 7):**`compressHTML` defaults to `'jsx'`, so whitespace and line breaks *around* elements are stripped; whitespace within a single line is kept. Putting an inline element (`<span>`, `<a>`, `<EsTip>`) on its own source line inside running text welds the words together — `24 USD` + newline + `<span>/ lesson</span>` renders as `24 USD/ lesson`. Keep the inline element on the same line as its neighbouring text, or add an explicit `{" "}`. This only bites inline elements: flex/grid children (nav, footer, breadcrumbs, chip rows) space themselves with `gap-*` and are unaffected. The `whitespace survives around inline elements split across source lines` test in `tests/build.test.ts` guards this.
23
+
22
24
### Key directories
23
25
24
26
-`src/pages/` — File-based routing. Each `.astro` file = one page.
0 commit comments