refactor(web): share locale page pairs as components #338

Sammanfogat
supernaut sammanfogade 4 incheckningar från refactor/locale-page-components in i feat/remove-email-change 2026-10-10 16:41:24 +00:00
Ägare

What

Merge the per-locale page pairs (src/pages/*.astro and src/pages/en/*.astro) into shared components that take lang. Each page is now a thin wrapper.

Stacked on the #312 and #313 branches. Merge those first, then rebase this onto main.

Shared components

All in src/components/pages/:

  • legal-page (about, contact, privacy, terms, trial-terms, security)
  • home-page, not-found-page
  • docs-index-page, faq-page, guide-page
  • news-index-page, news-post-page
  • account-page, signup-page, welcome-page, checkout-return-page

Pages keep what Astro needs at page level: response headers and status, redirects and rewrites, Astro.cache.set(false), and the [slug] entry lookup (so the 404 rewrite still works).

Left split

pricing stays as two files. The two versions carry different prose and tables, so a shared component would only be a lang ternary around two copies.

Verification

URLs and the English-URL rule are unchanged. No content change.

  • Built the base commit and this branch, served both with node dist/server/entry.mjs.
  • Fetched 50 routes from each (sv and en: all static pages, every guide and news post, FAQ with a topic, checkout return with and without token and cancelled, unknown paths and unknown slugs).
  • Compared status, headers and HTML.
  • Ignored per-build values: scoped-style ids, asset hashes, server-island tokens, logo gradient ids, the captcha CSS nonce, and the CSP header (its style hashes follow the CSS bundle).
  • Ran twice: with auth configured (account redirects to login), and without auth plus SIGNUPS_OPEN=false (account 404 rewrite, signup redirect).
  • Result: 0 differences in markup and 0 in CSS content. Component CSS chunks can appear in a different order inside the head, so CSS was compared as a sorted set.

One bug caught by this: getRelativeLocaleUrl adds a trailing slash, which changed the return_to value on the account login redirect. The literal /account and /en/account are kept.

pnpm check, pnpm lint, pnpm test, pnpm build pass.

Version bumped to 1.31.1.

## What Merge the per-locale page pairs (`src/pages/*.astro` and `src/pages/en/*.astro`) into shared components that take `lang`. Each page is now a thin wrapper. Stacked on the #312 and #313 branches. Merge those first, then rebase this onto main. ## Shared components All in `src/components/pages/`: - `legal-page` (about, contact, privacy, terms, trial-terms, security) - `home-page`, `not-found-page` - `docs-index-page`, `faq-page`, `guide-page` - `news-index-page`, `news-post-page` - `account-page`, `signup-page`, `welcome-page`, `checkout-return-page` Pages keep what Astro needs at page level: response headers and status, redirects and rewrites, `Astro.cache.set(false)`, and the `[slug]` entry lookup (so the 404 rewrite still works). ## Left split `pricing` stays as two files. The two versions carry different prose and tables, so a shared component would only be a `lang` ternary around two copies. ## Verification URLs and the English-URL rule are unchanged. No content change. - Built the base commit and this branch, served both with `node dist/server/entry.mjs`. - Fetched 50 routes from each (sv and en: all static pages, every guide and news post, FAQ with a topic, checkout return with and without token and `cancelled`, unknown paths and unknown slugs). - Compared status, headers and HTML. - Ignored per-build values: scoped-style ids, asset hashes, server-island tokens, logo gradient ids, the captcha CSS nonce, and the CSP header (its style hashes follow the CSS bundle). - Ran twice: with auth configured (account redirects to login), and without auth plus `SIGNUPS_OPEN=false` (account 404 rewrite, signup redirect). - Result: 0 differences in markup and 0 in CSS content. Component CSS chunks can appear in a different order inside the head, so CSS was compared as a sorted set. One bug caught by this: `getRelativeLocaleUrl` adds a trailing slash, which changed the `return_to` value on the account login redirect. The literal `/account` and `/en/account` are kept. `pnpm check`, `pnpm lint`, `pnpm test`, `pnpm build` pass. Version bumped to 1.31.1.
supernaut lade till 4 incheckningar 2026-10-10 16:33:00 +00:00
supernaut sammanfogade incheckning f2359ba406 till feat/remove-email-change 2026-10-10 16:41:24 +00:00
supernaut tog bort grenen refactor/locale-page-components 2026-10-10 16:41:24 +00:00
supernaut refererade denna ändringsförfrågan från en incheckning 2026-10-10 16:41:25 +00:00
supernaut refererade denna ändringsförfrågan från en incheckning 2026-10-10 16:48:20 +00:00
Logga in för att delta i denna konversation.
Inga granskare
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-web!338
Ingen beskrivning angiven.