Skip to content

Wire PageDesigner's manifest load/save (it renders with an empty manifest) #26

@rubenvdlinde

Description

@rubenvdlinde

Follow-up from #23 (re-applying openbuilt-page-editor onto the Tier-4 shell). src/views/PageDesigner.vue is now reachable at /builder/:slug/pages and the three-pane visual editor (Pages / Menu builders + per-page-type sub-editors + live validation) renders — but it starts from the default empty manifest: there's no plumbing to load the virtual app's current manifest from GET /api/applications/{slug}/manifest (or the Application object) and to persist edits back.

In the original PR #4 that plumbing lived in the competing replacement ApplicationEditor.vue "Design" tab + the applicationEditor Pinia store (src/store/modules/applicationEditor.js, which expects the lib's createObjectStore semantics — fetchObject / saveObject / getError — that development's src/store/modules/object.js doesn't fully provide). Re-introducing that shell was out of scope for #23 (the merged shell has the list + Editor/History/Diff tabs). applicationEditor.js is currently an inert orphan (nothing imports it; Pinia stores are lazy, so it's harmless).

To finish:

  • Either migrate src/store/modules/object.js → the lib's createObjectStore (so applicationEditor.js works), or rework applicationEditor.js to use the existing object.js API.
  • Wire PageDesigner.vue to load applicationUuid's manifest on created() (via the slug from $route.params.sluggetManifest or the Application object) and to PUT/PATCH the edited manifest back (a PATCH /api/applications/{slug} or going through OR's objects API).
  • Add a write endpoint if one doesn't exist (the read side, applications#getManifest, is already there).
  • Decide the entry point: a "Design" link in the virtual-app context (BuilderHost secondary nav) and/or a button in the ApplicationEditor detail that opens /builder/:slug/pages.

Related: #4 (the spec), #19 (publish-path transition gap).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions