Landing pages gain a Footer section (1 to 4 columns of title and text, a legal line under a divider) whose phone numbers, emails and web addresses show as links. The Form block and a hero with a form may carry a thank-you text shown after sign-up, with the same links. Full-width heroes get a lighter shade. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs
3.7 KiB
Tasks
1. Server
-
1.1 services-counter
CmsBlock: addthanksText.CmsBlockValidator:thanksTextat most 200 on FORM and HERO; refused on a HERO withouteventUuidand on every other type (PagesUnusedField);- FOOTER: no heading; 1 to 4 cards, each with a required title (80) and required text (300) and no icon;
textat most 300.
Verify: new validator tests fail first, then pass;
mvn -T 1C -pl solvway-services-counter verify.
2. Portal
-
2.1 Link helper and rendering:
- a helper that turns plain text into text and links (
+phone numbers, emails,https://andwww.addresses), building elements, never HTML; Textgainslinks;CmsBlocks.tsxrenders FOOTER (columns, line breaks, legal line under a divider), passesthanksTexttoLandingForm, and lightens the full-width hero shade;LandingForm.tsxshows the thank-you text under the heading.
Verify: render tests fail first, then pass; vitest exit 0.
- a helper that turns plain text into text and links (
-
2.2 Editor:
cmsPages.ts: FOOTER type, label and empty block (dark look, two columns);BlockFields.tsx: the footer's columns (1 to 4) and legal line; the thank-you field on FORM, and on HERO when an event is picked; "No form" and company change clear it;- labels in
defaultMessages.ts,zh_CN.seed.json,sql/01-thanks-footer-labels.sql; regeneratelocal/seed/04-zh-cn-messages.sql.
Verify: editor tests fail first, then pass; tsc and lint clean.
3. Verification
-
3.1 Rebuild services-counter. Use Playwright on port 3001 to edit
/p/INS/hotel-technology-nativethrough the editor:- set the hero's thank-you text to "Prefer to talk now? Call +60 12-833 2775.";
- replace the rich text footer with a Footer section matching INS;
- publish.
Check the published page at 1280 px and 390 px. The thank-you screen needs a real sign-up, which writes a record: check it in the editor preview path only if it does not save, otherwise ask the owner first.
-
3.2 Run the full portal vitest (exit 0), tsc, lint, Maven verify for services-counter, and
openspec validate add-landing-thanks-and-footer --strict. -
3.3 Add a release note to
docs/deployment.md(label SQL).
Notes (2026-12-04)
- Red first:
- the validator tests failed on the thank-you text and the footer;
- the render tests failed on the thank-you text, the footer and the link helper (missing module);
- the editor tests failed on the Footer section, the hero's thank-you field and the company switch.
- Changed existing tests: none. Two of my own new editor tests were fixed before going green: column names shift after a removal, and the Form block has its own thank-you field, so the hero checks are scoped to block 1.
- Design-token checks: the phone shade uses an even black gradient (
bg-black/60is refused), and the divider usesborder-muted-foreground/30(border-current/15is not in Tailwind 3). - Live check (port 3001, rebuilt counter), on
/p/INS/hotel-technology-nativethrough the editor:- typed the hero's thank-you text "Prefer to talk now? Call +60 12-833 2775.";
- added a Footer section with three columns and the legal line, and removed the old Text footer;
- saved and published.
- Published result: at 1280 px the three columns sit side by side on the dark band with gold tel, mailto and https links, and the legal line sits under a divider; at 390 px they stack. The hero shade is lighter.
- Not run live: the thank-you screen itself, because it needs a real sign-up, which writes a record. The render tests cover it (thank-you text and the tel link after a mocked sign-up).
- Not reachable in the UI, covered by the validator tests: 5 footer columns (Add column stops at 4), and a thank-you text on a hero without a form (No form clears it).