-
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
Update Permissions for Copilots #52724
Conversation
@abdulrahuman5196 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] |
hey @abdulrahuman5196 ! I can either set up an App issue to handle your review here, or you can just approve and we can review internally, let me know which you prefer - thanks! |
Hi, @dangrous Not sure what you mean by here. If this is something I(C+) can review, I can review. Do let me know the steps, I haven't used co-pilots before. I am fine with whatever suits best for this issue. |
yep, you can review! I was mostly concerned about payment in this case, since it's not an App issue. Do I just make one and assign you? For setting a copilot, it's pretty easy! Create an account and validate it (sign out and back in again), go to Settings > Security, and there's "Add a copilot" at the bottom. Let me know if you need any other guidance! |
bump on this review @abdulrahuman5196 - thank you! |
Hi checking now |
Got it. I was able get co-pilot working. @dangrous Does this change also cover add co-pilot flow? If i copy paste the add copilot url from original account to the copilot account it is working. But the remove/update copilot flow is showing no page found as per the PR test steps. Screen.Recording.2024-11-26.at.10.37.27.PM.mov |
oh good call, I should block that one out as well! |
Okay, I added
Can you help me double check that flow? I think that's all we need. (both that it doesn't work as a copilot but also that it DOES work for non-copilots) |
Hi, thanks for the update. I think this should be good. |
Checking now |
@@ -202,6 +206,28 @@ function SecuritySettingsPage() { | |||
[delegators, styles, translate, personalDetails], | |||
); | |||
|
|||
const onUpdateDelegateRoleButtonPress = useCallback(() => { | |||
if (isActingAsDelegate) { | |||
setIsNoDelegateAccessMenuVisible(true); |
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.
@dangrous
Since we are not disabling the popover here and also after pressing okay, it is shown even after action taken.
Screen.Recording.2024-11-28.at.10.53.23.PM.mov
I think that's okay? Since potentially they could try the other option. I'm not sure, @Expensify/design what do you think we should do here? Should we hide the pop up menu after they click okay on the modal? |
I think it makes sense to show each time the user tries to take a restricted action. |
@shawnborton I think the question is if the three-dot menu should close after they click |
Ah my bad, I understand now. I agree with your thoughts above! |
okay cool, I'll dismiss the pop up when we close the modal. Thanks! |
popup will now be dismissed - ready for another review @abdulrahuman5196 |
@dangrous Could you kindly fix the merge conflicts? |
fixed the conflicts but the logic broke a bit, I need to figure out why - on (attempting to) close of the NoAccess modal, first the delegate menu closes, and you have to tap/click again to remove the noaccess one. |
Oh I think maybe it's the focus trap that's part of the added |
I think we shouldn't close the popup via |
I agree with this—I like closing the menu when the action is taken instead of when the modal is closed. 👍 |
ah okay let me try that. Also a million more conflicts, too. Sigh. |
Okay welp in investigating the conflicts - I found this, which was just merged. We might not need this PR at all. Sigh. I'm going to test fully but seems like it's doing the exact same thing |
Okay yeah it's a little different but seems to work equivalently. I'm going to close this out - thank you for your expertise and sorry for your trouble! |
Explanation of Change
We weren't disallowing removal of copilots (other than the logged in copilot) or updating of copilot roles on the front end. They're already disallowed on the backend. This is "fixing" a server error, that was a good server error to throw - it helped us figure this out.
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/444641
Tests
Same as QA
Offline tests
QA Steps
Warning modal:
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
working on getting the rest of the platforms but figured I'd start the review process
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop