docs(ui): canonical Button variant reference + showcase page (PMS-357) #252

Merged
nrupard merged 1 commit from feat/pms-357-button-variant-doc into main 2026-06-17 16:40:07 +02:00
Owner

What

Closes AC4 of PMS-357. The audit found the button-colour inconsistency the reviewer flagged is already resolved on main, so this PR only adds the missing reference deliverable.

Audit result (AC1-AC3 already satisfied)

  • ButtonVariant: Primary (blue, #[default]), Secondary (gray), Danger (red), Ghost (transparent), Link (blue text).
  • AC1 New Company matches New Ticket: both Primary. The "white New Company" was a pre-fix state.
  • AC2 every "New X" uses the canonical primary: 20/20 Primary, zero drift.
  • AC3 secondary actions consistent: 30/30 Cancel buttons use Secondary, zero drift.

This PR (AC4)

  • dev-docs/button-variants.md - the one correct variant per action (Primary = create/submit, Secondary = Cancel/Filter, Danger = destructive, Ghost = low-emphasis inline, Link = hyperlink-style), plus sizes, states, and review rules.
  • src/pages/button_showcase.rs + a /dev/buttons route (auth-gated) - a live render of every variant/size/state to diff a new screen against in review.

No call-site changes (none needed).

Verification

wasm cargo check, cargo clippy --target wasm32-unknown-unknown --lib -- -D warnings, and cargo fmt --all --check all pass.

#PMS-357

## What Closes AC4 of PMS-357. The audit found the button-colour inconsistency the reviewer flagged is **already resolved on main**, so this PR only adds the missing reference deliverable. ## Audit result (AC1-AC3 already satisfied) - `ButtonVariant`: `Primary` (blue, `#[default]`), `Secondary` (gray), `Danger` (red), `Ghost` (transparent), `Link` (blue text). - **AC1** New Company matches New Ticket: both `Primary`. The "white New Company" was a pre-fix state. - **AC2** every "New X" uses the canonical primary: **20/20** `Primary`, zero drift. - **AC3** secondary actions consistent: **30/30** Cancel buttons use `Secondary`, zero drift. ## This PR (AC4) - `dev-docs/button-variants.md` - the one correct variant per action (Primary = create/submit, Secondary = Cancel/Filter, Danger = destructive, Ghost = low-emphasis inline, Link = hyperlink-style), plus sizes, states, and review rules. - `src/pages/button_showcase.rs` + a `/dev/buttons` route (auth-gated) - a live render of every variant/size/state to diff a new screen against in review. No call-site changes (none needed). ## Verification wasm `cargo check`, `cargo clippy --target wasm32-unknown-unknown --lib -- -D warnings`, and `cargo fmt --all --check` all pass. #PMS-357
docs(ui): canonical Button variant reference + showcase page (PMS-357 AC4)
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 1m51s
Create release / Create release from merged PR (pull_request) Has been skipped
3ffd62d7b2
The button-colour inconsistency the review flagged (white New Company vs blue New Ticket) is already resolved on main: every "New X" create button uses ButtonVariant::Primary (20/20) and every Cancel uses Secondary (30/30), with no drift. This adds the remaining AC4 deliverable so the convention is enforceable in review.

- dev-docs/button-variants.md: documents the one correct variant per action - Primary for create/submit, Secondary for Cancel/Filter, Danger for destructive, Ghost for low-emphasis inline, Link for hyperlink-style - plus sizes, states, and review rules.
- src/pages/button_showcase.rs + /dev/buttons route (auth-gated): a live render of every variant/size/state to diff a new screen against.

No call-site changes: the audit found the create/secondary buttons already consistent, so AC1-AC3 hold as-is and this PR only closes AC4.

#PMS-357
nrupard deleted branch feat/pms-357-button-variant-doc 2026-06-17 16:40:08 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-apps!252
No description provided.