Hosted ongabo.esvia theHypermedia Protocol

[DONE] Implement new designs in the Publish a Document to a Sitehttps://github.com/seed-hypermedia/seed/pull/602

Main goal: update the publishing/editing UX for site documents.

Desired Workflow

  1. The user can click in any place and start typing or editing. A text cursor will appear.

  2. The user can edit text, images, or formatting.

  3. The user can publish at any time on edit mode with an Publish button always available, but disable when there are no changes.

  4. The system confirms when changes are successfully published.

  5. The system shows autosave every time the user changes something.

  6. When the user leaves without publishing the document, the Publish button status changes as a signal that some content was not published.

  7. When publishing, the dialog shows when was the last time it was last published and if there are changes to published.

  8. When the user clicks the "last time it was published," the versions list will be opened.

  9. When the user clicks "changes to publish," the changes will be highlighted in the document.

  10. If the user Clicks outside the text area, the Cursor should disappear. The same if the user press ESC.

  11. Publish button is not shown when user is on Comments tab.

What are we missing?

  1. The Publish button shouldn't show up in the Reading Context.

  2. The Publish button must show up in the Reading Context:

    1. The publish button should be grey in case there are no changes.

    2. The publish button should be green at the time the first edit happens.

Design

Recap

Updated the desktop publish flow to match the decisions we locked in:

  • Content tab only: the publish toolbar now renders only on the desktop document/content route (frontend/apps/desktop/src/pages/desktop-resource.tsx), so it stays hidden on non-Content main tabs.

  • Button state updated: the toolbar Publish button is now:

    • green when publish is available

    • grey when there are no publishable changes on an already-published doc

    • still clickable when grey so it can open the popover

  • First publish allowed at 0 changes: never-published drafts can still publish even if detected change count is zero.

  • No pulsing dot: the old unsaved-changes dot was removed from the toolbar trigger.

  • Publish popover status row: unpublished docs now show a non-clickable “Not yet published” row; published docs still show the clickable last-published row.

  • Added a focused regression test in frontend/apps/desktop/src/components/__tests__/publish-popover-body.test.tsx.

Files changed:

  • frontend/apps/desktop/src/components/editing-toolbar.tsx

  • frontend/apps/desktop/src/pages/desktop-resource.tsx

  • frontend/apps/desktop/src/components/__tests__/publish-popover-body.test.tsx

  • I could not complete pnpm/Vitest/TypeScript validation in this workspace because node_modules are missing here (vitest and tsc were not available).

  • pnpm audit did run and reported existing repo vulnerabilities; I didn’t change dependency versions as part of this task.

  • I did not implement the skipped “changes to publish” click/highlight behavior.

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime