Skip to content

feat(ux): add processing/loading state to BillingProfileCard (#273)#424

Open
jd5073356-max wants to merge 1 commit into
Grainlify:mainfrom
jd5073356-max:ux/billingprofilecard-loading
Open

feat(ux): add processing/loading state to BillingProfileCard (#273)#424
jd5073356-max wants to merge 1 commit into
Grainlify:mainfrom
jd5073356-max:ux/billingprofilecard-loading

Conversation

@jd5073356-max

Copy link
Copy Markdown

Adds optional isProcessing prop: spinner via Loader2 (role=status), aria-busy, disabled controls (pointer-events-none/reduced opacity), and click guard. Reuses the established pattern from ApplicationCard.tsx.

Verification:

  • typecheck: OK
  • new BillingProfileCard.test.tsx: 7/7 green
  • coverage: 100% lines of touched file
  • genuinity check: tests fail without the change

Closes #273

…fy#273)

BillingProfileCard had no in-card feedback while an action was processing,
so the card looked idle and could be clicked repeatedly.

- Add an optional `isProcessing` prop (default false).
- While processing: show a Loader2 spinner, set `aria-busy`, dim and disable
  the card (pointer-events-none), and guard the click handler so the action
  cannot be triggered twice.
- Restore the normal interactive state when processing completes.
- Keep the colorblind-safe status badges intact.

Adds BillingProfileCard.test.tsx covering normal/processing states, duplicate
activation prevention, status badges, type label and dark theme.

Closes Grainlify#273
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.

Make BillingProfileCard show a loading state while a profile action is processing

1 participant