Show a fullscreen 2fa required instead of modal#58071
Show a fullscreen 2fa required instead of modal#58071Beamanator merged 11 commits intoExpensify:mainfrom
Conversation
|
@dukenv0307 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
Asked for translation verification here: https://expensify.slack.com/archives/C01GTK53T8Q/p1741584360196839 |
|
Bug: Screen.Recording.2025-03-10.at.14.47.33.mov |
|
I think this PR should be merged first |
|
I think the visuals look good. Part of me wonders now if we should just tweak the copy to be less about Xero's accounting package and that "This workspaces requires two-factor authentication.." or something. Keen to hear from @Expensify/design and @trjExpensify |
|
Mhm yeah, the only reason for this is because of Xero though. They enforce it for admins in partner apps that connect to Xero. |
|
I get that, I guess just for a new user being invited, it isn't really relevant info. I don't care too much so happy to move along 😄 |
|
No strong feelings, though I totally see Jon's point. |
Checking |
|
My account (WS owner) that has Xero connection is somehow suspended. I have asked for help on slack to unsuspend it. |
I took you off the email suppression list. 👍 |
|
@dukenv0307 I tried fixing the bug by using the
https://reactnavigation.org/docs/navigation-actions/#rewriting-the-history-with-reset What if we change the behavior so that after the user enables the 2FA, both the 2FA required page and 2FA RHP are closed? web2.mp4cc: @trjExpensify |
Can you check the behavior of |
|
We close the onboarding navigator after completing it, so we can't go back to it. App/src/libs/navigateAfterOnboarding.ts Lines 6 to 34 in 2496dfa |
Hm, I don't love losing the confirmation screen tbh. I think it's fine to close both after confirming. Your vid also looks like it takes quite a long time for the account to load, so the "added delay" in showing the confirmation screen with the blocking modal in the background still could prove to be beneficial. CC: @Expensify/design for thoughts, vid here. |
Agree with this. It feels a little jarring to hit |
|
Yeah, I agree with you both. |
Got it, I'll try and record this tomorrow. |
|
Does this looks good? web.mp4(I pressed the browser back button to show the navigation bug is fixed, cc: @dukenv0307) |
|
@bernhardoj Looks good |
|
Nice, that seems better to me. |
|
Updated |
|
@bernhardoj Lint are failing... |
|
@bernhardoj Bug
Actual result: Expected result: |
|
I believe it's the same bug as #58217. Lint fixed. |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2025-03-14.at.23.13.13.movAndroid: mWeb ChromeScreen.Recording.2025-03-14.at.23.03.36.moviOS: NativeScreen.Recording.2025-03-14.at.23.07.25.moviOS: mWeb SafariScreen.Recording.2025-03-14.at.22.57.24.movMacOS: Chrome / SafariScreen.Recording.2025-03-14.at.22.50.37.movMacOS: DesktopScreen.Recording.2025-03-14.at.23.17.15.mov |
+1, looks good! |
|
Feels much better, nice! |
Beamanator
left a comment
There was a problem hiding this comment.
Overall looking great! Just a few lil comments!
| selector: wasInvitedToNewDotSelector, | ||
| }); | ||
| const [hasNonPersonalPolicy] = useOnyx(ONYXKEYS.HAS_NON_PERSONAL_POLICY); | ||
| const shouldShowRequire2FAPage = account?.needsTwoFactorAuthSetup && !account.requiresTwoFactorAuth; |
There was a problem hiding this comment.
Mind adding a comment here explaining exactly why this is the logic we want? I think this will confuse people in the future who read this
| twoFactorAuthIsRequiredForAdminsHeader: 'Two-factor authentication required', | ||
| twoFactorAuthIsRequiredForAdminsTitle: 'You need to enable two-factor authentication', | ||
| twoFactorAuthIsRequiredForAdminsDescription: 'The Xero accounting connection requires the use of two-factor authentication. To continue using Expensify, please enable it.', |
There was a problem hiding this comment.
Could be nice to remove the ForAdmins part of these keys since the text doesn't say anything about admins, what do y'all think?
There was a problem hiding this comment.
Yes, it doesn't mention about admin, but the page will only show in a case where a workspace (connected to Xero) admin without 2FA enabled login.
| }; | ||
| }, [theme]); | ||
|
|
||
| useEffect(() => { |
There was a problem hiding this comment.
I think we should also add a comment here for these 2 new useEffects
|
For the comment, I don't think it's necessary. |
Beamanator
left a comment
There was a problem hiding this comment.
Thanks for the updates & looks good 🚀
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/Beamanator in version: 9.1.15-0 🚀
|
|
@bernhardoj can you please check the failing cases? |
|
I don't have access to hybrid app. From the video, the user stays on the OD, so the new page we add here isn't shown. It's the same issue as #58232 (comment) |
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.1.15-9 🚀
|
Explanation of Change
Fixed Issues
$ #57684
PROPOSAL:
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
Prerequisite: User A has a workspace connected to Xero accounting
As User A Invite User B to a workspace as Admin
As User B:
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
android.mp4
Android: mWeb Chrome
android.mweb.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
ios.mweb.mp4
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
desktop.mp4