docs: archive add-page-drafts-and-templates
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs
This commit is contained in:
1 parent
3b977fc277
commit
de40c60eb9
9 files changed
+71
-1
No files matched your search
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -193,7 +193,7 @@ Pages and page images SHALL follow the company scoping rules: staff see, edit an
|
||||
|
||||
### Requirement: The Pages List
|
||||
|
||||
`/pages` SHALL list the pages in scope with their title, public address, status and last update, with a search by title or slug and an Add page action. Each row SHALL open its editor. Pages SHALL appear in the sidebar for users with `BO_PAGES`.
|
||||
`/pages` SHALL list the pages in scope with their title, public address, status, an "Unpublished changes" mark when a published page has a draft, and last update, with a search by title or slug and an Add page action. Each row SHALL open its editor and offer Duplicate. Pages SHALL appear in the sidebar for users with `BO_PAGES`.
|
||||
|
||||
#### Scenario: Draft in the list
|
||||
|
||||
@@ -201,6 +201,12 @@ Pages and page images SHALL follow the company scoping rules: staff see, edit an
|
||||
- **WHEN** INS staff open `/pages`
|
||||
- **THEN** its row shows status Draft and address `/p/INS/launch`
|
||||
|
||||
#### Scenario: Unpublished changes in the list
|
||||
|
||||
- **GIVEN** INS page `hotel` is published and has a saved draft
|
||||
- **WHEN** INS staff open `/pages`
|
||||
- **THEN** its row shows status Published and "Unpublished changes"
|
||||
|
||||
### Requirement: The Page Editor
|
||||
|
||||
The editor SHALL offer the title, a slug filled from the title until edited, a meta description with a 160-character counter, the status and the block list. Blocks SHALL be added, moved up or down and removed. A chosen image SHALL be uploaded only when the page is saved. A FORM block SHALL pick from the company's enabled events that have not ended.
|
||||
@@ -413,3 +419,67 @@ The page editor SHALL offer adding FEATURES, STEPS, TRUST and CTA blocks, editin
|
||||
- **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 under the second card's title field
|
||||
|
||||
### Requirement: Published Pages Keep A Separate Draft
|
||||
|
||||
Saving a published page with status Published SHALL store the content as the page's draft, checked by the same rules as any save, and SHALL NOT change what visitors see. Saving a published page with status Draft SHALL unpublish it, write the content to the page and drop any draft. A page that is not published SHALL save directly, as before. The staff preview and the editor SHALL show the draft when there is one.
|
||||
|
||||
#### Scenario: Editing a live page does not change it for visitors
|
||||
|
||||
- **GIVEN** INS page `hotel` is published with heading "Hotel day"
|
||||
- **WHEN** staff change the heading to "Hotel week" and save
|
||||
- **THEN** visitors still see "Hotel day"
|
||||
- **AND** the editor and the staff preview show "Hotel week"
|
||||
|
||||
#### Scenario: Unpublishing drops the draft
|
||||
|
||||
- **GIVEN** a published page with a draft
|
||||
- **WHEN** staff choose status Draft and save
|
||||
- **THEN** the page is a draft with the saved content and no separate draft
|
||||
|
||||
### Requirement: Publish And Discard Changes
|
||||
|
||||
Publishing a page's changes SHALL check its draft again by the same rules, including a unique slug, then make it the page's content and drop the draft. A refusal SHALL show at its field and change nothing. Discarding changes SHALL ask first, then drop the draft so the editor shows the published content again. Both SHALL be limited to pages in the caller's company scope.
|
||||
|
||||
#### Scenario: Publish changes
|
||||
|
||||
- **GIVEN** published page `hotel` has a draft with heading "Hotel week"
|
||||
- **WHEN** staff press Publish changes
|
||||
- **THEN** visitors see "Hotel week" and the page has no draft
|
||||
|
||||
#### Scenario: Publish refused for a taken slug
|
||||
|
||||
- **GIVEN** a draft with slug `launch` and another page published with slug `launch` since
|
||||
- **WHEN** staff press Publish changes
|
||||
- **THEN** the publish is refused on field `slug` and visitors still see the old content
|
||||
|
||||
#### Scenario: Discard changes
|
||||
|
||||
- **GIVEN** published page `hotel` has a draft
|
||||
- **WHEN** staff press Discard changes and confirm
|
||||
- **THEN** the draft is gone and the editor shows the published content
|
||||
|
||||
#### Scenario: Another company's page
|
||||
|
||||
- **WHEN** CV staff ask to publish INS page `hotel`
|
||||
- **THEN** the request is answered "not found" and nothing changes
|
||||
|
||||
### Requirement: Starter Templates
|
||||
|
||||
New page SHALL first offer Blank, Event sign-up and Service showcase. A template SHALL fill the editor with its sections, placeholder text, a sign-up form with link name `signup` and no event, and buttons linking to `#signup`; nothing is stored until staff save. Every template's sections SHALL pass the server's block rules once an event is chosen.
|
||||
|
||||
#### Scenario: Start from the event template
|
||||
|
||||
- **WHEN** staff choose New page, then Event sign-up
|
||||
- **THEN** the editor shows a hero, trust strip, feature cards, steps, FAQ and a sign-up form, filled with placeholder text
|
||||
- **AND** saving it without choosing the form's event is refused on that event field
|
||||
|
||||
### Requirement: Duplicate A Page
|
||||
|
||||
Duplicate SHALL open the editor with a copy of the page's current content (its draft when there is one), as a new unsaved draft page of the same company titled "<title> (copy)" with slug "<slug>-copy". Nothing SHALL be stored until staff save.
|
||||
|
||||
#### Scenario: Duplicate last event's page
|
||||
|
||||
- **GIVEN** INS page `hotel` titled "Hotel day"
|
||||
- **WHEN** staff press Duplicate on it and save
|
||||
- **THEN** a new draft INS page `hotel-copy` titled "Hotel day (copy)" exists with the same sections
|
||||
Reference in new issue
Block a user