fix(ui): route component-site link chips through Button{Link} #480

Merged
nrupard merged 1 commit from fix/MAPPS-416-link-chips into main 2026-08-05 20:05:21 +02:00
Owner

Implements MAPPS-416 (follow-up to MAPPS-407 F10): routes the four remaining button-role link-styled controls in src/components/ through the shared Button { variant: Link }, so no ad-hoc text-accent link copies remain.

Change

  • The three entity-picker "Change" chips (company_picker, contact_picker, asset_picker), previously raw button elements with text-xs text-accent hover:opacity-90 px-2 py-1, now use Button { variant: ButtonVariant::Link, size: ButtonSize::Small }, gaining the shared focus ring and rounded shape while keeping their exact onclick behavior.
  • The context_filter_banner "Clear filter x" control also migrates. It relied on an aria_label (its visible text ends in a decorative "x"), which the shared Button did not expose, so this adds an optional aria_label: Option<String> prop to Button (emitted as aria-label, mirroring the existing title prop exactly) and passes it through. That keeps the accessible name and eliminates the last raw copy.

Verification

Diff-reviewed (no local cargo): a grep for text-accent hover:opacity-90 in src/components/ now returns zero raw chips; the other picker buttons (dropdown items, unassign) are a different pattern and out of scope; every added Button/ButtonVariant/ButtonSize import is used (no orphans); the new aria_label prop is additive and optional, so existing Button call sites are unaffected (omitted -> None -> attribute dropped, like title). No em-dash. CI runs fmt/clippy(-D warnings)/wasm-build/tests.

#MAPPS-416

Implements MAPPS-416 (follow-up to MAPPS-407 F10): routes the four remaining button-role link-styled controls in `src/components/` through the shared `Button { variant: Link }`, so no ad-hoc text-accent link copies remain. ## Change - The three entity-picker "Change" chips (`company_picker`, `contact_picker`, `asset_picker`), previously raw `button` elements with `text-xs text-accent hover:opacity-90 px-2 py-1`, now use `Button { variant: ButtonVariant::Link, size: ButtonSize::Small }`, gaining the shared focus ring and rounded shape while keeping their exact onclick behavior. - The `context_filter_banner` "Clear filter x" control also migrates. It relied on an `aria_label` (its visible text ends in a decorative "x"), which the shared `Button` did not expose, so this adds an optional `aria_label: Option<String>` prop to `Button` (emitted as `aria-label`, mirroring the existing `title` prop exactly) and passes it through. That keeps the accessible name and eliminates the last raw copy. ## Verification Diff-reviewed (no local cargo): a grep for `text-accent hover:opacity-90` in `src/components/` now returns zero raw chips; the other picker buttons (dropdown items, unassign) are a different pattern and out of scope; every added `Button`/`ButtonVariant`/`ButtonSize` import is used (no orphans); the new `aria_label` prop is additive and optional, so existing `Button` call sites are unaffected (omitted -> None -> attribute dropped, like `title`). No em-dash. CI runs fmt/clippy(-D warnings)/wasm-build/tests. #MAPPS-416
fix(ui): route component-site link chips through Button{Link}
All checks were successful
Check / fmt + clippy + tests (pull_request) Successful in 1m33s
Create release / Create release from merged PR (pull_request) Has been skipped
d47ce69ebc
Implements MAPPS-416 (follow-up to MAPPS-407 F10). The three entity-picker "Change" chips and the context-filter-banner "Clear filter" control were raw button-role text-accent links; they now use Button { variant: Link, size: Small }. The banner control needs an accessible label (its visible text ends in a decorative multiplication sign), so this adds an optional aria_label prop to the shared Button (emitted as aria-label, mirroring the existing title prop) and routes the control through it, eliminating the last raw copy.

#MAPPS-416
nrupard deleted branch fix/MAPPS-416-link-chips 2026-08-05 20:05:21 +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!480
No description provided.