-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Handle blocked copilot and Expensify card flows gracefully #52103
base: main
Are you sure you want to change the base?
Handle blocked copilot and Expensify card flows gracefully #52103
Conversation
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
@Julesssss draft is up. Quick question - |
One more important note here, For privateProfileOptions fields (legal name,legal address......) following two options came to my mind.
IMO option 2 aligns more with rest of the app. Now again for option 2 there was an important decision about validation.
Thoughts? |
…ocked-copilot-and-Expensify-card-flows-gracefully
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have design approval now, thanks for sharing the questions!
…ocked-copilot-and-Expensify-card-flows-gracefully
I think something like that would work, but I could also see just using the same exact "Not found" page we use elsewhere in terms of the exact copy and text. cc @Expensify/design |
Currently we display either of "Oops, this page cannot be found" or "You don't have access to this chat" for not found page subtitle. |
Got it, so maybe something like: Title: You don't have access to this Or something like that. cc @jamesdeanexpensify for a quick looksie. |
One more input request,
|
Hmm I would think all of the, right? How do the current "not found" pages work? |
Please keep this important detail in mind while reviewing. |
@dubielzyk-expensify @c3024 One of you needs to 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] |
@Julesssss manually tagging you here, coz Malvin again tagged Jon here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job. 🙇
I will test and see if I find anything.
Couple of comments.
onSubmit={handleValidateMagicCode} | ||
submitButtonText={translate('common.add')} | ||
style={[styles.flexGrow1, styles.mh5]} | ||
<DelegateNoAccessWrapper accessDeniedVariants={[CONST.DELEGATE.DENIED_ACCESS_VARIANTS.DELEGATE]}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DelegateNoAccessWrapper
is wrapped within ScreenWrapper
everywhere else except here. Any reason for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a mistake, It should be inside ScreenWrapper
. Fixing...
@ChavdaSachin, you raised this, but I somehow missed it—sorry! The first option seems better to me. Currently, with the changes in the PR, the delegate goes to the legal name (or date of birth or address) page, fills out the fields, clicks on Submit, and then discovers they cannot edit them. Furthermore, they need to dismiss the “no access” modal and then the RHP to navigate to the profile details page. Screen.Recording.2024-11-23.at.12.33.37.PM.movSo, I think showing the “no access” modal directly when the option is clicked and displaying the “not found” page when deep-linked to these pages, like you did for other pages, is better. cc: @Expensify/design |
@c3024 I thought option 2 was more appropriate coz that is the exact same flow we implemented for add new contact method in This PR, based on This Comment from design team.
Regarding this hideous flow you mentioned, We could dismiss RHP as soon as user close "Not So Fast..." Modal. Screen.Recording.2024-11-23.at.1.38.18.PM.movScreen.Recording.2024-11-23.at.1.59.42.PM.mov |
Personally I think it would be better to pop open the not so fast modal as soon as the user clicked on the option row. I think it's weird to let them edit the value and then only show the modal when they try to save. I also think that's inline with what we did for contact method, because in that flow we're not letting the user edit anything—we're popping the modal as soon as they click something that would allow them to edit.
Basically I agree with the above comment ☝️ |
Hey @c3024 I am facing a weird problem on IOS - Native and Android - Native after new changes. Problem Description: See the videos.... Profile Page ❌Screen.Recording.2024-11-26.at.1.25.57.AM.movAdd Contact Page ✅Screen.Recording.2024-11-26.at.1.27.57.AM.mov |
We have a logic for not opening multiple items when pressed on quickly one after another on native apps particularly Android. Since, there was no navigation happening here, it seems that the - <>
+ <MenuItemGroup shouldUseSingleExecution={!isActingAsDelegate}> |
Great, this might work |
This is looking good. Seems like we just have some lint issues remaining. |
a small change and PR will be ready for review |
Ready for review |
Reviewer Checklist
Screenshots/VideosAndroid: NativenotAndroid.mp4Android: mWeb ChromenotiOSmWeb-compressed.mp4iOS: NativenotiOS.mp4iOS: mWeb SafarinotiOSmWeb-compressed.mp4MacOS: Chrome / SafarinotChrome1.mp4notChrome2.mp4notChrome3.mp4MacOS: DesktopnotDesktop.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Explanation of Change
This PR aims to restrict copilots from performing certain actions on behalf of the owner.
As A Part of Solution Primarily Show DelegetNoAccessModal when copilot tries to perform any restricted action
And restrict delegate from accessing any restricted page using deeplink by wrapping those pages with DelegateNoAccessWrapper.
List of Actions Restricted for Copilot on Behalf of Owner,
Fixed Issues
$ #50796
PROPOSAL: NA
Tests
Same As QA.
Offline tests
Same As QA.
QA Steps
Important
All of the following tests should be performed as a copilot.
For Steps To Add Copilot Visit - https://help.expensify.com/articles/expensify-classic/copilots-and-delegates/Assign-or-remove-a-Copilot
Test 1.
Test 2.
Test 3.(For Accounts With Wallet Not Enabled)
Test 4.
Test 5.
Test 6.
Test 7.
Test 8.
staging.newExpensify.com
ornew.expensify.com
fromdev.new.expensify.com:8082
).https://dev.new.expensify.com:8082/settings/profile/legal-name
https://dev.new.expensify.com:8082/settings/profile/date-of-birth
https://dev.new.expensify.com:8082/settings/profile/phone
https://dev.new.expensify.com:8082/settings/profile/address
https://dev.new.expensify.com:8082/settings/wallet/add-bank-account
https://dev.new.expensify.com:8082/settings/wallet/enable-payments
https://dev.new.expensify.com:8082/settings/security/two-factor-auth
https://dev.new.expensify.com:8082/settings/security/closeAccount
https://dev.new.expensify.com:8082/settings/security/delegate
https://dev.new.expensify.com:8082/settings/subscription/add-payment-card
https://dev.new.expensify.com:8082/settings/subscription/request-early-cancellation-survey
https://dev.new.expensify.com:8082/settings/subscription/subscription-size
https://dev.new.expensify.com:8082/settings/exit-survey/book-call
https://dev.new.expensify.com:8082/settings/exit-survey/reason?backTo=settings%2Fexit-survey%2Fbook-call
https://dev.new.expensify.com:8082/settings/exit-survey/response?reason=featureNotAvailable&backTo=settings%2Fexit-survey%2Freason
https://dev.new.expensify.com:8082/settings/exit-survey/response?reason=dontUnderstand&backTo=settings%2Fexit-survey%2Freason
https://dev.new.expensify.com:8082/settings/exit-survey/response?reason=preferClassic&backTo=settings%2Fexit-survey%2Freason
https://dev.new.expensify.com:8082/settings/exit-survey/confirm?backTo=settings%2Fexit-survey%2Fresponse%3Freason%3DpreferClassic%26backTo%3Dsettings%252Fexit-survey%252Freason
https://dev.new.expensify.com:8082/settings/exit-survey/confirm?backTo=settings%2Fexit-survey%2Fresponse%3Freason%3DdontUnderstand%26backTo%3Dsettings%252Fexit-survey%252Freason
https://dev.new.expensify.com:8082/settings/exit-survey/confirm?backTo=settings%2Fexit-survey%2Fresponse%3Freason%3DfeatureNotAvailable%26backTo%3Dsettings%252Fexit-survey%252Freason
Verify that no errors appear in the JS console
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Test 1-7
Screen.Recording.2024-11-23.at.5.14.42.AM.mov
Test 8
Screen.Recording.2024-11-23.at.5.13.20.AM.mov
Android: mWeb Chrome
Test 1-7
Screen.Recording.2024-11-23.at.6.08.18.AM.mov
Test 8
Screen.Recording.2024-11-23.at.6.04.51.AM.mov
iOS: Native
Test 1-7
Screen.Recording.2024-11-23.at.3.43.54.AM.mov
Test 8
Screen.Recording.2024-11-23.at.4.34.17.AM.mov
iOS: mWeb Safari
Test 1-7
Screen.Recording.2024-11-23.at.3.02.24.AM.mov
Test 8
Screen.Recording.234.mov
MacOS: Chrome / Safari
Test 1-7
Screen.Recording.2024-11-23.at.2.44.44.AM.mov
Test 8
Screen.Recording.123.mov
MacOS: Desktop
Test 1-7
Screen.Recording.2024-11-23.at.4.47.01.AM.mov
Test 8
Screen.Recording.2024-11-23.at.4.44.54.AM.mov