Skip to content

Cancel first in this plugin's dialogs - #1688

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

Cancel first in this plugin's dialogs#1688
renemadsen merged 1 commit 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 13 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 13 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

This PR standardizes dialog action ordering within the time-planning plugin by moving the dismissing action (Cancel/Close) to appear before the primary/destructive action across the affected modals, aligning with the “cancel first” convention referenced in the PR description.

Changes:

  • Reordered action buttons in 13 Angular Material dialog templates so the dismissing action leads.
  • Kept button contents/handlers/ids intact while swapping whole <button> elements to avoid selector regressions.
  • Applied the same ordering across Working Hours, Registration Devices, Flexes, Break Policies, and Absence Requests dialogs.

Reviewed changes

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

Show a summary per file
File Description
eform-client/src/app/plugins/modules/time-planning-pn/modules/working-hours/components/working-hours-actions/working-hours-upload-modal/working-hours-upload-modal.component.html Moves “Close” before “Upload” in the upload modal actions.
eform-client/src/app/plugins/modules/time-planning-pn/modules/working-hours/components/working-hours-actions/working-hours-comment-office-update-modal/working-hours-comment-office-update-modal.component.html Moves “Cancel” before “OK” in the comment office update modal.
eform-client/src/app/plugins/modules/time-planning-pn/modules/working-hours/components/working-hours-actions/working-hours-comment-office-all-update-modal/working-hours-comment-office-all-update-modal.component.html Moves “Cancel” before “Save” in the comment office-all update modal.
eform-client/src/app/plugins/modules/time-planning-pn/modules/registration-devices/components/registration-devices-actions/registration-devices-otp-code/registration-devices-otp-code.component.html Moves “Cancel” before “OK” in the OTP warning modal.
eform-client/src/app/plugins/modules/time-planning-pn/modules/registration-devices/components/registration-devices-actions/registration-devices-edit-modal/registration-devices-edit-modal.component.html Moves “Cancel” before “Update” in the edit modal.
eform-client/src/app/plugins/modules/time-planning-pn/modules/registration-devices/components/registration-devices-actions/registration-devices-create-modal/registration-devices-create-modal.component.html Moves “Cancel” before “Create” in the create modal.
eform-client/src/app/plugins/modules/time-planning-pn/modules/flexes/components/time-flexes-actions/comment-office-update-modal/time-flexes-comment-office-update-modal.component.html Moves “Cancel” before “OK” in the flex comment office update modal.
eform-client/src/app/plugins/modules/time-planning-pn/modules/flexes/components/time-flexes-actions/comment-office-all-update-modal/time-flexes-comment-office-all-update-modal.component.html Moves “Cancel” before “Save” in the flex comment office-all update modal.
eform-client/src/app/plugins/modules/time-planning-pn/modules/break-policies/components/break-policies-edit-modal/break-policies-edit-modal.component.html Moves “Cancel” before “Save” in the break policy edit modal.
eform-client/src/app/plugins/modules/time-planning-pn/modules/break-policies/components/break-policies-delete-modal/break-policies-delete-modal.component.html Moves “Cancel” before “Delete” in the break policy delete modal.
eform-client/src/app/plugins/modules/time-planning-pn/modules/break-policies/components/break-policies-create-modal/break-policies-create-modal.component.html Moves “Cancel” before “Create” in the break policy create modal.
eform-client/src/app/plugins/modules/time-planning-pn/modules/absence-requests/components/absence-requests-actions/absence-requests-reject-modal/absence-requests-reject-modal.component.html Moves “Cancel” before “Reject” in the absence reject modal.
eform-client/src/app/plugins/modules/time-planning-pn/modules/absence-requests/components/absence-requests-actions/absence-requests-approve-modal/absence-requests-approve-modal.component.html Moves “Cancel” before “Approve” in the absence approve modal.

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

@renemadsen
renemadsen merged commit f84bed1 into stable Aug 24, 2026
78 checks passed
@renemadsen
renemadsen deleted the feat/button-order-cancel-first branch August 24, 2026 12:01
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