Skip to content

Cancel first in this plugin's dialogs - #1430

Merged
renemadsen merged 2 commits into
stablefrom
feat/button-order-cancel-first
Aug 24, 2026
Merged

Cancel first in this plugin's dialogs#1430
renemadsen merged 2 commits into
stablefrom
feat/button-order-cancel-first

Conversation

@renemadsen

Copy link
Copy Markdown
Member

Ordering half of the button work. Depends on microting/eform-angular-frontend#8017, which decides the convention and teaches the shared gate to enforce it.

Reorders 2 dialog action rows so the dismissing button leads.

Why this was a separate decision

The audit deliberately left ordering open: 42 core dialogs and 48 plugin dialogs rendered [Save][Cancel] against 12 the other way, so cancel-first was the minority. It is also the one button inconsistency users actually feel — it moves the button under their cursor between one dialog and the next — so it warranted a decision rather than whichever way a sweep happened to run.

It is a pure move

Whole <button> elements swap position; nothing is retyped. Verified by diffing removed against added lines in this repo — the line multisets are identical, so no id, binding, tooltip, icon or translate pipe changed in transit. That check is the point: a re-typed button is how an id silently disappears and takes an e2e selector with it.

No touched row carries cdkFocusInitial, so no autofocus target moves.

🤖 Generated with Claude Code

https://claude.ai/code/session_015sXLtgzZU8QL9m84GqMkoJ

Reorders 2 action rows so the dismissing button leads, matching the
decision now enforced by the shared gate. Cancel-first was the minority across
the platform — 42 core dialogs and 48 plugin dialogs put the confirm first —
and ordering is the one button inconsistency users actually feel, because it
moves the button under their cursor between one dialog and the next.

A pure move: whole <button> elements swapped position, nothing retyped.
Verified per repo by diffing removed against added lines — the multisets are
identical, so no id, binding, tooltip, icon or translate pipe changed in
transit. No touched row carried cdkFocusInitial, so no autofocus target moved.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015sXLtgzZU8QL9m84GqMkoJ
Copilot AI lite review requested due to automatic review settings August 24, 2026 11:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Reorders action buttons in two Workflow plugin dialogs so the dismissing action (“Cancel”) appears first, aligning dialog button ordering within the plugin with the decided convention.

Changes:

  • Swapped the order of “Cancel” and “Delete” buttons in the workflow case delete dialog.
  • Swapped the order of “Cancel” and “Assign” buttons in the “Assign site” modal.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
eform-client/src/app/plugins/modules/workflow-pn/components/workflow-cases/workflow-case-delete/workflow-case-delete.component.html Moves the Cancel button before Delete in the dialog action row.
eform-client/src/app/plugins/modules/workflow-pn/components/settings/settings-add-site-modal/settings-add-site-modal.component.html Moves the Cancel button before Assign in the dialog action row.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Review caught that this dialog was left cancel-last while its sibling
Assign-site, opened from the same Workflow Settings screen, moved to
cancel-first. Clicking one then the other would have shown Cancel jumping
sides — the exact inconsistency the reorder set out to remove.

It was missed because the row is a hand-rolled `.modal-footer` from the old
MDBootstrap dialog rather than a `mat-dialog-actions`, so the gate could not
see it. The shared checker now treats `.modal-footer` as an action row as well,
so this cannot recur silently.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015sXLtgzZU8QL9m84GqMkoJ
@renemadsen
renemadsen merged commit ae087f8 into stable Aug 24, 2026
15 checks passed
@renemadsen
renemadsen deleted the feat/button-order-cancel-first branch August 24, 2026 11:51
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.

2 participants