Skip to content

feat(fwc26): hover/focus PreviewCard on BillingHistory - #839

Merged
greatest0fallt1me merged 3 commits into
CalloraOrg:mainfrom
obafemimathew01-hue:feat/fwc26-billing-history-preview-card
Jul 29, 2026
Merged

feat(fwc26): hover/focus PreviewCard on BillingHistory#839
greatest0fallt1me merged 3 commits into
CalloraOrg:mainfrom
obafemimathew01-hue:feat/fwc26-billing-history-preview-card

Conversation

@obafemimathew01-hue

Copy link
Copy Markdown
Contributor

feat(fwc26): Hover-triggered PreviewCard on BillingHistory with keyboard-accessible alternative

Summary

Implements the GrantFox FWC26 UI/UX requirement: each transaction row on the new Billing
History page reveals a compact floating preview card on hover or keyboard focus, surfacing
on-chain details without navigating away.

Changes

src/components/PreviewCard.tsx

Extended PreviewCardData with 7 billing-specific fields: txHash, network, confirmations, type,
amount, direction, and timestamp. A isBillingCard flag auto-selects the billing layout when any
of those fields are present — existing dashboard callers are unaffected.

src/pages/BillingHistory.tsx (new)
Billing history page at /billing/history. Renders a responsive, filterable transaction table
(filter by type, status, direction, and free-text search). Each row's description cell is
wrapped in a PreviewCard trigger that opens on hover or focus and shows the tx hash, network,
confirmation count, direction badge, USDC amount, and timestamp.

src/App.tsx

Registered the /billing/history route, added a NavLink in the primary nav, and added page
title/description map entries.

docs/BillingHistoryPreview.md (new)
Full API reference for the new PreviewCardData billing fields, BillingHistory exports, WCAG
compliance table, design-token usage, and responsive notes.

Accessibility (WCAG 2.1 AA)

┌────────────────────┬──────────────────────────────────────────────────────────────────────┐
│ Criterion │ How it's met │
├────────────────────┼──────────────────────────────────────────────────────────────────────┤
│ 1.4.1 Use of Color │ Direction shown as text badge ("↑ credit" / "↓ debit"), not colour │
│ │ alone; StatusBadge adds texture pattern │
├────────────────────┼──────────────────────────────────────────────────────────────────────┤
│ 2.1.1 Keyboard │ All triggers are tabIndex={0} role="button"; Tab opens preview, │
│ │ Escape closes and restores focus │
├─────────────────────────┼─────────────────────────────────────────────────────────────────┤
│ 2.4.3 Focus Order │ suppressNextFocus guard prevents Escape → focus from │
│ │ immediately re-opening the panel │
├─────────────────────────┼─────────────────────────────────────────────────────────────────┤
│ 4.1.2 Name, Role, Value │ Trigger: aria-label, aria-describedby. Panel: role="tooltip", │
│ │ aria-label │
├─────────────────────────┼─────────────────────────────────────────────────────────────────┤
│ 4.1.3 Status Messages │ Filter changes announced via role="status" aria-live="polite" │
└─────────────────────────┴─────────────────────────────────────────────────────────────────┘

Tests

56 new focused tests, all passing:

  • src/components/PreviewCard.test.tsx — 25 tests covering shared behaviour, dashboard mode, and
    billing mode (FWC26)
  • src/pages/BillingHistory.test.tsx — 31 tests covering page structure, hover/focus
    integration, all filter variants, empty state, ARIA semantics, and table content

Test Files 2 passed (2)
Tests 56 passed (56)

What was not changed

No existing tests were broken. Pre-existing failures in ApiCard, EmptyState, and FiltersSidebar
are unrelated to this PR.
closes #709

Closes #FWC26

- Extend PreviewCardData with billing fields: txHash, network,
  confirmations, type, amount, direction, timestamp
- Auto-detect billing mode; existing dashboard callers unaffected
- Add BillingHistory page at /billing/history with filterable
  transaction table; each row triggers PreviewCard on hover/focus
- Keyboard accessible: Tab to focus opens preview, Escape closes
  it and restores focus to the trigger (WCAG 2.1 AA)
- aria-live polite region announces filter changes to screen readers
- StatusBadge on every row (pattern + colour, WCAG 1.4.1)
- Register route in App.tsx with NavLink and page title/description
- 56 focused tests (25 PreviewCard + 31 BillingHistory), all passing
- Add docs/BillingHistoryPreview.md with API reference and a11y notes
@drips-wave

drips-wave Bot commented Jul 29, 2026

Copy link
Copy Markdown

@obafemimathew01-hue 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

@greatest0fallt1me

Copy link
Copy Markdown
Contributor

Merged into main via admin resolver (-X theirs).

@greatest0fallt1me
greatest0fallt1me merged commit 1be8336 into CalloraOrg:main Jul 29, 2026
3 checks passed
@greatest0fallt1me

Copy link
Copy Markdown
Contributor

Green across the board — merging. Thanks!

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 hover-preview card on BillingHistory rows/cards [b#032]

2 participants