-
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
fix: admin can access member details page after member leaves #41492
Conversation
@alitoshmatov 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] |
Sorry I was busy with other issues, I will finish reviewing tomorrow |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb Chromeemployee-page404-mweb.moviOS: Nativeemployee-page404-ios.mp4iOS: mWeb Safariemployee-page404-safari.mp4MacOS: Chrome / Safariemployee-page404-web.movMacOS: Desktopemployee-age404-desktop.mov |
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!
@@ -127,6 +136,14 @@ function WorkspaceMemberDetailsPage({personalDetails, policy, route}: WorkspaceM | |||
Navigation.navigate(ROUTES.WORKSPACE_OWNER_CHANGE_CHECK.getRoute(policyID, accountID, 'amountOwed' as ValueOf<typeof CONST.POLICY.OWNERSHIP_ERRORS>)); | |||
}, [accountID, policyID]); | |||
|
|||
// eslint-disable-next-line rulesdir/no-negated-variables |
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.
Hmm I don't think you should use the lint rule here.
You can just change the conditional
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.
I think the lint rule is a bit too strict, it should only block actual negated variable names like shouldNotShow
but not shouldShowNotFoundPage
because the not
here is not really a negated adverb. I think it's fine since we're already using it many places in App.
But I still updated as your feedback.
const shouldShowPage = member && (member.pendingAction !== DELETE || prevMember?.pendingAction !== DELETE);
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.
Thanks
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.
Ah ok, that makes sense, I guess that OK
Maybe you can add a comment to explain why the lint exception is appropriate.
I agree that shouldShowPage
is a confusing name.
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.
Reverted!
✋ 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/madmax330 in version: 1.4.75-0 🚀
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.75-1 🚀
|
Details
The side bar for the member remains open on the admin side after member leaves the workspace. This PR fixes that.
Fixed Issues
$ #40416
PROPOSAL: #40416 (comment)
Tests
=====
Offline tests
QA Steps
=====
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.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
video_2024-05-04_23-21-05.mp4
Android: mWeb Chrome
video_2024-05-04_23-21-00.mp4
iOS: Native
Screen.Recording.2024-05-04.at.22.57.13-compressed.mov
iOS: mWeb Safari
Screen.Recording.2024-05-04.at.22.54.45-compressed.mov
MacOS: Chrome / Safari
Screen.Recording.2024-05-04.at.22.43.11-compressed.mov
Untitled.mov
MacOS: Desktop
Screen.Recording.2024-05-04.at.22.50.35-compressed.mov