refactor(rewards): use MMDS HeaderStandard#29706
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
|
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: Performance Test Selection: |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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 d6a8c44. Configure here.
| testID={REWARDS_VIEW_SELECTORS.DETAIL_BENEFIT_VIEW} | ||
| > | ||
| <HeaderCompactStandard | ||
| <HeaderStandard |
There was a problem hiding this comment.
includesTopInset prop likely ignored by HeaderStandard
High Severity
Multiple views pass includesTopInset to HeaderStandard, but this prop was specific to the HeaderRoot/HeaderCompactStandard component in components-temp. Existing HeaderStandard usages elsewhere in the codebase (MoneyHeader, PerpsHomeHeader) never use includesTopInset, and no evidence of this prop exists in the design-system package. The affected views (BenefitFullView, BenefitsFullView, CampaignMechanicsView, CampaignsView, OndoCampaignDetailsView, RewardsReferralView, SeasonOneCampaignDetailsView) use SafeAreaView with edges={{ bottom: 'additive' }}, relying entirely on the header for top safe-area inset handling. If HeaderStandard silently ignores includesTopInset, header content will render under the status bar / notch on iOS devices.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit d6a8c44. Configure here.
|





Description
This PR replaces
HeaderCompactStandardwithHeaderStandardfrom@metamask/design-system-react-nativeacross Rewards screens and related sheets, and updates unit tests to match.Reason: Align Rewards with the MetaMask design system and reduce use of
component-library/components-tempfor standard headers.Changelog
CHANGELOG entry: null
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/DSYS-703
Manual testing steps
Screenshots/Recordings
Before
After
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
Low Risk
Low risk refactor limited to UI header component swaps and corresponding test updates; main risk is minor visual/layout or
testIDregressions affecting navigation/back-button automation.Overview
Rewards screens and sheets now use MMDS
HeaderStandardinstead of the legacyHeaderCompactStandardcomponent, including benefits, campaigns, referral, settings, calculators, and multiple bottom sheets/modals.Unit tests were updated to remove
HeaderCompactStandardmocks, align back/close buttontestIDs (e.g., campaign mechanics/details), and add missing Safe Area hook stubs (notablyuseSafeAreaInsets) soHeaderStandardcan render cleanly in Jest.Reviewed by Cursor Bugbot for commit d6a8c44. Bugbot is set up for automated code reviews on this repo. Configure here.