refactor(notification): migrate BaseNotification to TS and align with design-system tokens#30285
refactor(notification): migrate BaseNotification to TS and align with design-system tokens#30285vinnyhoward wants to merge 1 commit into
Conversation
… design-system tokens Convert BaseNotification to TypeScript with co-located styles via useStyles, swap overlay.* foreground misuse for text.default/icon.default plus background.section, and adopt DS Text. Test file moved to .tsx with it.each, full status coverage, and onPress/autoDismiss assertions.
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Impact scope: BaseNotification is used by:
This means the notification toasts shown during transaction confirmations, swaps, stakes, ramps/money flows, and wallet platform activities could be visually affected. Selected tags cover the main flows where these notifications appear:
No performance tests needed as this is a UI component refactor with no data loading or rendering performance implications. Performance Test Selection: |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit be2ff7d. Configure here.
|




Description
Part of the pure-black design-tokens audit.
BaseNotificationis the renderer behind every legacyNotificationManager.showSimpleNotification/showTransactionNotificationcall (deeplink approve, SDK Connect v2, Ramps, token add/remove, signature, asset details, password reset, and the tx-controller notification path).It was previously using
colors.overlay.*tokens for foreground text/icons and a double-background layer — under the pure-black dark theme the inner surface collapsed into the wallet background and contrast broke.This PR:
.js→.tsx, addsBaseNotification.types.ts(status union, props) and a co-locatedBaseNotification.styles.tsconsumed viauseStylesto match modern components.overlay.*foreground misuse with the correct semantic tokens (text.default,icon.default) and usesbackground.sectionfor the elevated surface so the notification stays visible against both stable dark and pure-black backgrounds.Base/Textfor the design-systemText(variant + color props). The remainingreact-native-vector-iconsusages keep a scopedeslint-disablewith a TODO — DSIconswaps shift glyph proportions at 36pt and need a separate design review..test.tsx, typed againstBaseNotificationStatus, converted toit.eachfor clearer per-status failures, added coverage for previously untested statuses (speedup,import_success,simple_notification,simple_notification_rejected) and foronPress,autoDismiss, anddata=undefined.Changelog
CHANGELOG entry: null
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
toast_after.mov
Before
toast_before.mov
After
toast_after.mov
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Medium Risk
Touches the shared in-app notification renderer used across many flows; while mostly a UI/theming refactor, it changes styling/token usage and some title/icon logic which could affect notification rendering across the app.
Overview
Refactors
BaseNotificationfrom JS/PropTypes to typed TS (.tsx), extracting new co-locatedBaseNotification.types.ts(status/props) andBaseNotification.styles.tsconsumed viauseStyles.Updates notification theming to use semantic design tokens (e.g.,
background.section,text.default,icon.default) and swaps legacyBase/Textfor design-systemTextvariants, while keepingreact-native-vector-iconswith a scoped TODO.Modernizes tests by converting to
index.test.tsx, parameterizing status coverage (including additional statuses), and adding interaction/robustness coverage foronPress,autoDismissclose behavior, anddatabeingundefined.Reviewed by Cursor Bugbot for commit be2ff7d. Bugbot is set up for automated code reviews on this repo. Configure here.