docs(project-editor): document Sprint 16 tabs, draft/publish gap, and validation rules
This commit is contained in:
@@ -88,6 +88,14 @@ Future backend integration:
|
||||
- export JSON
|
||||
- import JSON
|
||||
- runtime preview without full browser refresh
|
||||
- Languages (Sprint 16)
|
||||
- add/remove supported locale
|
||||
- set default locale
|
||||
- generically syncs translation keys across static pages and navigation labels (`LocaleSyncService`)
|
||||
- Navigation (Sprint 16)
|
||||
- header navigation: add/remove/reorder/edit label/URL/visibility
|
||||
- flat footer navigation: same actions
|
||||
- grouped footer navigation (column-based) is read-only in this tab for now
|
||||
|
||||
## Preview Strategy
|
||||
|
||||
@@ -120,15 +128,36 @@ Current widget editor supports explicit fields for:
|
||||
|
||||
Other widgets use JSON props fallback until dedicated editors are added.
|
||||
|
||||
## Future Backend Endpoints
|
||||
## Draft / Publish (Sprint 16)
|
||||
|
||||
Recommended future builder endpoints:
|
||||
- `GET /builder/bootstrap`
|
||||
- `PUT /builder/bootstrap`
|
||||
- `POST /builder/bootstrap/preview`
|
||||
- `POST /builder/bootstrap/validate`
|
||||
- `POST /builder/bootstrap/import`
|
||||
- `GET /builder/bootstrap/export`
|
||||
There is still no backend draft/publish API. This sprint models it client-side
|
||||
in `ProjectEditorFacade`:
|
||||
- `status: 'draft' | 'published'` and `dirty` (diffed against the
|
||||
last-saved snapshot) live in facade state.
|
||||
- `save()` snapshots the current in-memory bootstrap as "last saved" (no
|
||||
network call yet).
|
||||
- `publish()` runs `ProjectValidator`, and if there are no issues, applies
|
||||
the bootstrap via `PlatformRuntimeService.reloadFromBootstrap` and marks
|
||||
status `published`.
|
||||
|
||||
**Backend gap, not yet implemented:** real persistence needs
|
||||
`PUT /builder/bootstrap/draft` and `POST /builder/bootstrap/publish`
|
||||
endpoints so drafts/publishes survive a reload and are shared across editors.
|
||||
|
||||
## Validation
|
||||
|
||||
`ProjectValidator` (`services/project-validator.service.ts`) runs on every
|
||||
render of the save bar: missing logo, no languages, invalid marketplace URL,
|
||||
duplicate static-page slugs, empty homepage, a homepage widget with no
|
||||
`type`, duplicate header navigation links, invalid theme colors. Publish is
|
||||
blocked while any issue is present; Save is not.
|
||||
|
||||
## Rich HTML editing
|
||||
|
||||
Static page HTML is edited via `MarketplaceHtmlEditorComponent`
|
||||
(`components/html-editor/`), a `contentEditable` + toolbar component with no
|
||||
external dependency. It emits raw HTML on every change and never sanitizes —
|
||||
sanitization remains a storefront-render concern.
|
||||
|
||||
## Constraints
|
||||
|
||||
|
||||
Reference in New Issue
Block a user