Landing pages gain a Top bar section (the company logo and an optional button, kept at the top of the window, first section only), a short label above the headings of five section types, and serif section headings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs
3.3 KiB
3.3 KiB
Tasks
1. Server
-
1.1 services-counter
CmsBlock: addeyebrow.CmsBlockValidator:- TOPBAR is allowed only at index 0 (
PagesTopBarFirst); it takes the button pair andanchoronly, and any other field is refused (PagesUnusedField); eyebrowat most 40 characters on FEATURES, STEPS, IMAGE_TEXT, FAQ and CTA, and refused elsewhere (PagesUnusedField).
Verify: new validator tests fail first, then pass;
mvn -T 1C -pl solvway-services-counter verify. - TOPBAR is allowed only at index 0 (
2. Portal
-
2.1
CmsBlocks.tsx:- renders TOPBAR (logo or name, optional button, sticky, full width, joins a full-width hero);
- renders the label above section headings, in the accent colour, darkened on light backgrounds;
- renders section h2s in serif;
- named blocks keep clear of a sticky bar when jumped to.
Verify: render tests fail first, then pass; vitest exit 0.
-
2.2 Editor:
cmsPages.ts: TOPBAR type, label and empty block;eyebrow;BlockFields.tsx: the top bar's button fields, and the label field on the five types; the label is editable in place on the canvas;- labels in
defaultMessages.ts,zh_CN.seed.jsonandsql/01-polish-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:- turn on "hide page header";
- add a top bar first, with "Get My Free Consultation" linking to
#consult; - add the labels "Services", "How we work", "Why Infinity" and "FAQ";
- publish.
Check the published page at 1280 px and 390 px against the INS page, including the bar staying put on scroll.
-
3.2 Run the full portal vitest (exit 0), tsc, lint, Maven verify for services-counter, and
openspec validate add-landing-page-polish --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 top bar and the labels;
- the render tests failed on the top bar, the scroll margin, the labels and the serif headings;
- the editor test failed on the label field and the top bar.
- Changed existing tests: none. One of my own new render tests changed before going green: the sticky class sits on the top bar's row, not on the header. A sticky element only sticks inside its parent, and the header's parent is just as tall as the header.
- Live check (port 3001, rebuilt counter), on
/p/INS/hotel-technology-nativethrough the editor:- "hide page header" was already on;
- added a Top bar section, moved it first, and set "Get My Free Consultation" linking to
#consult; - typed the labels "Services", "How we work", "Why Infinity" and "FAQ" on the canvas;
- saved and published.
- Published result:
- at 1280 px the logo and button sit in a white bar above the full-width hero, with no title, and the bar stays at the top while scrolling;
- the labels show in darkened gold uppercase above serif headings;
- at 390 px the bar keeps the logo and button, and the hero stacks.
- Not reachable in the UI, covered by the validator tests: a top bar that is not first is refused (the server rule; the editor's Move up and Move down allow it, and the refusal shows on the canvas).