Skip to content

fix(money): uniform onboarding card image padding (MUSD-889)#31020

Merged
Kureev merged 6 commits into
mainfrom
kureev/MUSD-889
Jun 3, 2026
Merged

fix(money): uniform onboarding card image padding (MUSD-889)#31020
Kureev merged 6 commits into
mainfrom
kureev/MUSD-889

Conversation

@Kureev

@Kureev Kureev commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Description

On the Money home screen the onboarding card's image had more padding on top than on its sides. The StepperCard rendered the image in a fixed-height box (px-4 pt-4 h-[215px]) with resizeMode="contain", so the 16:9 artwork was letterboxed inside the 215px area and the top gap ended up larger than the 16px left/right padding.

This replaces the fixed height with a 16:9 (aspect-video) frame and applies a uniform p-4 (16px) padding on every side, so the spacing around the image is consistent. The artwork itself is unchanged.

StepperCard is only consumed by the Money onboarding card, so the change is scoped to that surface.

Figma link: https://www.figma.com/design/XKZ8hRqSn2iTiuzmlQLuYQ/Money-account?node-id=8027-14779&m=dev

Changelog

CHANGELOG entry: null

Related issues

Fixes: MUSD-889

Manual testing steps

Feature: Onboarding card image padding

  Scenario: Image padding is uniform on the onboarding card
    Given I am on the Money home screen with the onboarding card visible
    Then the gap above the card image matches the gap on its left and right sides

Screenshots/Recordings

Before

After

image

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
Presentational layout-only change in a single shared card component used for Money onboarding; no auth, data, or business logic.

Overview
StepperCard image layout is updated so the step image uses uniform 16px padding on all sides and a 16:9 (aspect-video) frame instead of a fixed 215px height with asymmetric px-4 / pt-4.

That removes extra top letterboxing from resizeMode="contain" inside the old box, which showed up on the Money onboarding card as uneven spacing above the artwork. Copy, CTAs, and step logic are unchanged; only the image container structure and Tailwind classes differ.

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

The onboarding StepperCard rendered its image inside a fixed-height box
(`px-4 pt-4 h-[215px]`) with `resizeMode="contain"`, which letterboxed
the 16:9 artwork and left the top padding visibly larger than the 16px
sides.

Size the media box to the image's intrinsic aspect ratio so it hugs the
artwork, with a uniform 16px (`p-4`) padding on every side. The artwork
itself is unchanged.
@Kureev Kureev requested a review from a team as a code owner June 3, 2026 15:06
@Kureev Kureev added team-earn pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. labels Jun 3, 2026
@github-actions

github-actions Bot commented Jun 3, 2026

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.

@github-actions github-actions Bot added size-S risk:low AI analysis: low risk labels Jun 3, 2026
Kureev added 2 commits June 3, 2026 17:39
Passing `aspectRatio` to the image through `tw.style(...)` did not take
effect, so the image fell back to its intrinsic size and overflowed the
card. Wrap the image in a `View` sized with a `{ width: '100%',
aspectRatio }` style and let the image fill it — the standard RN
responsive-image pattern. Padding stays a uniform 16px and the artwork
renders at its natural size.
The card art is 16:9, so resolving the asset dimensions at runtime was
unnecessary. Replace it with a fixed `aspectRatio: 16 / 9` on the image
wrapper. Same uniform-padding behaviour, less logic.

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

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 acee674. Configure here.

Comment thread app/component-library/components-temp/StepperCard/StepperCard.tsx
@github-actions github-actions Bot added risk:medium AI analysis: medium risk and removed risk:low AI analysis: low risk labels Jun 3, 2026
Use a `w-full aspect-video` Box for the image instead of a View with an
inline aspectRatio style — same 16:9 sizing and uniform 16px padding,
fewer moving parts. Drop the unit test that asserted the old inline
style (the sizing is now pure twClassName styling).
@Kureev Kureev self-assigned this Jun 3, 2026
@Kureev Kureev removed the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label Jun 3, 2026
@Kureev Kureev enabled auto-merge June 3, 2026 16:14
@github-actions github-actions Bot added risk:low AI analysis: low risk and removed risk:medium AI analysis: medium risk labels Jun 3, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.84%. Comparing base (c5fc35d) to head (7347237).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #31020      +/-   ##
==========================================
- Coverage   82.84%   82.84%   -0.01%     
==========================================
  Files        5574     5574              
  Lines      143862   143895      +33     
  Branches    33407    33413       +6     
==========================================
+ Hits       119187   119203      +16     
- Misses      16687    16702      +15     
- Partials     7988     7990       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeMoney
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 88%
click to see 🤖 AI reasoning details

E2E Test Selection:
The change in StepperCard.tsx is a minor UI layout adjustment:

  1. Removes the BoxAlignItems.Center import (unused after the change)
  2. Replaces a fixed-height image container (h-[215px]) with an aspect-ratio-based layout (aspect-video) wrapped in a padding box

This component is only imported by MoneyOnboardingCard.tsx, which is part of the MetaMask Card/Money onboarding flow. The change is purely cosmetic - it adjusts how the image is displayed in the stepper card (aspect-ratio instead of fixed height), with no logic, state, or behavioral changes.

Since this only affects the Money/Card onboarding UI, SmokeMoney is the appropriate tag to validate the visual rendering of the onboarding card. No other flows are affected. No dependent tags are required since this is a pure UI layout change with no transaction, confirmation, or swap flows involved.

Performance Test Selection:
The change is a minor CSS/layout adjustment (fixed height to aspect-ratio) in a UI component used only in the Money onboarding card. This does not affect rendering performance in any measurable way - it's a simple layout property change with no impact on data loading, list rendering, animations, or app startup.

View GitHub Actions results

@Kureev Kureev added this pull request to the merge queue Jun 3, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 3, 2026
@Kureev Kureev added this pull request to the merge queue Jun 3, 2026
Merged via the queue into main with commit 57a2bd7 Jun 3, 2026
191 of 193 checks passed
@Kureev Kureev deleted the kureev/MUSD-889 branch June 3, 2026 21:35
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 3, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.81.0 Issue or pull request that will be included in release 7.81.0 label Jun 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.81.0 Issue or pull request that will be included in release 7.81.0 risk:low AI analysis: low risk size-S team-earn

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants