Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs
6.0 KiB
MODIFIED Requirements
Requirement: The Page Editor
At 1024 px and wider the editor SHALL be the on-page editor. Below 1024 px it SHALL be the form editor. Both SHALL offer the title, a slug filled from the title until edited, a meta description with a 160-character counter, the status, adding, moving and removing blocks, and images uploaded only on save. A FORM block SHALL pick from the company's enabled events that have not ended.
Scenario: Slug follows the title until edited
- GIVEN a new page
- WHEN staff type the title "Hotel Technology"
- THEN the slug becomes
hotel-technology
Scenario: Narrow window keeps the form
- WHEN staff open a page in a window 900 px wide
- THEN the form editor shows, with Preview
Requirement: Saving And Deleting In The Editor
Server field errors SHALL show at their fields, keeping all entered values. After a save the editor SHALL offer a link to view the page. Deleting a page SHALL ask first. With unsaved edits, reloading, closing and following an in-app link SHALL ask first.
Scenario: Server error at its field
- WHEN staff save a HERO button link
javascript:alert(1) - THEN the error shows at that button link and every entered value stays
Scenario: Leaving by an in-app link
- GIVEN staff changed a heading and did not save
- WHEN they click Pages in the menu
- THEN the editor asks before leaving, and Cancel keeps them on the page with the change
Requirement: The Custom HTML Block In The Editor
The editor SHALL offer adding a Custom HTML block, edited in a monospace text box with a 200000-character counter and a note that forms inside it do not send. On the canvas the block SHALL show its last saved version as a sealed frame, marked "Save to update" while its HTML has unsaved edits. The editor SHALL offer a "hide page header" switch.
Scenario: Adding a Custom HTML block
- WHEN staff add a Custom HTML block and paste HTML into it
- THEN the block shows the pasted HTML, the character count and the note about forms
Scenario: Unsaved HTML on the canvas
- GIVEN a saved page with a Custom HTML block
- WHEN staff change its HTML in the panel
- THEN the canvas marks the block "Save to update"
- AND after Save the canvas shows the new HTML
Scenario: Hiding the header
- WHEN staff turn on "hide page header" and save
- THEN reading the page returns "hide header" on
Requirement: New Sections In The Editor
Both editors SHALL offer adding FEATURES, STEPS, TRUST and CTA blocks, editing their fields, adding, removing and reordering cards, and choosing any block's look. Refusals SHALL show at the field they name, including card fields.
Scenario: A refused card title shows at its field
- GIVEN staff editing a page with a FEATURES block
- WHEN the save is refused on field
blocks[0].cards[1].title - THEN the message shows at the second card's title field
ADDED Requirements
Requirement: The Page Canvas
The on-page editor SHALL show the page on a canvas, rendered as visitors see it, with a Desktop view (1280 px wide, scaled to fit) and a Phone view (390 px wide). Changes SHALL show on the canvas as they are made, before saving. Links and buttons on the canvas SHALL NOT navigate, and the sign-up form SHALL show its preview note.
Scenario: Phone view uses the phone layout
- GIVEN a page with a FEATURES block of three cards
- WHEN staff switch to Phone
- THEN the cards stack in one column on the canvas
Scenario: A change shows before saving
- WHEN staff change a FEATURES card title in the side panel
- THEN the canvas shows the new title at once
Requirement: Edit Text On The Page
Clicking a heading, short text, button label, card title or text, or FAQ question or answer on the canvas SHALL edit it in place as plain text, with the server's length limit shown when close. Rich text SHALL be edited in place with bold, italic, link, lists and alignment, and links SHALL follow the page link rule. Clicking an image spot SHALL open the file picker.
Scenario: Edit a heading in place
- WHEN staff click the hero heading on the canvas and type "Hotel week"
- THEN the canvas and the side panel show "Hotel week"
Scenario: An unsafe link is refused in rich text
- WHEN staff add the link
javascript:alert(1)in a Text block on the canvas - THEN the link is not added and the toolbar says why
Requirement: Section Selection And Actions
Clicking a section on the canvas SHALL select it, outline it and show its settings in the side panel. With none selected, the panel SHALL show the page settings. A selected section SHALL offer drag, up, down, duplicate and delete. "Add section" between sections and at the end SHALL offer every block type. Up and down SHALL work from the keyboard.
Scenario: Duplicate a section
- WHEN staff select the second section and press Duplicate
- THEN a copy appears as the third section and is selected
Scenario: Add a section between two
- WHEN staff press Add section between the first and second sections and choose Steps
- THEN a Steps section appears second and is selected
Requirement: Undo And Redo
The on-page editor SHALL undo and redo page changes, up to 50 steps, by buttons and by Ctrl+Z and Ctrl+Shift+Z. Typing in one field SHALL be one step. Saving SHALL NOT clear the history.
Scenario: Undo a delete
- GIVEN staff deleted the FAQ section
- WHEN they press Ctrl+Z
- THEN the FAQ section is back in its place with its content
Requirement: Refusals On The Canvas
When a save or publish is refused on a block field, the editor SHALL select that block, outline it, scroll it into view and show the message at the field in the side panel. A refusal on a page field SHALL show in the page settings.
Scenario: A form without an event
- GIVEN a page from the Event sign-up template
- WHEN staff save without choosing the form's event
- THEN the form section is selected and outlined and the panel shows the message at the Event field