Skip to content

chore: add subtitle to Headers and increase height to 56px#24268

Merged
brianacnguyen merged 5 commits intomainfrom
update/headers-2
Jan 7, 2026
Merged

chore: add subtitle to Headers and increase height to 56px#24268
brianacnguyen merged 5 commits intomainfrom
update/headers-2

Conversation

@brianacnguyen
Copy link
Copy Markdown
Contributor

@brianacnguyen brianacnguyen commented Jan 6, 2026

Description

This PR enhances the HeaderCenter and HeaderWithTitleLeftScrollable components with additional functionality:

  1. Added subtitle support - Both components now support an optional subtitle prop that renders below the title with center alignment, along with subtitleProps for customization.

  2. Extended HeaderBase props - Removed the Omit constraints from both components:

    • HeaderCenter now extends HeaderBaseProps directly (previously omitted startButtonIconProps)
    • HeaderWithTitleLeftScrollable now extends HeaderBaseProps directly (previously omitted children)
  3. Added titleProps to HeaderWithTitleLeftScrollable - Allows customization of the compact header title.

Changelog

CHANGELOG entry: null

Related issues

Fixes:

Manual testing steps

Feature: Header subtitle support

  Scenario: user views header with subtitle
    Given user is on a screen using HeaderCenter or HeaderWithTitleLeftScrollable
    When the header is configured with title and subtitle props
    Then the title displays in bold
    And the subtitle displays below the title in a smaller, alternative color text

  Scenario: user scrolls on HeaderWithTitleLeftScrollable page
    Given user is on a screen using HeaderWithTitleLeftScrollable with subtitle
    When user scrolls down
    Then the header collapses to show compact title with subtitle
    And the subtitle remains visible below the compact title

Screenshots/Recordings

Before

After

Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2026-01-06.at.08.55.57.mov
Simulator Screenshot - iPhone 15 Pro Max - 2026-01-06 at 08 55 39

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

Introduces subtitle support and raises the compact header height across header components.

  • HeaderCenter: adds subtitle and subtitleProps; stacks title + subtitle centered; story WithSubtitle and tests for rendering/props
  • HeaderWithTitleLeftScrollable: adds titleProps, subtitle, subtitleProps, and children handling in compact header; new tests for subtitle and children precedence; stories updated (WithSubtitle, OnClose, BackAndClose)
  • Increases compact height from 48 to 56 via HeaderBase (h-12h-14) and HeaderWithTitleLeftScrollable DEFAULT_COLLAPSED_HEIGHT to 56; updates numerous snapshots accordingly
  • Both headers now pass through HeaderBaseProps and resolve start/end buttons (back/close) consistently

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

@brianacnguyen brianacnguyen self-assigned this Jan 6, 2026
@brianacnguyen brianacnguyen requested a review from a team as a code owner January 6, 2026 17:05
@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 no-changelog Indicates no external facing user changes, therefore no changelog documentation needed labels Jan 6, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 6, 2026

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-M label Jan 6, 2026
@brianacnguyen brianacnguyen requested a review from a team as a code owner January 6, 2026 18:07
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 6, 2026

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeCore, SmokeWalletUX, SmokeTrade, SmokeRamps, SmokeStake, SmokeMultiChainPermissions, SmokeConfirmationsRedesigned, SmokeAssets
  • Risk Level: medium
  • AI Confidence: 78%
click to see 🤖 AI reasoning details

This PR makes UI changes to core header components (HeaderBase, HeaderCenter, HeaderWithTitleLeftScrollable) that affect the visual appearance across the entire application:

  1. Height change: HeaderBase height changed from 48px to 56px for non-left-aligned headers. This affects all bottom sheets and modals using these header components.

  2. New subtitle feature: Added optional subtitle support to HeaderCenter and HeaderWithTitleLeftScrollable components.

  3. Wide snapshot impact: 50+ snapshot files updated across Bridge, Ramp, Stake, Earn, Permissions, Network, Perps, Card, and Confirmations components.

The changes are purely visual/UI and don't affect business logic, but the header height change could potentially cause layout issues in various screens. The affected areas include:

  • Bridge components (SmokeTrade)
  • Ramp components (SmokeRamps)
  • Stake/Earn components (SmokeStake)
  • Account Permissions (SmokeMultiChainPermissions)
  • Confirmations (SmokeConfirmationsRedesigned)
  • Network modals (SmokeCore, SmokeWalletUX)
  • Asset-related modals (SmokeAssets)

Selected tags cover the major feature areas where header components are used to ensure the height change doesn't cause visual regressions.

View GitHub Actions results

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Jan 6, 2026

Copy link
Copy Markdown
Contributor

@vinnyhoward vinnyhoward left a comment

Choose a reason for hiding this comment

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

Nice work! I like the flexibility. Only non-blocking issue I see is the Cursor bot bug about the potential clipping issue. I see that you dismissed it so I assume its not an issue?

@brianacnguyen
Copy link
Copy Markdown
Contributor Author

Nice work! I like the flexibility. Only non-blocking issue I see is the Cursor bot bug about the potential clipping issue. I see that you dismissed it so I assume its not an issue?

I fixed it


const DEFAULT_EXPANDED_HEIGHT = 140;
const DEFAULT_COLLAPSED_HEIGHT = 48;
const DEFAULT_COLLAPSED_HEIGHT = 56;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@brianacnguyen brianacnguyen added this pull request to the merge queue Jan 7, 2026
Merged via the queue into main with commit bbef7bf Jan 7, 2026
95 checks passed
@brianacnguyen brianacnguyen deleted the update/headers-2 branch January 7, 2026 09:56
@github-actions github-actions bot locked and limited conversation to collaborators Jan 7, 2026
@metamaskbot metamaskbot added the release-7.62.0 Issue or pull request that will be included in release 7.62.0 label Jan 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

No QA Needed Apply this label when your PR does not need any QA effort. no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed release-7.62.0 Issue or pull request that will be included in release 7.62.0 size-M team-design-system All issues relating to design system in Mobile

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants