feat(status): add pending/retrying/confirmed status variants to OnChainStatusBadge (Closes #478) - #581
Open
laurentketterle-hub wants to merge 2 commits into
Conversation
…sBadge (Closes RevoraOrg#478) - Add status field to OnChainMetadata ('pending' | 'retrying' | 'confirmed') - Visual variants: amber (pending), indigo (retrying), green (confirmed) - Status-aware label: 'Pending', 'Retrying', 'Confirmed (N)' - Backward compatible: defaults to 'On-chain' when no status provided - CSS variables for variant-specific colors (bg, border, fg, hover, focus-ring) - 8 new tests covering all variants and backward compatibility - 17/18 tests pass (1 pre-existing spy mock issue unrelated)
Contributor
Author
|
I claim this bounty. PR ready for review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds visual status variants to
OnChainStatusBadgefor pending, retrying, and confirmed on-chain transaction states (Issue #478).Features
statusfield onOnChainMetadata:'pending' | 'retrying' | 'confirmed'--ocb-badge--pending(amber bg/border/fg)--ocb-badge--retrying(indigo bg/border/fg)--ocb-badge--confirmed(emerald bg/border/fg)--ocb-badge-bg,--ocb-badge-border,--ocb-badge-fg, hover/focus-ring statesChanges
OnChainStatusBadge.tsx: +18 lines (status interface, variant config, dynamic label)OnChainStatusBadge.css: +29 lines (3 variant class sets)OnChainStatusBadge.test.tsx: +48 lines (8 new tests)Test Results
Verification
npm install && npx vitest run src/components/StatusTimeline/OnChainStatusBadge.test.tsx