Skip to content

ui: a document's footer offers a clear Finish, and workflow tasks leave the editor footer for the Inbox (#7403) - #7404

Closed
NicoleNG18 wants to merge 5 commits into
eclipse-dirigible:masterfrom
NicoleNG18:issue-7403-document-footer-finish
Closed

NicoleNG18 wants to merge 5 commits into
eclipse-dirigible:masterfrom
NicoleNG18:issue-7403-document-footer-finish

Conversation

@NicoleNG18

Copy link
Copy Markdown
Contributor

Cause

On a generated document (header-items) entity the editing footer is confusing to a non-developer:

  1. Save greys out after you add line items. Each line item persists the moment you add it (its own POST/PUT), so the header form is clean and the guard state === 'saving' || (isEdit && !isDirty()) disables Save. Correct, but it reads as "stuck", with no signal that the items are already saved.
  2. No clear "I'm done", and two competing primaries. The footer mixed workflow (Approve/Issue user-tasks), utilities (Print/Duplicate/…) and the editing session, with two primary buttons (a BPM task and Save).

The Approve/Issue buttons are only an inline mirror of the Process Inbox$store.processTasks.getTasks(form) reads /services/inbox/tasks and also feeds the notification bell — so the tasks already live in the Inbox and the bell independently.

Change

Separate authoring the document (editor) from advancing its lifecycle (Inbox):

  • Remove the BPM user-task buttons from the record-editor footers (power document-view, plain form-view). Nothing is lost — the Inbox and the bell keep them. The master-detail read view keeps its inline task surfacing (that is not an editor footer, so it is out of scope).
  • Document entities get one honest primary: Create (persist the header, then STAY so line items can be added) on create; Finish (save any header change, then return to the list) once saved. finish() only navigates on a successful save — a failed validation keeps the user on the page with the error. Never a greyed Save.
  • Discard/Cancel shows only while the header has unsaved edits; a clean saved document yields to Finish. Preview (immutable) footer unchanged.
  • Applied across the power, my and partner document views + pages, and the plain form footer; finish added to the shared defaults catalog.

Files: perspective/document/{document-view.html,document-page.js}, perspective/manage/form-view.html, my/{my-document-view.html,my-document-page.js}, partner/{partner-document-view.html,partner-document-page.js}, ui/translations.json — all .template.

Deliberately reverses two earlier choices, for these editors only

Deferred (not blocking)

The issue also proposed folding the utilities (Print/Duplicate/dev actions) into a ⋯ More overflow menu. Removing the Approve blue button already makes Create/Finish the lone primary (the utilities are non-primary outline buttons), so the reported problem is fully resolved without it. The overflow is a cosmetic de-clutter I left out here because a footer dropdown menu can't be verified without a browser; it can follow as a small enhancement.

Verification

  • ModelGenerationIT green — Tests run: 1, Failures: 0, Errors: 0 (renders every template twice; descriptor + cross-project entity extension asserted).
  • Reactor quick-build installBUILD SUCCESS.
  • formatter:validate on the changed module (cache wiped) — BUILD SUCCESS.
  • Not verified in a live browser (template change; no UI IT added). The runtime finish()/footer behaviour is straightforward Alpine, but a follow-up UI IT would be worthwhile.

Fixes #7403

🤖 Generated with Claude Code

NicoleNG18 and others added 5 commits September 16, 2026 00:06
…ve the editor footer for the Inbox (eclipse-dirigible#7403)

On a generated document (header-items) entity the editing footer confused a
non-developer: line items persist the moment they are added (each row is its own
POST/PUT), so the header form is clean and the Save guard `isEdit && !isDirty()`
greys Save out - correct, but it reads as "stuck". The footer also mixed workflow
(Approve/Issue user-tasks), utilities (Print/Duplicate/...) and the editing
session, with two primary buttons (a BPM task and Save) competing for "which one
finishes this?".

Separate authoring the document from advancing its lifecycle:

- Remove the BPM user-task buttons from the record-editor footers (power document
  and plain form). They are only an inline mirror of the Process Inbox - the same
  tasks come from /services/inbox/tasks and feed the notification bell - so the
  Inbox and the bell keep them; nothing is lost. The master-detail read view keeps
  its inline task surfacing (that is not an editor footer).
- Document entities get one honest primary: Create (persist the header, then STAY
  so line items can be added) on create, and Finish (save any header change, then
  return to the list) once saved. Finish only navigates on a successful save - a
  failed validation keeps the user on the page with the error. Never a greyed Save.
- Discard/Cancel is shown only while the header has unsaved edits; a clean saved
  document yields to Finish. Preview (immutable) footer unchanged.
- Applied to the power, my and partner document views + pages, and the plain form
  footer; `finish` added to the shared defaults catalog.

Deliberately reverses two earlier choices for these editors: eclipse-dirigible#7359 (Save stayed on
the document - Finish navigates away after saving, but the unsaved-changes guard
still applies) and eclipse-dirigible#6074 (inline task surfacing - workflow moves to the Inbox).

Verified: ModelGenerationIT green (every template renders twice, descriptor +
cross-project entity extension asserted); reactor quick-build SUCCESS;
formatter:validate SUCCESS on the changed module.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…lipse-dirigible#7403)

The first cut hid the Cancel/Discard button once a saved document was clean, on the
reasoning that Finish already returns to the list. But that left no explicit exit in
the common state (after adding line items) and made Finish conflate "leave" with
"done". Restore the always-visible escape hatch that every other view has: Cancel a
clean document, Discard unsaved header edits (the label flips on isDirty()), shown
next to Create/Finish. Power, my and partner document views.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…s Save (eclipse-dirigible#7403)

Finish is the right primary while CREATING a document with line items (add the
header, then add items whose greyed Save was the original complaint), but wrong when
editing an existing one - there "Finish" reads as completing a creation that already
happened. Track whether the session began on the create route (createFlow, kept true
after the header save flips mode to 'edit'): the create flow shows Finish, an
existing document opened for editing shows the normal Save (updates the header, stays
on the page, disabled when nothing changed). Cancel/Discard stays always visible.
Power, my and partner document views + pages.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…pse-dirigible#7403)

Editing an existing document showed Save, but it saved and stayed on the page (the
eclipse-dirigible#7359 behaviour) and greyed out when nothing had changed - so after opening a saved
invoice there was no working primary that returned to the list. Point the edit-mode
Save at finish() (save any header change, then back to the list; a failed check keeps
the user on the page) and stop greying it. Create still stays on the document so line
items can be added; Finish (create flow) and Save (editing) now both save-and-return,
differing only in label. Power, my and partner document views.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…clipse-dirigible#7403)

The power Create button navigates to the /edit route, which re-mounts the page with
an id present, so createFlow re-computed to false and Finish never appeared - the
add-items phase looked identical to editing an existing document. Carry the signal
across the route change with a ?created=1 flag the Create navigation adds and init
reads, so the re-mounted /edit page still shows Finish while its line items are added;
reopening the document later from the list has no flag and shows Save. The my/partner
variants use a silent replaceState and were unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ui: a document's footer offers a clear "Finish", and workflow tasks leave the editor footer for the Inbox

1 participant