A full-width hero spans the window with a larger serif headline and a lighter left-to-right shade. It may list up to 6 points and give its form card a heading and text. Full-width neighbours join with no gap. Custom HTML frames now shrink to 20 px and re-report their height when the page asks, so a short top bar no longer leaves a blank band. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs
4.3 KiB
ADDED Requirements
Requirement: Full-Width Hero
A HERO block MAY be marked full width. A full-width hero SHALL span the whole window with square corners, show its heading larger and centred top to bottom in the hero's opening height (not beside a long form), and use a shade that is darker on the text side than on the far side. A hero that is not marked full width SHALL look as it did before. The server SHALL refuse a fullWidth value that is not true or false.
Scenario: Hero runs edge to edge under a Custom HTML top bar
- GIVEN page
/p/INS/hotel-technologywith a Custom HTML top bar followed by a full-width HERO with an image and an event - WHEN a visitor opens the page in a 1280 px window
- THEN the hero spans the full window width
- AND the form card sits beside the heading
Scenario: Existing hero unchanged
- WHEN a visitor opens a page whose HERO block is not marked full width
- THEN the hero sits inside the page width with rounded corners, as before
Scenario: Turn on full width in the editor
- GIVEN staff editing a page with a HERO block
- WHEN they switch on "Full width" in the hero's settings
- THEN the canvas shows the hero across the full width
Requirement: Full-Width Blocks Join Without Gaps
A full-width HERO and a Custom HTML block next to each other SHALL join with no gap between them, and so SHALL two Custom HTML blocks next to each other. Other blocks SHALL keep their usual spacing.
Scenario: Top bar runs straight into the hero
- GIVEN a Custom HTML top bar followed by a full-width HERO
- WHEN a visitor opens the page
- THEN the hero starts directly under the top bar, with no gap
Requirement: Hero Points
A HERO block MAY carry up to 6 points, each a non-empty title of at most 80 characters, with no icon and no text. The hero SHALL show its points as a bulleted list under its text. The server SHALL refuse more than 6 points, an empty or over-long point, and a point with an icon or text, naming the field.
Scenario: Points under the hero text
- GIVEN a HERO block with points "One accountable partner instead of five vendors" and "Local support team in Malaysia"
- WHEN a visitor opens the page
- THEN both points show as a bulleted list under the hero text
Scenario: Too many points refused
- WHEN staff save a HERO block with 7 points
- THEN the save is refused at
blocks[n].cards
Requirement: Hero Form Heading
A HERO block with an event MAY carry a form heading of at most 80 characters and a form text of at most 200 characters. The hero SHALL show them at the top of its form card, above the form. The server SHALL refuse either on a hero without an event. On the canvas, staff SHALL be able to type both in place.
Scenario: Card shows its heading
- GIVEN a HERO block with an event, form heading "Get a free consultation" and form text "Tell us about your property. It takes under a minute."
- WHEN a visitor opens the page
- THEN the form card starts with that heading and text, followed by the form
Scenario: Form heading without a form refused
- WHEN staff save a HERO block with a form heading and no event
- THEN the save is refused at
blocks[n].formHeading
MODIFIED Requirements
Requirement: Custom HTML Frame Height
The frame SHALL grow or shrink to fit its content, between 20 and 20000 pixels, using height reports sent by that frame only. Before the first report it SHALL be 600 pixels tall. The frame SHALL report the height of its content, not of its own window, and SHALL report again whenever the page asks, which the page SHALL do once it listens and when the frame loads.
Scenario: A tall paste grows the frame
- GIVEN a published HTML block whose content is 3000 pixels tall
- WHEN a visitor opens the page
- THEN the frame is 3000 pixels tall and shows no inner scroll bar
Scenario: A short top bar shrinks the frame
- GIVEN a published HTML block holding only a 68 pixel top bar
- WHEN a visitor opens the page, even if the frame loaded before the page was ready
- THEN the frame is 68 pixels tall, with no blank space below the bar
Scenario: Another frame cannot resize it
- WHEN a different window posts a height report to the page
- THEN the frame's height does not change