fix: Fix UI issue related to SafeAreaView top inset recalculation cp-7.73.0#28622
Conversation
|
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. |
…eact-navigation-safe-area-top-inset
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 2309d6d. Configure here.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #28622 +/- ##
==========================================
- Coverage 82.14% 82.14% -0.01%
==========================================
Files 4949 4966 +17
Lines 130070 130550 +480
Branches 29004 29110 +106
==========================================
+ Hits 106851 107239 +388
- Misses 15923 15993 +70
- Partials 7296 7318 +22 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Why high risk and broad coverage:
The Test cleanup (removing manual All tags are selected because the Performance Test Selection: |
|
✅ E2E Fixture Validation — Schema is up to date |
|




Description
We're experiencing an issue where the SafeAreaView top padding gets recalculated upon component mount, which results in bad UI. This PR reduces the blast radius of the changes by consolidating all SafeAreaView imports to
react-native-safe-area-context. We then create a shim for the module, which handles applying top insets via style instead. Changes also includes:Changelog
CHANGELOG entry:
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Touches SafeAreaView usage across many screens, so incorrect inset/edge handling could cause widespread layout regressions on iOS/Android despite being mostly mechanical changes.
Overview
Standardizes
SafeAreaViewusage by switching many components fromreact-nativetoreact-native-safe-area-context(including adding explicitedgesin a few places) to avoid incorrect top-inset recalculation on mount.Refactors navigation/header configuration for
DeFiProtocolPositionDetailsby movingsetOptionslogic out of the component and intoMainNavigatoroptions viagetDeFiProtocolPositionDetailsNavbarOptions(now explicitly setsheaderShown: true).Cleans up tests by removing per-file safe-area mocks in favor of the centralized jest mock in
testSetupView.js, and updates snapshots/expectations accordingly.Reviewed by Cursor Bugbot for commit f88a0cf. Bugbot is set up for automated code reviews on this repo. Configure here.