Skip to content

refactor: Removed HeaderStackedStandard from codebase#26742

Merged
brianacnguyen merged 6 commits into
mainfrom
refactor/rm-header-stacked-standard
Mar 3, 2026
Merged

refactor: Removed HeaderStackedStandard from codebase#26742
brianacnguyen merged 6 commits into
mainfrom
refactor/rm-header-stacked-standard

Conversation

@brianacnguyen

@brianacnguyen brianacnguyen commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

Description

This PR migrates usages of HeaderStackedStandard to HeaderCompactStandard and TitleStandard, then removes the HeaderStackedStandard component from app/component-library/components-temp/.

Reason for change: Preparing to deprecate HeaderStackedStandard. Replacing it with HeaderCompactStandard (button row) + TitleStandard (title block) preserves the same layout and spacings (px-2 on the header row, px-4 pt-1 pb-3 on the title section) while using the preferred components.

What changed:

  1. View migrations (3 files)

    • ImportNewSecretRecoveryPhrase – Replaced HeaderStackedStandard with HeaderCompactStandard (back + QR button) and TitleStandard (title + bottomAccessory), props inlined.
    • ConnectHardware/SelectHardware – Same pattern: HeaderCompactStandard (onBack) + TitleStandard (title, bottomAccessory), props inlined.
    • ImportPrivateKey – Same pattern: HeaderCompactStandard (backButtonProps) + TitleStandard (title, bottomAccessory), props inlined.
    • No Box wrappers; header and title are direct siblings of their parent. Spacing applied via twClassName="px-4 pt-1 pb-3" on TitleStandard.
  2. Removed HeaderStackedStandard

    • Deleted app/component-library/components-temp/HeaderStackedStandard/ (index, types, component, stories, test).
    • Removed its story require() from .storybook/storybook.requires.js.

No other app code used HeaderStackedStandard; removal is limited to the three views above and the component folder.

Changelog

This PR is not end-user-facing; it refactors internal header usage and removes one header component.

CHANGELOG entry: null

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/DSYS-496

Manual testing steps

Feature: HeaderStackedStandard replaced with HeaderCompactStandard + TitleStandard

  Scenario: Lint and type check pass
    Given the branch is checked out
    When the author runs yarn lint and yarn lint:tsc
    Then both complete without errors

  Scenario: No references to HeaderStackedStandard
    Given the codebase is searched for HeaderStackedStandard
    Then no imports or usages remain

  Scenario: Migrated screens render correctly
    Given the app is running
    When the user opens Import Secret Recovery Phrase, Connect Hardware (Select Hardware), or Import Private Key
    Then the header shows the same back/close/actions and title section layout and spacing as before

Screenshots/Recordings

Before

N/A – layout unchanged; only implementation (component swap) changed.

After

Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2026-03-01.at.21.23.55.mov

N/A – same header appearance and spacing on the three screens.

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

Low Risk
Low risk refactor that swaps a composite header component for two existing components; main risk is minor layout/spacing or header action wiring regressions on the three migrated screens.

Overview
Removes the temporary HeaderStackedStandard component entirely (component, types, tests, Storybook story) and drops its Storybook registration.

Migrates three screens (ConnectHardware/SelectHardware, ImportNewSecretRecoveryPhrase, ImportPrivateKey) from HeaderStackedStandard to the equivalent HeaderCompactStandard + TitleStandard composition, preserving back/close/scan actions and moving title/subtitle content into TitleStandard with twClassName="px-4 pt-1 pb-3". Updates the ImportPrivateKey snapshot to match the new header/title render structure.

Written by Cursor Bugbot for commit 70ce3a5. This will update automatically on new commits. Configure here.

@brianacnguyen brianacnguyen self-assigned this Mar 2, 2026
@brianacnguyen brianacnguyen requested a review from a team as a code owner March 2, 2026 05:32
@brianacnguyen brianacnguyen added No QA Needed Apply this label when your PR does not need any QA effort. team-design-system All issues relating to design system in Mobile no changelog required No changelog entry is required for this change labels Mar 2, 2026
@github-actions

github-actions Bot commented Mar 2, 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 the size-L label Mar 2, 2026

@georgewrmarshall georgewrmarshall 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.

LGTM

@github-actions

github-actions Bot commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeAccounts, SmokeWalletPlatform, SmokeIdentity
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: medium
  • AI Confidence: 85%
click to see 🤖 AI reasoning details

E2E Test Selection:
This PR removes the HeaderStackedStandard component and refactors three views to use HeaderCompactStandard + TitleStandard instead:

  1. ConnectHardware/SelectHardware - Hardware wallet connection flow for QR-based hardware wallet accounts. This is covered by SmokeAccounts which tests "adding QR-based hardware wallet accounts".

  2. ImportNewSecretRecoveryPhrase - SRP import flow for multi-SRP architecture. This is covered by:

    • SmokeWalletPlatform (tests "multi-SRP wallet architecture: importing additional Secret Recovery Phrases")
    • SmokeIdentity (tests "multi-SRP account synchronization")
  3. ImportPrivateKey - Private key import flow. This is covered by SmokeAccounts which tests "importing accounts via private key".

The changes are UI-only (header component refactoring) and don't change functionality, but they affect the visual layout and structure of these critical account management screens. The snapshot test update confirms structural changes to the UI hierarchy. Given these are important user flows for account management and wallet setup, running the relevant smoke tests is appropriate to verify the UI changes don't break the flows.

Performance Test Selection:
These changes are purely UI refactoring - replacing one header component with another. The changes don't affect data loading, state management, list rendering, or any performance-critical paths. The component hierarchy changes slightly but the overall rendering complexity remains the same. No performance tests are needed.

View GitHub Actions results

@github-actions

github-actions Bot commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

⚠️ E2E Fixture Validation — Structural changes detected

Category Count
New keys 60
Missing keys 0
Type mismatches 0
Value mismatches 6 (informational)

The committed fixture schema is out of date. To update, comment:

@metamaskbot update-mobile-fixture

View full details | Download diff report

@brianacnguyen brianacnguyen added this pull request to the merge queue Mar 3, 2026
Merged via the queue into main with commit eb4fbbf Mar 3, 2026
93 checks passed
@brianacnguyen brianacnguyen deleted the refactor/rm-header-stacked-standard branch March 3, 2026 01:12
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 3, 2026
@metamaskbot metamaskbot added the release-7.69.0 Issue or pull request that will be included in release 7.69.0 label Mar 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

no changelog required No changelog entry is required for this change No QA Needed Apply this label when your PR does not need any QA effort. release-7.69.0 Issue or pull request that will be included in release 7.69.0 size-L team-design-system All issues relating to design system in Mobile

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants