Skip to content

refactor(tabs): rename collapseBy → collapseHeightOffset#29928

Merged
vinnyhoward merged 1 commit into
mainfrom
refactor-rename-homepagetabs-prop
May 8, 2026
Merged

refactor(tabs): rename collapseBy → collapseHeightOffset#29928
vinnyhoward merged 1 commit into
mainfrom
refactor-rename-homepagetabs-prop

Conversation

@vinnyhoward

@vinnyhoward vinnyhoward commented May 8, 2026

Copy link
Copy Markdown
Contributor

Description

Following up from feedback on the Hub Page Discovery Tabs PR: the new collapseBy prop on TabsIconBar was too vague. Renamed to collapseHeightOffset and clarified the JSDoc. No behavior change, no consumers currently use the prop.

Changelog

CHANGELOG entry: null

Related issues

Fixes:

Manual testing steps

Feature: TabsIconBar collapseHeightOffset prop

  Scenario: existing consumers unaffected
    Given a TabsIconBar without collapseHeightOffset
    Then it collapses to height 0 (existing behavior)

  Scenario: partial collapse
    Given a TabsIconBar with collapseAnim and collapseHeightOffset={28}
    When collapseAnim animates to 1
    Then the row shrinks by 28px (not all the way to 0)

Screenshots/Recordings

~

Before

~

After

~

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
Low risk: this is a prop rename plus doc/test updates in a single component, with no behavioral logic change beyond using the new prop name; risk is limited to any external callers still passing the old prop.

Overview
Renames the TabsIconBar partial-collapse prop from collapseBy to collapseHeightOffset and updates the component implementation to use the new name when computing collapsed height.

Updates the related TypeScript types/JSDoc and adjusts the TabsIconBar tests to pass and describe collapseHeightOffset (including clamping behavior when the offset exceeds the measured row height).

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

@vinnyhoward vinnyhoward requested a review from a team as a code owner May 8, 2026 16:08
@github-actions

github-actions Bot commented May 8, 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 pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label May 8, 2026
@metamaskbotv2 metamaskbotv2 Bot added the team-mobile-ux Mobile UX team label May 8, 2026
@github-actions github-actions Bot added the size-S label May 8, 2026
@vinnyhoward vinnyhoward enabled auto-merge May 8, 2026 16:41
@vinnyhoward vinnyhoward 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 May 8, 2026
@github-actions

github-actions Bot commented May 8, 2026

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

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

E2E Test Selection:
The changes are limited to a prop rename in the TabsIconBar component: collapseBycollapseHeightOffset. The rename is applied consistently across the component implementation (TabsIconBar.tsx), its type definition (TabsIconBar.types.ts), and its unit tests (TabsIconBar.test.tsx).

Key findings:

  1. No external callers use collapseBy — grep across all .tsx and .ts files returned zero matches for collapseBy outside the changed files themselves.
  2. TabsIconList (the only consumer of TabsIconBar) passes props via spread (...tabsBarProps) and does not directly reference collapseBy or collapseHeightOffset.
  3. The animation logic is functionally identical — only the prop name changed.
  4. This is a pure internal refactor with no behavioral change, no user-facing impact, and no risk to any E2E test flows.

No E2E tags are needed. No performance tests are needed.

Performance Test Selection:
This is a prop rename with no logic change. There is no performance impact — the animation interpolation logic is identical, just referenced via a new prop name. No performance tests are warranted.

View GitHub Actions results

@sonarqubecloud

sonarqubecloud Bot commented May 8, 2026

Copy link
Copy Markdown

@vinnyhoward vinnyhoward added this pull request to the merge queue May 8, 2026
Merged via the queue into main with commit 063a612 May 8, 2026
120 of 121 checks passed
@vinnyhoward vinnyhoward deleted the refactor-rename-homepagetabs-prop branch May 8, 2026 17:24
@github-actions github-actions Bot locked and limited conversation to collaborators May 8, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.78.0 Issue or pull request that will be included in release 7.78.0 label May 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.78.0 Issue or pull request that will be included in release 7.78.0 size-S team-mobile-ux Mobile UX team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants