Skip to content

feat(fwc26): add copy-to-clipboard buttons to SlaCard with success fe… - #823

Open
Legit003 wants to merge 1 commit into
CalloraOrg:mainfrom
Legit003:feat/fwc26-sla-copy-to-clipboard
Open

feat(fwc26): add copy-to-clipboard buttons to SlaCard with success fe…#823
Legit003 wants to merge 1 commit into
CalloraOrg:mainfrom
Legit003:feat/fwc26-sla-copy-to-clipboard

Conversation

@Legit003

Copy link
Copy Markdown

…edback

  • Implement useCopy hook (src/hooks/useCopy.ts) with:

    • handleCopy(text) API with async Clipboard API + execCommand fallback
    • copied boolean (true for 2s after success) for UI feedback
    • supported boolean to gate copy UI in unsupported environments
    • Timer restart on rapid re-clicks; cleanup on unmount
  • Add SlaCard page (src/pages/SlaCard.tsx) at /marketplace/grantfox-wave-compute/sla with:

    • Per-value copy buttons for all 8 SLA metrics
    • Green CheckIcon + 'Copied!' label on success
    • aria-live='polite' region per row for screen-reader announcements
    • Design-token-only colours; responsive single/two-column layout
    • WCAG 2.1 AA: focus ring, aria-labels, min touch target size
  • Register route in App.tsx

  • Update EmptyState to use new handleCopy API (keeps supported guard)

  • Add docs/SlaCard-CopyToClipboard.md with API, a11y, and token docs

  • 91 tests passing (7 useCopy, 22 SlaCard, 62 EmptyState)

Closes #713

…edback

- Implement useCopy hook (src/hooks/useCopy.ts) with:
  - handleCopy(text) API with async Clipboard API + execCommand fallback
  - copied boolean (true for 2s after success) for UI feedback
  - supported boolean to gate copy UI in unsupported environments
  - Timer restart on rapid re-clicks; cleanup on unmount

- Add SlaCard page (src/pages/SlaCard.tsx) at
  /marketplace/grantfox-wave-compute/sla with:
  - Per-value copy buttons for all 8 SLA metrics
  - Green CheckIcon + 'Copied!' label on success
  - aria-live='polite' region per row for screen-reader announcements
  - Design-token-only colours; responsive single/two-column layout
  - WCAG 2.1 AA: focus ring, aria-labels, min touch target size

- Register route in App.tsx
- Update EmptyState to use new handleCopy API (keeps supported guard)
- Add docs/SlaCard-CopyToClipboard.md with API, a11y, and token docs
- 91 tests passing (7 useCopy, 22 SlaCard, 62 EmptyState)

Closes CalloraOrg#545
@drips-wave

drips-wave Bot commented Jul 28, 2026

Copy link
Copy Markdown

@Legit003 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

Add copy-to-clipboard affordance on SlaCard [b#036]

1 participant