-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Settings-"I understand this is not reversible" checkbox is unchecked when tapping back #60769
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
Comments
Triggered auto assignment to @adelekennedy ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.When a user tries to merge accounts, enters their information (email and consent checkbox), and then navigates away from the screen (by clicking "Didn't receive a magic code?" and then going back), the consent checkbox is no longer checked. What is the root cause of that problem?The root cause is that while the email field value is preserved using a local state variable (useState) from the params, the consent checkbox state is not persisted in the same way.
What changes do you think we should make in order to solve the problem?We should add similar state management for the consent checkbox:
const [isConsentChecked, setIsConsentChecked] = useState(params?.isConsentChecked ?? false);
<InputWrapper
style={[styles.mt8]}
InputComponent={CheckboxWithLabel}
inputID={INPUT_IDS.CONSENT}
label={translate('mergeAccountsPage.accountDetails.notReversibleConsent')}
aria-label={translate('mergeAccountsPage.accountDetails.notReversibleConsent')}
value={isConsentChecked}
onValueChange={(newValue) => setIsConsentChecked(newValue)}
/> 3.When navigating to other screens, pass this state as a parameter:
Navigation.navigate(ROUTES.SETTINGS_MERGE_ACCOUNTS_MAGIC_CODE.getRoute(email, isConsentChecked)); Update the deps arrray as well. 4.Update the navigation routes to accept and pass through this parameter. Lines 208 to 211 in a857e00
as: SETTINGS_MERGE_ACCOUNTS_MAGIC_CODE: {
route: 'settings/security/merge-accounts/:login/magic-code/:isConsentChecked?',
getRoute: (login: string, isConsentChecked: boolean = false) => `settings/security/merge-accounts/${encodeURIComponent(login)}/magic-code/${isConsentChecked}` as const,
}, What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?NA Screen.Recording.2025-04-24.at.6.53.07.AM.mov |
ProposalPlease re-state the problem that we are trying to solve in this issue.The "I understand this is not reversible" checkbox becomes unchecked when the user taps the app's back button. What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
What alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?
const [isCheckboxChecked] = useState(!!params?.email);
// Prop to `CheckboxWithLabel`
defaultValue={isCheckboxChecked}
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?N/A What alternative solutions did you explore? (Optional)N/A ResultMonosnap.screencast.2025-04-26.02-33-06.mp4 |
@adelekennedy Eep! 4 days overdue now. Issues have feelings too... |
I can reproduce this but this is very low priority fix imo and I can't imagine a real world user complaining about this |
@adelekennedy This bug is caused because there are two similar screens are added. Could you help check these steps in mWeb:
|
@adelekennedy could you help check my concern above when you have a chance? |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.1.32-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: #59911
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Windows 10/ Chrome, Samsung S23FE/ Android 14
App Component: User Settings
Action Performed:
Expected Result:
The phone or email field is filled, and the "I understand this is not reversible" checkbox is checked.
Actual Result:
The "I understand this is not reversible" checkbox is unchecked when tapping the app back button.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6811101_1745446185338.Checkbox_is_unchecked.mp4
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: