feat: add error-boundary fallback UI for NotificationBell (Closes #833) - #874
Open
waterWang wants to merge 1 commit into
Open
feat: add error-boundary fallback UI for NotificationBell (Closes #833)#874waterWang wants to merge 1 commit into
waterWang wants to merge 1 commit into
Conversation
…dictify-org#833) - Add compact NotificationBellErrorFallback with AlertCircle icon + Retry action - Wrap NotificationBell with ErrorBoundary so render errors don't crash the header - ErrorBoundary retry resets the error state via key change - Add focused tests for error-boundary state, retry behaviour, and accessibility - Fix WalletModal test by adding wallet-kits mock for ESM compatibility Design: - Compact fallback keeps the button slot (44×44px) to avoid layout shift - Uses design tokens (text-destructive, bg-destructive, ring-ring) - Retry button is pinned to the bottom-right corner of the fallback - WCAG 2.1 AA: role=alert, aria-label on retry, aria-hidden on icons
|
@waterWang is attempting to deploy a commit to the Jagadeesh B's projects Team on Vercel. A member of the Team first needs to authorize it. |
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 a compact, accessible error-boundary fallback UI for the
NotificationBellcomponent, so a render error in the bell never crashes the surrounding header.Changes
src/pages/NotificationBell.tsxNotificationBellInnerrenderer.NotificationBellErrorFallback— a compact 44×44px slot with anAlertCircleicon and a pinned Retry button.ErrorBoundarycomponent, so any render error shows the fallback instead of blanking the header.key(forcing a clean remount).src/pages/__tests__/NotificationBell.error-boundary.test.tsx(new)role="alert",aria-hiddenon the icon, accessible name on the Retry button.src/pages/__tests__/WalletModal.test.tsx@/constants/wallet-kits.constantmock to fix an ESM import failure (stellar-wallets-kit) that was breaking the WalletModal suite in JSDOM.Accessibility (WCAG 2.1 AA)
role="alert"so assistive tech announces the error.aria-hidden; the Retry button has a descriptivearia-label.text-destructive,bg-destructive,ring-ring) for light + dark mode consistency.Testing
All 3 NotificationBell test suites pass (36 tests total), including the pre-existing reduced-motion suite.
Closes #833