fix(admin): use btn-primary/btn-cancel in confirm-email modal - #8025
Merged
Conversation
94bba87 added the confirm-email dialog with two `<button mat-raised-button>` in its action row. Material button directives are not part of this app's button system — the theme override targets `.mat-mdc-text-button`, which Angular Material 20 never emits — so `scripts/check-button-conventions.js` flags them and the repo-wide `button-conventions` job has been red on `stable` ever since, blocking every PR. Convert both to the house classes, matching the sibling dialogs in the same folder (remove-user-modal, user-set-password, user-modal): `.btn-cancel` for the dismissing action and `.btn-primary` for the confirming one. Confirming email is affirmative, not destructive, so `.btn-primary` is the right slot. Reorder to the CI-enforced order — cancel first, confirming action rightmost. The ids are unchanged and no e2e spec in this repo or the sibling plugin repos references them, so nothing is clicking through the removed `.mdc-button__label`. The component's stylesheet is empty, and both `.btn-primary` and `.btn-cancel` are defined globally and re-declared under `theme-workspace`, so the dialog holds under both themes. `node scripts/check-button-conventions.js src/app`: 2 violations before, 0 across 174 templates after. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015sXLtgzZU8QL9m84GqMkoJ
There was a problem hiding this comment.
🟢 Approval recommended
The change is a small, localized template update that aligns with existing dialog patterns in the same area and addresses the stated CI enforcement issue without altering behavior-critical selectors (button ids remain unchanged).
Pull request overview
This PR updates the Account Management “Confirm email” dialog to comply with the repo-wide button conventions enforced by CI, unblocking the button-conventions job by removing disallowed Angular Material button directives from a mat-dialog-actions row.
Changes:
- Replaced
mat-raised-buttonusage in the confirm-email modal with house button classes (.btn-cancel,.btn-primary). - Reordered actions so Cancel comes first and the confirming action is rightmost (as required by the conventions check).
File summaries
| File | Description |
|---|---|
| eform-client/src/app/modules/account-management/components/users/confirm-email-modal/confirm-email-modal.component.html | Converts dialog action buttons to .btn-cancel/.btn-primary and enforces Cancel-first ordering to satisfy CI button conventions. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The repo-wide
button-conventionscheck has been red onstablefor 5 consecutive runs, blocking every PR in the repo — including #8024.Root cause:
94bba87d7("feat(admin): add confirm-email button to Settings → Users") addedconfirm-email-modal.component.htmlwith two<button mat-raised-button>in itsmat-dialog-actionsrow.eform-client/scripts/check-button-conventions.js(run by thebutton-conventionsjob in bothdotnet-core-pr.ymlanddotnet-core-master.yml) bans Material button directives in dialog action rows: the theme's override targets.mat-mdc-text-button, a class Angular Material 20 never emits, somat-*-buttonsilently renders as a pill in the wrong colour.What
Converted both buttons to the house classes, matching the sibling dialogs in the same folder (
remove-user-modal,user-set-password,user-modal):.btn-cancelfor the dismissing action.btn-primaryfor the confirming action — confirming an email is affirmative, not destructive, so.btn-deletewould be wrongAlso reordered to the CI-enforced order: cancel first, confirming action rightmost. (The original had Confirm before Cancel; that ordering only escaped the
cancel-not-firstrule because neither button carried an approved class.)Verification
cd eform-client && node scripts/check-button-conventions.js src/appmaterial-button-in-dialog, lines 25 and 33) across 174 templatesButton conventions: OK — no violations.Risk checks
.mdc-button__labelinner element, which can hang specs that click through it. Both ids (userConfirmEmailBtn,userConfirmEmailCancelBtn) are unchanged, and a grep across this repo'se2e/,playwright/andcypress/trees and all sibling plugin repos in the workspace found no reference to either id, and no reference to.mdc-button__labeloutside SCSS and build output. Nothing targets these buttons..btn-primaryand.btn-cancelare both defined at top level inscss/styles.scss(covering the defaulttheme-eform) and re-declared undertheme-workspaceinscss/components/_workspace-mat-overrides.scss. Row spacing also comes from the theme (.mat-mdc-dialog-actions { gap: 10px }undertheme-eform,.mdc-dialog__actions { gap: 8px }undertheme-workspace), so no extra gap utility is needed — same asremove-user-modal.🤖 Generated with Claude Code
https://claude.ai/code/session_015sXLtgzZU8QL9m84GqMkoJ