Skip to content

Phase2/Replace legacy btn-danger markup with design tokens - #5

Merged
Rodern merged 2 commits into
masterfrom
phase2/replace-btn-danger
Aug 24, 2026
Merged

Phase2/Replace legacy btn-danger markup with design tokens#5
Rodern merged 2 commits into
masterfrom
phase2/replace-btn-danger

Conversation

@Rodern

@Rodern Rodern commented Aug 24, 2026

Copy link
Copy Markdown
Member

Summary
Replace a small set of legacy markup usages of the Bootstrap-style "btn-danger" with the project’s design-token classes so destructive actions align with the design system. This is a surgical, low-risk markup-only change set that maps destructive buttons to the design tokens while intentionally leaving page-local CSS helper classes untouched for a separate follow-up refactor.

What changed

  • Markup mapping:
    • class="btn-danger" → class="button-command danger" for destructive submit / inline actions (confirmation buttons and destructive flows).
    • class="btn-icon btn-danger" → class="btn-icon danger" for icon-delete buttons (preserve btn-icon helper).
  • The edits are limited to HTML class attributes — no global CSS files were modified in this PR.
  • Page-local CSS selectors and custom helper classes were left unchanged (e.g. supplier-btn-danger, crm-btn-danger, and page-scoped .btn-danger rules). These require a deliberate CSS refactor and will be addressed in a follow-up PR.

Files touched (high level)

  • Profile page: Store.UI/Pages/Profile.cshtml — disable 2FA flows, passkey removal, revoke sessions confirmations, and related submit buttons updated.
  • Batch tracking: Store.UI/Pages/BatchTracking.cshtml — delete icon button updated.
  • Branch admin: Store.UI/Pages/BranchAdmin.cshtml — revoke action updated.
  • Other small pages: a few additional conservative, per-line updates. See commit for the full file list and exact diffs.

Why

  • Aligns destructive action markup with the canonical design-system tokens (button semantics and visual language).
  • Reduces future drift between ad-hoc Bootstrap classes and the design tokens defined in components.css.
  • Keeps the change small and reviewable to reduce visual regression risk.

Risk / scope

  • Low risk: only class attributes changed; no CSS file changes in this PR.
  • Possible visual differences if page-level CSS rules targeted the old class; QA required to confirm appearance is unchanged.
  • Custom page helper classes were intentionally not mass-replaced to avoid unintended visual regressions — those require a separate refactor of the corresponding CSS.

Testing checklist (suggested)

  1. Build and run locally
    • dotnet build StoreProject.sln
    • Launch the Store.UI app (debug or run)
  2. Smoke-test affected flows
    • Profile page
      • Disable 2FA blade: open, confirm modal — verify button shows danger styling and works
      • Registered passkeys: click Remove → confirm blade/flow
      • Sign Out All flow: open blade and confirm
    • Batch Tracking
      • Click the Delete icon on a sample batch — confirm confirmDelete behavior and danger styling
    • Branch Admin
      • Attempt to revoke an assignment — confirm the button appearance and form submission works
  3. Visual checks
    • Confirm danger styling (color, hover, spacing) looks correct and matches other danger tokens in components.css
    • Confirm size modifiers (e.g., btn-sm) are preserved where relevant
  4. Functional checks
    • Ensure no JS event handlers were tied to the old class names in a way that would break functionality
    • Verify server-side form submissions and anti-forgery tokens are still functioning for changed submit buttons
  5. QA signoff
    • Manual visual QA of the above flows; if available, a visual snapshot or quick human QA pass.

Notes & follow-ups

  • This PR intentionally does not refactor page-local CSS helper classes (supplier-btn-danger, crm-btn-danger) or inline .btn-danger CSS rules. Those require:
    1. moving visual rules to components.css (or tokens.css) and
    2. replacing helper class usages across pages.
      Plan and a smaller PR for that follow-up are recommended to avoid visual regressions.
  • Commit includes the required Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com trailer.

How to revert

  • If needed, revert the branch or perform:
    • git checkout master
    • git revert (or revert PR on GitHub)

Reviewer guidance

  • Focus on visual parity and behavior for the flows listed in the testing checklist.
  • If a destructive button appears incorrect, please note the page and expected behavior so it can be reverted or fixed quickly.

References

  • docs/design_system_specification.md — canonical tokens and component guidance
  • docs/design_consistency_report.md — audit and page checklist used to prioritize these changes

Rodern and others added 2 commits August 24, 2026 15:08
…sages with design tokens on key pages

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…estructive markup class usages to design-token classes: use 'button-command danger' for destructive submit/inline actions and 'btn-icon danger' for icon delete buttons. Leave page-local CSS helper classes (supplier-btn-danger, crm-btn-danger) for a follow-up refactor.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vercel

vercel Bot commented Aug 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
store-project Error Error Aug 24, 2026 3:16pm

@Rodern
Rodern merged commit 18ca16b into master Aug 24, 2026
2 of 3 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.

1 participant