Skip to content

refactor: Removed unused header components from components-temp#26741

Merged
brianacnguyen merged 2 commits into
mainfrom
refactor/rm-unused-headers
Mar 2, 2026
Merged

refactor: Removed unused header components from components-temp#26741
brianacnguyen merged 2 commits into
mainfrom
refactor/rm-unused-headers

Conversation

@brianacnguyen

@brianacnguyen brianacnguyen commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

Description

This PR removes four unused header components from app/component-library/components-temp/: HeaderCollapsible, HeaderCollapsibleStandard, HeaderCollapsibleSubpage, and HeaderStackedSubpage.

Reason for change: These components are not used anywhere in the app. Removing them reduces maintenance surface and dead code.

What changed:

  1. Deleted component directories (21 files total)

    • HeaderCollapsible/ – component, types, useHeaderCollapsible hook, test, stories, index
    • HeaderCollapsibleStandard/ – component, types, test, stories, index (wrapped HeaderCollapsible with TitleStandard)
    • HeaderCollapsibleSubpage/ – component, types, test, stories, index (wrapped HeaderCollapsible with TitleSubpage)
    • HeaderStackedSubpage/ – component, types, test, stories, index (standalone stacked subpage header)
  2. Storybook

    • Removed the four story require() entries from .storybook/storybook.requires.js for the removed components.

No app code imported these components; removal is self-contained to components-temp and Storybook registration.

Changelog

This PR is not end-user-facing; it removes unused internal header components.

CHANGELOG entry: null

Related issues

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

Manual testing steps

Feature: Removed unused header components

  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 removed components
    Given the codebase is searched for HeaderCollapsible, HeaderCollapsibleStandard, HeaderCollapsibleSubpage, HeaderStackedSubpage
    Then no imports or usages remain (only this PR description)

Screenshots/Recordings

Before

N/A – code removal; components were unused.

After

N/A – same app behavior; removed components were not referenced.

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 dead-code cleanup that deletes unused components-temp headers and their Storybook registrations; main risk is only if an out-of-tree or dynamic import relied on these removed exports.

Overview
Removes unused header components from components-temp. Deletes HeaderCollapsible, HeaderCollapsibleStandard, HeaderCollapsibleSubpage, and HeaderStackedSubpage (including associated types, hooks, tests, and Storybook stories/indices).

Updates Storybook registration. Drops the corresponding require() entries from .storybook/storybook.requires.js so Storybook no longer attempts to load the removed stories.

Written by Cursor Bugbot for commit ed2be56. 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:14
@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 commented Mar 2, 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: 95%
click to see 🤖 AI reasoning details

E2E Test Selection:
This PR removes unused component library components (HeaderCollapsible, HeaderCollapsibleStandard, HeaderCollapsibleSubpage, HeaderStackedSubpage, and useHeaderCollapsible hook) from the components-temp directory.

My investigation confirmed:

  1. These components are NOT imported or used anywhere in the application codebase - grep searches for "HeaderCollapsible", "HeaderStackedSubpage", and "useHeaderCollapsible" returned no matches in .tsx or .ts files
  2. The changes are purely deletions of unused code - all files are being removed (deleted file diffs show 100% removal)
  3. The only other change is updating .storybook/storybook.requires.js to remove references to the deleted story files

Since no functional application code depends on these components, no user-facing features are affected, and no E2E tests need to be run. This is a safe cleanup of dead code from the component library.

Performance Test Selection:
No performance tests needed. This PR only removes unused component library components that are not imported or used anywhere in the application. No runtime code paths are affected, no UI rendering changes occur in the actual app, and no data loading or state management is impacted. The deleted components were never integrated into any user-facing features.

View GitHub Actions results

@brianacnguyen brianacnguyen enabled auto-merge March 2, 2026 19:46
@brianacnguyen brianacnguyen added this pull request to the merge queue Mar 2, 2026
Merged via the queue into main with commit b4a5652 Mar 2, 2026
58 of 59 checks passed
@brianacnguyen brianacnguyen deleted the refactor/rm-unused-headers branch March 2, 2026 20:25
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 2, 2026
@metamaskbot metamaskbot added the release-7.69.0 Issue or pull request that will be included in release 7.69.0 label Mar 2, 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-XL 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