Skip to content

refactor: remove unused FeatureAnnouncementToggle [GE-244]#30441

Merged
baptiste-marchand merged 2 commits into
mainfrom
refactor/remove-unused-feature-announcement-toggle
May 20, 2026
Merged

refactor: remove unused FeatureAnnouncementToggle [GE-244]#30441
baptiste-marchand merged 2 commits into
mainfrom
refactor/remove-unused-feature-announcement-toggle

Conversation

@baptiste-marchand

@baptiste-marchand baptiste-marchand commented May 20, 2026

Copy link
Copy Markdown
Contributor

Description

Removes the Feature Announcements notification setting by deleting FeatureAnnouncementToggle (and its test) and dropping the corresponding useFeatureAnnouncementToggle hook.

Replaced by AUS notification preference in #30106

Changelog

CHANGELOG entry:

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/GE-244

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

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 removal of unused UI toggle and associated hook/tests; primary risk is any missed call sites leading to missing functionality, but searches indicate no remaining references.

Overview
Removes the Feature Announcements notification setting by deleting FeatureAnnouncementToggle (and its test) and dropping the corresponding useFeatureAnnouncementToggle hook.

Cleans up useSwitchNotifications and its tests by removing the feature-announcement toggle flow (action/selector usage and list-refresh behavior) so only the remaining notification/account toggle hooks are exercised.

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

@baptiste-marchand baptiste-marchand requested a review from a team as a code owner May 20, 2026 13:10
@github-actions

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 20, 2026
@baptiste-marchand baptiste-marchand changed the title refactor: remove unused FeatureAnnouncementToggle refactor: remove unused FeatureAnnouncementToggle [GE-244] May 20, 2026
@baptiste-marchand baptiste-marchand force-pushed the refactor/remove-unused-feature-announcement-toggle branch from 37b5a3a to 273cd0e Compare May 20, 2026 14:35
@baptiste-marchand baptiste-marchand added no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed and removed pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. labels May 20, 2026
@github-actions

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 PR removes the FeatureAnnouncementToggle component and the useFeatureAnnouncementToggle hook entirely. Both the component file and its test file are deleted. The hook removal from useSwitchNotifications.ts also removes associated imports (toggleFeatureAnnouncements, selectIsFeatureAnnouncementsEnabled). Grep confirms no remaining consumers of FeatureAnnouncementToggle or useFeatureAnnouncementToggle exist anywhere in the codebase. This is a pure code cleanup/removal with no impact on any active user flows, no controller changes, no navigation changes, and no shared component modifications. None of the available E2E test tags cover notification settings toggles specifically, and the removed code has no downstream effects on any tested flows.

Performance Test Selection:
The changes are pure deletions of a UI toggle component and a React hook. No rendering performance, data loading, state management, or critical user flow changes are involved. No performance tests are warranted.

View GitHub Actions results

@sonarqubecloud

Copy link
Copy Markdown

@baptiste-marchand baptiste-marchand added this pull request to the merge queue May 20, 2026
Merged via the queue into main with commit 4adf4d4 May 20, 2026
99 of 108 checks passed
@baptiste-marchand baptiste-marchand deleted the refactor/remove-unused-feature-announcement-toggle branch May 20, 2026 19:38
@github-actions github-actions Bot locked and limited conversation to collaborators May 20, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.79.0 Issue or pull request that will be included in release 7.79.0 label May 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed release-7.79.0 Issue or pull request that will be included in release 7.79.0 size-M team-engagement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants