Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs
3.8 KiB
Tasks
1. Server
-
1.1 services-counter
CmsBlock: addfullWidth(Boolean),formHeadingandformText.CmsBlockValidatorHERO rules:- allow
cardson a HERO, 0 to 6 of them, each with a title that is required and at most 80 characters, and no icon or text; formHeadingat most 80 characters andformTextat most 200;- refuse
formHeadingorformTextwithouteventUuid(PagesUnusedField).
Verify: new validator tests fail first, then pass;
mvn -T 1C -pl solvway-services-counter verify. - allow
2. Portal
-
2.1
cmsPages.tstypes. InCmsBlocks.tsx:- the HERO shows its points as a bulleted list;
- the form card shows
formHeadingandformText, editable in place; - a full-width HERO renders outside the page width, with a larger serif heading, vertical centring and the lighter left-to-right shade;
- adjacent bleed blocks (HTML, or a full-width HERO) get no gap between them.
Verify: render tests fail first, then pass; vitest exit 0.
-
2.2
BlockFields.tsx:- the Hero gets a "Full width" switch, the points list (reusing the trust strip's item list), and the form heading and text fields, shown only when an event is picked;
INLINE.HEROincludesformHeading,formTextand the points;- add the labels to
defaultMessages.ts,zh_CN.seed.jsonandsql/01-hero-full-width-labels.sql, and 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-technologythrough the editor:- turn on Full width;
- add the three INS points;
- set the form heading and text;
- publish the page.
Then check the published page at 1280 px and 390 px against the INS page, and check a save with 7 points shows the refusal on the canvas.
-
3.2 Run the full portal vitest (exit 0), tsc, lint, Maven verify for services-counter, and
openspec validate add-hero-full-width --strict. -
3.3 Add a release note to
docs/deployment.md(label SQL).
Notes (2026-12-04)
- Red first:
- the validator tests failed on points and the form heading;
- the render tests failed on full width, points, the card heading and the joins;
- the editor and company-switch tests failed;
- the frame floor, ask and answer tests failed.
- Changed existing tests:
CmsBlocks.html.test.tsx"starts a header-less page flush at the top" now checks that the first block row has no top margin. It used to check for aspace-yclass, which is no longer how spacing works. It still asserts that the hidden title is outside the spacing.frameHtml.test.tsclamp test: the floor is now 20 px, per the modified "Custom HTML Frame Height" requirement. It also checks that 68 stays 68.
- Live check (port 3001, rebuilt counter), on
/p/INS/hotel-technologythrough the editor:- Full width switched on;
- three points and the form heading and text typed on the canvas;
- saved and published.
- Published result at 1280 px:
- the hero runs flush under the top bar and into the rest of the page;
- the serif headline is centred in the first screen;
- the points show in the accent colour, and the card has its heading.
- Published result at 390 px: the layout stacks, with the card below the text.
- Fixes from the live check:
- the text is centred in the opening height, not beside the long form;
- the frame floor is 20 px;
- the page asks frames for their height (both added to the spec).
- Not reachable in the UI, covered by the validator tests:
- 7 points, because Add point stops at 6;
- a form heading without a form, because No form clears it.
Workflow follow-up
- Open a PR to
mainand merge it. Archive the change on its own branch, with its own PR.