STS-2.6.4: fix stale page title (#14), logoSize setting (#23), adaptive footer logo (#24) - #35
Open
gi-os wants to merge 1 commit into
Open
STS-2.6.4: fix stale page title (#14), logoSize setting (#23), adaptive footer logo (#24)#35gi-os wants to merge 1 commit into
gi-os wants to merge 1 commit into
Conversation
…ve footer logo (#24) - #14: force-dynamic root layout so metadata reads current DATABASE per request instead of build-time snapshot (stale 'B2B Storefront' titles); 'Shuttle' fallback everywhere; document.title now also set on cart, checkout, order-success and secret pages - #23: new logoSize key in Design/Details/Style.txt (multiplier, default 1, clamped 0.25-4) applied to header logo (mobile + desktop) and home hero logo - #24: footer LR Paris logo renders black on light footer backgrounds and white on dark ones (luminance check on primary color), transparent background enforced; footer text color adapts too
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #14, closes #23, closes #24.
#14 — Title switches to "B2B Storefront"
Root cause: the root layout's
generateMetadata()readsCompanyName.txtfrom the filesystem, but pages were statically prerendered at build time — so the<title>was baked with whatever DATABASE contained when the shop was built (old builds: theB2B Storefrontfallback). On every client-side navigation Next.js resetsdocument.titleto that stale baked value, then each page'suseEffectcorrects it after fetch — hence the "switches sometimes". Pages that never setdocument.title(cart, checkout, order-success, secret) kept the stale title permanently.Fix:
export const dynamic = 'force-dynamic'inapp/layout.tsx→ metadata is computed per request from the current DATABASE (verified: editingCompanyName.txtchanges the served<title>immediately, no rebuild)Shuttleeverywhere (neverB2B Storefront)document.titlenow also set on cart / checkout / order-success / secret#23 — Logo size setting
New optional key in
DATABASE/Design/Details/Style.txt:Multiplier (e.g.
1.5= 50% bigger), clamped to 0.25–4, defaults to 1 when absent. Applies to the header logo (mobile 2rem and desktop 2.5rem base) and the home page hero logo (4.5rem base). Added to both the live DATABASE andDATABASE template.#24 — Footer LR Paris logo adapts to background
The footer previously always applied
brightness(0) invert(1)(white logo) — invisible on lightprimarycolors. Now a luminance check (BT.601, threshold 0.6) on the footer background picks black (brightness(0)) on light backgrounds, white on dark.background: transparentenforced — no white box. Footer text color adapts the same way so it stays legible on light footers.Verification
npm run buildpasses (all routes now dynamic)CompanyName.txtedits per request;/api/designreturnsstyle.logoSizelib/version.ts+ history entry;package.jsonre-synced from 2.0.5)🤖 Generated with Claude (Fable 5 test drive)