Skip to content

chore(runway): cherry-pick fix: Fix UI issue related to SafeAreaView top inset recalculation#28704

Merged
Cal-L merged 4 commits intorelease/7.73.0from
cherry-pick-7-73-0-d76192c
Apr 11, 2026
Merged

chore(runway): cherry-pick fix: Fix UI issue related to SafeAreaView top inset recalculation#28704
Cal-L merged 4 commits intorelease/7.73.0from
cherry-pick-7-73-0-d76192c

Conversation

@runway-github
Copy link
Copy Markdown
Contributor

@runway-github runway-github bot commented Apr 11, 2026

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:

  • Consolidate safe area context mocks in test setup file
  • Remove unused safe area mocks within test files
  • Update snapshots

Changelog

CHANGELOG entry:

Related issues

Fixes:

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the
    app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described
    in the ticket it closes and includes the necessary testing evidence such
    as recordings and or screenshots.

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 SafeAreaView usage by switching many components from
react-native to react-native-safe-area-context (including adding
explicit edges in a few places) to avoid incorrect top-inset
recalculation on mount.

Refactors navigation/header configuration for
DeFiProtocolPositionDetails by moving setOptions logic out of the
component and into MainNavigator options via
getDeFiProtocolPositionDetailsNavbarOptions (now explicitly sets
headerShown: 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.

[d76192c](https://github.com/MetaMask/metamask-mobile/commit/d76192cd9b446bf6638e4166a2f57d1bbd95ede2)

@runway-github runway-github bot requested review from a team as code owners April 11, 2026 05:28
@github-actions
Copy link
Copy Markdown
Contributor

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.

@metamaskbot metamaskbot added the team-bots Bot team (for MetaMask Bot, Runway Bot, etc.) label Apr 11, 2026
@Cal-L Cal-L merged commit 32f48f2 into release/7.73.0 Apr 11, 2026
29 of 46 checks passed
@Cal-L Cal-L deleted the cherry-pick-7-73-0-d76192c branch April 11, 2026 05:29
@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2026
@github-actions github-actions bot added size-XL risk-medium Moderate testing recommended · Possible bug introduction risk labels Apr 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

risk-medium Moderate testing recommended · Possible bug introduction risk size-XL team-bots Bot team (for MetaMask Bot, Runway Bot, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants