Skip to content

fix(confirmations): prevent Perps withdraw clipping on Android cp-7.75.0#29434

Merged
dan437 merged 5 commits into
mainfrom
mm-pay-clipping-on-android
Apr 29, 2026
Merged

fix(confirmations): prevent Perps withdraw clipping on Android cp-7.75.0#29434
dan437 merged 5 commits into
mainfrom
mm-pay-clipping-on-android

Conversation

@dan437
Copy link
Copy Markdown
Contributor

@dan437 dan437 commented Apr 28, 2026

Description

Fixes an Android layout issue where the Perps Withdraw confirmation keypad bottom row and the final Withdraw button could be clipped behind the system navigation area.

The fix keeps the shared full-screen confirmation layout intact, ensures the confirmation ScrollView fills its safe-area container, and applies extra Android bottom spacing only to the Perps Withdraw bottom block.

Changelog

CHANGELOG entry: Fixed Perps Withdraw on Android so the keypad and Withdraw button remain fully visible.

Related issues

Fixes: #29363

Manual testing steps

Feature: Perps Withdraw Android layout

  Scenario: Perps Withdraw keypad is fully visible on Android
    Given I am on the Perps Withdraw confirmation
    When the amount keyboard is visible
    Then the bottom keypad row is fully visible above the Android navigation bar

  Scenario: Perps Withdraw button is fully visible on Android
    Given I am on the Perps Withdraw confirmation
    When I enter an amount and continue past the keyboard
    Then the Withdraw button is fully visible with bottom spacing

  Scenario: Other deposit flows are not regressed
    Given I open Perps Deposit and Predict Deposit confirmations
    Then their keyboards remain fully visible and keep expected bottom spacing

Screenshots/Recordings

Before

Android Perps Withdraw keypad / Withdraw button clipped behind the system navigation area.

After

Android Perps Withdraw keypad and Withdraw button fully visible. Verified on Pixel 6 and Pixel 10 Pro XL.

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

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

Low Risk
Small, opt-in styling change scoped to Perps Withdraw (and Android-only) with added unit tests; minimal risk beyond potential minor layout spacing differences on affected screens.

Overview
Prevents Perps Withdraw confirmation UI from clipping behind the Android gesture/navigation bar by adding an opt-in hasExtraBottomPadding prop to CustomAmountInfo and applying a 56dp paddingBottom to the bottom block only on Android.

PerpsWithdrawInfo now enables this padding, and new test IDs plus unit tests cover the platform-conditional styling and prop behavior to avoid iOS/layout regressions.

Reviewed by Cursor Bugbot for commit dd5c508. Bugbot is set up for automated code reviews on this repo. Configure here.

@dan437 dan437 requested a review from a team as a code owner April 28, 2026 15:41
@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.

@metamaskbotv2 metamaskbotv2 Bot added the team-confirmations Push issues to confirmations team label Apr 28, 2026
@dan437 dan437 changed the title fix(confirmations): prevent Perps withdraw clipping on Android fix(confirmations): prevent Perps withdraw clipping on Android cp-7.75.0 Apr 28, 2026
@dan437 dan437 force-pushed the mm-pay-clipping-on-android branch from 7283c20 to bc088df Compare April 29, 2026 09:12
dan437 added 4 commits April 29, 2026 11:58
Signed-off-by: dan437 <80175477+dan437@users.noreply.github.com>
Signed-off-by: dan437 <80175477+dan437@users.noreply.github.com>
Signed-off-by: dan437 <80175477+dan437@users.noreply.github.com>
@dan437 dan437 force-pushed the mm-pay-clipping-on-android branch from d509575 to 6f900f2 Compare April 29, 2026 09:59
@dan437 dan437 enabled auto-merge April 29, 2026 10:02
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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 6f900f2. Configure here.

Bugbot flagged that the new hasExtraBottomPadding tests asserted only
that the keyboard rendered, identical to existing coverage. Add a
testID on the bottom block, mock Platform.OS, and assert the actual
paddingBottom value is applied on Android, omitted on iOS, and gated by
the prop.
@github-actions github-actions Bot added size-M and removed size-S labels Apr 29, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokePerps, SmokeWalletPlatform, SmokeConfirmations
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 90%
click to see 🤖 AI reasoning details

E2E Test Selection:
The changes in this PR are focused and minimal:

  1. custom-amount-info.testIds.ts (new): Adds a BOTTOM_BLOCK test ID to the bottom container of CustomAmountInfo.
  2. custom-amount-info.styles.ts: Adds an extraBottomPadding style (56px bottom padding on Android only, 0 on iOS).
  3. custom-amount-info.tsx: Adds optional hasExtraBottomPadding prop; applies the new style and test ID to the bottom Box when the prop is true. All other behavior is unchanged.
  4. perps-withdraw-info.tsx: Passes hasExtraBottomPadding to CustomAmountInfo — the sole consumer of this new prop.

This is a targeted Android layout fix for the Perps Withdraw screen, preventing the UI from clipping behind the system gesture bar. The change is backward-compatible (optional prop, no logic changes).

SmokePerps: Directly validates the Perps Withdraw flow where the fix is applied.
SmokeWalletPlatform: Required per tag description — Perps is a section inside the Trending tab, so Perps view changes affect this tag.
SmokeConfirmations: Required per SmokePerps tag description — Add Funds/Withdraw flows involve on-chain transactions that go through the confirmations system. Also, CustomAmountInfo is part of the confirmations component tree.

No other flows are affected since hasExtraBottomPadding is a new optional prop with no impact on existing callers.

Performance Test Selection:
The change adds a conditional bottom padding style (56px on Android, 0 on iOS) to the Perps Withdraw screen. This is a trivial layout-only change with no impact on rendering performance, data loading, state management, or any other performance-sensitive area. No performance tests are warranted.

View GitHub Actions results

@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown
Contributor

E2E Fixture Validation — Schema is up to date
12 value mismatches detected (expected — fixture represents an existing user).
View details

@dan437 dan437 added this pull request to the merge queue Apr 29, 2026
Merged via the queue into main with commit edaf5b3 Apr 29, 2026
102 checks passed
@dan437 dan437 deleted the mm-pay-clipping-on-android branch April 29, 2026 11:36
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 29, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.76.0 Issue or pull request that will be included in release 7.76.0 label Apr 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.76.0 Issue or pull request that will be included in release 7.76.0 size-M team-confirmations Push issues to confirmations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Perps - Unable to Withdraw as button for Confirm is not present

2 participants