-
Notifications
You must be signed in to change notification settings - Fork 5.4k
fix: bind backup and sync in onboarding to settings #37578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
fabiobozzo
wants to merge
6
commits into
main
Choose a base branch
from
fix/MUL-1209-bind-backup-sync-toggles-to-onboarding-setting
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
fix: bind backup and sync in onboarding to settings #37578
fabiobozzo
wants to merge
6
commits into
main
from
fix/MUL-1209-bind-backup-sync-toggles-to-onboarding-setting
+244
−38
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit improves the backup and sync feature by ensuring that when basic functionality is disabled, the main backup and sync feature, along with its sub-features (account syncing and contact syncing), are also turned off. Additionally, it removes unused imports and related code from the privacy settings page, streamlining the component.
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. |
Collaborator
✨ Files requiring CODEOWNER review ✨🔑 @MetaMask/accounts-engineers (2 files, +243 -7)
🔐 @MetaMask/web3auth (1 files, +1 -31)
|
ui/components/app/identity/backup-and-sync-toggle/backup-and-sync-toggle.tsx
Outdated
Show resolved
Hide resolved
This commit introduces new tests for the BackupAndSyncToggle component, ensuring that all backup and sync features are disabled when basic functionality is turned off. It also verifies that all sub-features are disabled when the backup and sync toggle is manually turned off. Additionally, the component's useEffect is updated to handle asynchronous feature disabling correctly.
ui/components/app/identity/backup-and-sync-toggle/backup-and-sync-toggle.tsx
Show resolved
Hide resolved
This commit adds new tests to the BackupAndSyncToggle component, verifying that all backup and sync features are disabled when basic functionality is turned off, both for production and onboarding states. It also checks that features remain enabled when both states are active, ensuring comprehensive coverage of the component's behavior in various scenarios.
Collaborator
Builds ready [981d2ba]
UI Startup Metrics (1219 ± 85 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
This commit updates the tests for the BackupAndSyncToggle component to ensure that when the main toggle is activated, all associated sub-features (account syncing and contact syncing) are also enabled. The tests now include checks for the asynchronous behavior of the toggle handler and confirm that the modal's callback correctly enables all features. Additionally, the component's implementation is adjusted to ensure all sub-features are activated consistently.
Collaborator
Builds ready [bef18ac]
UI Startup Metrics (1232 ± 117 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes a bug where turning off backup and sync during onboarding didn't persist the user's preference. After completing onboarding, the backup and sync toggles in Settings would still show as "ON" instead of respecting the user's choice to turn them off.
Root Cause:
useEffectinprivacy-settings.jswas automatically forcing backup & sync to follow the basic functionality toggle, overriding manual user choicesSolution:
Changelog
CHANGELOG entry: fixed backup and sync toggle not persisting user's choice during onboarding
Related issues
Fixes: #35546
Manual testing steps
Additional test case:
Screenshots/Recordings
Before
(see bug)
After
Screen.Recording.2025-11-06.at.13.58.00.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Disables backup & sync and its sub-features when basic functionality is off (prod or onboarding) and when toggled off, and removes onboarding auto-binding to backup & sync; adds targeted tests.
ui/components/app/identity/backup-and-sync-toggle/backup-and-sync-toggle.tsx):BACKUPANDSYNC_FEATURES.main,accountSyncing, andcontactSyncingwhen basic functionality is disabled in either production or onboarding state.CONFIRM_TURN_ON_BACKUP_AND_SYNC_MODAL_NAME.ui/pages/onboarding-flow/privacy-settings/privacy-settings.js):selectIsBackupAndSyncEnabled.backup-and-sync-toggle.test.tsx):Written by Cursor Bugbot for commit 981d2ba. This will update automatically on new commits. Configure here.