From 26a6147e8dc01f8e11faf5909e0fdf7d1653e950 Mon Sep 17 00:00:00 2001 From: Maurice Date: Sat, 24 Oct 2026 14:59:00 +0200 Subject: [PATCH] fix(book): a summary's and a country's look are optional, so a stored book reads and saves as it did Absent means the classic look. Defaulting it wrote the field into every element the auto layout and the templates build, which moved their parity fixtures and grew the page tools past their schema ceiling; the new descriptions are also shorter for the same reason. --- .../components/Studio/travel/CountryLooks.tsx | 2 +- .../components/Studio/travel/StatsLooks.tsx | 2 +- .../Studio/travel/travelBuilders.ts | 2 +- shared/src/book/auto/auto-elements.ts | 3 --- shared/src/book/auto/auto-templates.data.ts | 2 -- shared/src/book/book-op-enums.ts | 24 ++++--------------- shared/src/book/book-travel.ts | 2 -- shared/src/book/book.schema.ts | 16 ++++++------- 8 files changed, 15 insertions(+), 38 deletions(-) diff --git a/client/src/components/Studio/travel/CountryLooks.tsx b/client/src/components/Studio/travel/CountryLooks.tsx index 20f65f747..02e323b63 100644 --- a/client/src/components/Studio/travel/CountryLooks.tsx +++ b/client/src/components/Studio/travel/CountryLooks.tsx @@ -253,7 +253,7 @@ export function CountryLookView({ el, frameStyle }: { el: BookCountriesElement; const key = `${c.code}-${i}`; if (el.look === 'stamp') return ; if (el.look === 'postcard') return ; - const Look = MORE[el.look] ?? Visa; + const Look = MORE[el.look ?? 'visa'] ?? Visa; return ; })} diff --git a/client/src/components/Studio/travel/StatsLooks.tsx b/client/src/components/Studio/travel/StatsLooks.tsx index bfbfc2650..0695838c5 100644 --- a/client/src/components/Studio/travel/StatsLooks.tsx +++ b/client/src/components/Studio/travel/StatsLooks.tsx @@ -509,7 +509,7 @@ export function StatsLookView({ el, frameStyle }: { el: BookStatsElement; frameS ...metricValue(metric, el.values, el.units, locale), label: t(`journey.studio.metric.${metric}`), })); - const Look = LOOKS[el.look] ?? PosterLook; + const Look = LOOKS[el.look ?? 'poster'] ?? PosterLook; return (