Skip to content

One button system: adopt the four roles and gate them in CI - #1429

Merged
renemadsen merged 1 commit into
stablefrom
feat/button-system-consolidation
Aug 24, 2026
Merged

One button system: adopt the four roles and gate them in CI#1429
renemadsen merged 1 commit into
stablefrom
feat/button-system-consolidation

Conversation

@renemadsen

Copy link
Copy Markdown
Member

Plugin half of the button consolidation. Depends on microting/eform-angular-frontend#8016, already merged to stable, which defines the roles and ships the checker.

Audit: Button Drift

What changes

9 dialog buttons move to the four roles: .btn-primary (filled), .btn-cancel (outlined), .btn-delete (destructive), .btn-quiet (text). Every id, binding, tooltip, label and button order is preserved — only the Material directive and its color input go, and color was inert on a plain button anyway.

Role follows the label and intent, not the old colour. Several confirms carried color="warn" without being destructive and are .btn-primary.

Why the CI step matters more than the conversion

The checker lives in the frontend repo, but a frontend CI run cannot see these templatessrc/app/plugins/ is gitignored there, so its checkout contains only the core app. The frontend PR fixed 55 violations in core and was structurally incapable of seeing the 91 in the plugins.

So each plugin repo has to run the checker over its own module, or nothing checks its buttons and they drift straight back. That step is added to both workflows here.

What it enforces

Inside a mat-dialog-actions row, every button must carry one of the four roles; no template may reference a class no stylesheet defines. Material's button directives are rejected in both spellings — the theme override targeted .mat-mdc-text-button, which Angular Material 20 never emits, so mat-button rendered as a pill in the wrong colour and always had.

🤖 Generated with Claude Code

https://claude.ai/code/session_015sXLtgzZU8QL9m84GqMkoJ

Converts 9 dialog buttons to the four roles the frontend defines —
.btn-primary, .btn-cancel, .btn-delete, .btn-quiet. Every id, binding, label
and button order preserved; only the Material directive and its inert `color`
input are removed. Role follows the label and intent, not the old colour.

Also adds the gate to both workflows, which is the part that keeps this fixed.
The checker lives in the frontend repo, but a frontend CI run cannot see these
templates — src/app/plugins/ is gitignored there — so without this step nothing
checks workflow-pn's buttons and they drift straight back.

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 10:03

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

Updates the workflow plugin’s UI templates to use the shared “one button system” roles and adds a CI gate (via the frontend repo’s checker) to prevent button-style drift in plugin templates.

Changes:

  • Replaced Angular Material/MDBootstrap button directives/classes in several plugin dialogs/modals with the standardized role classes (btn-primary, btn-cancel, btn-delete).
  • Added a “Button conventions” CI step to both PR and master workflows to run the frontend checker against this plugin’s module templates.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
eform-client/src/app/plugins/modules/workflow-pn/components/workflow-cases/workflow-case-delete/workflow-case-delete.component.html Converts dialog action buttons to role-based classes.
eform-client/src/app/plugins/modules/workflow-pn/components/settings/settings-remove-site-modal/settings-remove-site-modal.component.html Removes mdbBtn / old Bootstrap button classes and applies role-based button classes.
eform-client/src/app/plugins/modules/workflow-pn/components/settings/settings-add-site-modal/settings-add-site-modal.component.html Converts dialog action buttons to role-based classes.
.github/workflows/dotnet-core-pr.yml Adds CI button-conventions check for the plugin module (stable frontend checkout).
.github/workflows/dotnet-core-master.yml Adds CI button-conventions check for the plugin module (branch-aligned frontend checkout).

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

Comment on lines +41 to +45
- name: Button conventions
# The checker lives in the frontend repo (checked out above); these
# templates are ours. A frontend CI run cannot see them because
# src/app/plugins/ is gitignored there, so this plugin has to run it.
run: cd eform-angular-frontend/eform-client && node scripts/check-button-conventions.js src/app/plugins/modules/workflow-pn
@renemadsen
renemadsen merged commit 8671ab7 into stable Aug 24, 2026
9 checks passed
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