Feature/frontend bridge summary cards#581
Open
Amas-01 wants to merge 3 commits into
Open
Conversation
Add deactivate_asset and restore_asset functions to Asset Registry contract - Add Deactivated status to AssetStatus enum - Add deactivate_asset function to transition Active assets to Deactivated state - Add restore_asset function to transition Deactivated assets back to Active state - Add AssetAlreadyActive (code 21) and AssetNotDeactivated (code 22) error variants - All historical metadata, compliance records, and associations are preserved during deactivation/restoration - Update lifecycle transition rules to include Active <-> Deactivated transitions - Add 11 comprehensive test cases covering happy path, error conditions, authorization, idempotency, and state continuity - Emit asset_deact and asset_rest events with admin as data payload - Include full documentation with state continuity guarantees Fixes StellaBridge#524
|
@Amas-01 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! 🚀 |
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.
Bridge Summary Cards Implementation
Closes #502
Overview
This PR implements reusable bridge summary card components that surface bridge status, coverage, and performance metrics at a glance. The cards are designed to work within responsive grids and support multiple variants for different use cases.
Implementation Details
New Features
BridgeSummary Data Type (
frontend/src/types/index.ts)Data Hooks (
frontend/src/hooks/useBridgeSummary.ts)useBridgeSummaries(): Fetches and combines data for all bridgesuseBridgeSummary(bridgeName): Fetches summary for a single bridgeBridgeSummaryCard Component (
frontend/src/components/BridgeSummaryCard/BridgeSummaryCard.tsx)compact: Shows name and status only, minimal footprintstandard: (default) Shows name, status, coverage, performance, and TVLdetailed: Shows all fields including supply breakdown and mismatch percentageBridgeSummaryGrid Component (
frontend/src/components/BridgeSummaryCard/BridgeSummaryGrid.tsx)Comprehensive Test Suite
BridgeSummaryCard.test.tsx: 40+ tests covering all variants, states, accessibility, and formattingBridgeSummaryGrid.test.tsx: 30+ tests for grid behavior, responsiveness, and accessibilityuseBridgeSummary.test.tsx: Hook tests for data fetching, caching, and error handlingStorybook Documentation (
BridgeSummaryCard.stories.tsx)Card Variants
Compact Variant
Standard Variant
Detailed Variant
Data Source
getBridges()andgetBridgeStats()API functions fromfrontend/src/services/api.tsDesign System Integration
SkeletonCard,SkeletonText,SkeletonAvatarcomponentsstellar-text-primary,stellar-text-secondaryclassesbg-stellar-card,border-stellar-borderpatternsAccessibility
✅ WCAG 2.1 AA Compliant
aria-busy="true"with descriptive aria-labelrole="alert"for immediate announcementrole="region"with descriptive aria-labelFiles Modified
Frontend
frontend/src/types/index.ts- Added BridgeSummary typefrontend/src/hooks/useBridgeSummary.ts- New data hooksfrontend/src/hooks/useBridgeSummary.test.tsx- Hook testsfrontend/src/components/BridgeSummaryCard/BridgeSummaryCard.tsx- Card componentfrontend/src/components/BridgeSummaryCard/BridgeSummaryCard.test.tsx- Component testsfrontend/src/components/BridgeSummaryCard/BridgeSummaryCard.stories.tsx- Storybook storiesfrontend/src/components/BridgeSummaryCard/BridgeSummaryGrid.tsx- Grid wrapperfrontend/src/components/BridgeSummaryCard/BridgeSummaryGrid.test.tsx- Grid testsfrontend/src/components/BridgeSummaryCard/index.ts- ExportsTesting
Component Tests
Hook Tests
Grid Tests
Usage Example
Basic Usage
Single Card
Browser Support
Performance Impact
Security
Conflicts & Dependencies
Pipeline Status
Screenshots / Visual Changes
Light Theme
Dark Theme