Commit aa9b535
chore(runway): cherry-pick feat(settings): cp-7.66.0 add feature flag to toggle between Account Menu and legacy Settings (#26073)
- feat(settings): cp-7.66.0 add feature flag to toggle between Account
Menu and legacy Settings (#26032)
## **Description**
This PR introduces the `mobileUxAccountMenu` feature flag to enable
gradual rollout of the Account Menu feature. Originally we wanted to
ship for this RC as is in this
[PR](#25611) but we
found some UI refinements were needed. The feature is being moved behind
a feature flag and be hidden from this current RC and to allow for final
design refinements for the next RC.
**Why is this change required?**
The Account Menu feature requires additional refinements before full
release. A feature flag allows us to:
- Control rollout via LaunchDarkly
- Maintain backward compatibility with existing Settings flow
- Iterate on design improvements without blocking the next release
**What does this PR do?**
Adds `selectAccountMenuEnabled` selector and `useAccountMenuEnabled`
hook using the `mobileUxAccountMenu` remote feature flag
- Implements conditional navigation: enabled → `AccountsMenuView`,
disabled → legacy `Settings`
- Hides duplicate sections in Settings when Account Menu is enabled
(Permissions, Contacts, About MetaMask, Request Feature, Contact
Support, Lock)
- Hides SDK section in `SecuritySettings` when Account Menu is enabled
- Adds unit tests for both enabled/disabled states
- Reverts E2E spec files to pre-Account Menu state to avoid test
skipping (4 files: account-syncing-settings-toggle, contact-sync-toggle,
sync-users-contacts, test-snap-management). The E2E tests will be added
again once the feature is ready
## **Changelog**
<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`
If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`
(This helps the Release Engineer do their job more quickly and
accurately)
-->
CHANGELOG entry: Added feature flag mobileUxAccountMenu to control
Account Menu rollout
## **Related issues**
Fixes: https://consensyssoftware.atlassian.net/browse/TMCU-397
## **Manual testing steps**
```gherkin
Scenario 1: Feature flag disabled (default behavior)
Given the mobileUxAccountMenu feature flag is disabled
When I tap the Settings tab in TabBar
Then I should navigate to the legacy Settings screen
And I should see all sections including Permissions, Contacts, About MetaMask, Request Feature, Contact Support, and Lock
And I should see the SDK section in Security Settings
Scenario 2: Feature flag enabled (new behavior)
Given the mobileUxAccountMenu feature flag is enabled
When I tap the Settings tab in TabBar
Then I should navigate to the AccountsMenuView screen
And the legacy Settings screen should hide duplicate sections (Permissions, Contacts, About MetaMask, Request Feature, Contact Support, Lock)
And the SDK section should be hidden in Security Settings
```
## **Screenshots/Recordings**
Feature Flag Off
https://github.com/user-attachments/assets/65e9a0a2-8c70-4d84-9f26-302d27d5b1c9
Feature Flag On
https://github.com/user-attachments/assets/12503ba2-5219-4783-95c6-0fdef0ac8ecb
### **Before**
`~`
### **After**
`~`
## **Pre-merge author checklist**
- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **Pre-merge reviewer checklist**
- [x] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [x] 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.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Changes Settings entry routing and conditional visibility of multiple
Settings sections, which could break navigation paths or regress
discoverability if the flag state is mis-evaluated.
>
> **Overview**
> Introduces a new version-gated remote feature flag
(`mobileUxAccountMenu`) via `selectAccountMenuEnabled` and
`useAccountMenuEnabled` to control rollout of the Account Menu
experience.
>
> Wires the flag into navigation so the Settings tab and `SettingsFlow`
initial route switch between `AccountsMenu` and the legacy `Settings`
screen, and conditionally hides legacy Settings/Security Settings
sections (e.g., Permissions/Contacts/About/Support/Lock and the SDK
connections section) when the account menu is enabled.
>
> Updates unit snapshots/tests and adjusts smoke/E2E flows to navigate
into Settings without relying on Account Menu page objects.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
1c5dabc. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
[3ef936b](3ef936b)
Co-authored-by: Vince Howard <vincenguyenhoward@gmail.com>1 parent 65a4ede commit aa9b535
18 files changed
Lines changed: 1101 additions & 217 deletions
File tree
- app
- components
- Views/Settings
- SecuritySettings
- __snapshots__
- __snapshots__
- selectors/featureFlagController/accountMenu
- tests
- page-objects/wallet
- smoke
- identity
- account-syncing
- contact-syncing
- snaps
Lines changed: 33 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
36 | 45 | | |
37 | 46 | | |
38 | 47 | | |
| |||
124 | 133 | | |
125 | 134 | | |
126 | 135 | | |
127 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
128 | 140 | | |
129 | 141 | | |
130 | 142 | | |
| |||
160 | 172 | | |
161 | 173 | | |
162 | 174 | | |
163 | | - | |
| 175 | + | |
164 | 176 | | |
165 | 177 | | |
166 | 178 | | |
| |||
255 | 267 | | |
256 | 268 | | |
257 | 269 | | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
258 | 289 | | |
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
98 | 100 | | |
99 | 101 | | |
100 | 102 | | |
101 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
102 | 106 | | |
103 | 107 | | |
104 | 108 | | |
| |||
138 | 142 | | |
139 | 143 | | |
140 | 144 | | |
| 145 | + | |
141 | 146 | | |
142 | 147 | | |
143 | 148 | | |
| |||
0 commit comments