-
Notifications
You must be signed in to change notification settings - Fork 3k
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/26409: Reset confirmation modal if accountIDs changed #27411
Conversation
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.
A question and some cleanup.
@@ -107,8 +107,12 @@ function WorkspaceMembersPage(props) { | |||
useEffect(() => { | |||
validateSelection(); | |||
}, [props.preferredLocale, validateSelection]); | |||
|
|||
const accountIDs = useMemo(() => _.keys(props.policyMembers), [props.policyMembers]); |
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.
Whats the reason to use useMemo
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.
@mollfpr accountIDs is calculated from policyMembers so I put it in useMemo to avoid re-calculate it. But if you see it is unnecessary we can remove useMemo
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.
@DylanDylann I guess we can keep it. It make sense.
@mollfpr Bump |
Reviewer Checklist
Screenshots/VideosWeb27411.Web.mp427411.Web.2.mp4Mobile Web - Chrome27411.mweb-chrome.mp427411.mweb-chrome.2.mp4Mobile Web - Safari27411.mWeb.Safari.mp427411.mWeb-Safari.2.mp4Desktop27411.Desktop.mp427411.Desktop.2.mp4iOS27411.iOS.mp427411.iOS.2.mp4Android27411.Android.mp427411.Android.2.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 and tests well 👍
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!
✋ 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/johnmlee101 in version: 1.3.71-0 🚀
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.3.71-12 🚀
|
Details
The delete confirmation modal should be closed if accountIDs changed. This PR does that
Fixed Issues
$ #26409
PROPOSAL: #26409 (comment)
Tests
Original Bug
Additional Bug 1
3. Go offline
4. Invite a member (not exist yet like "qweqwe@gmail.com") to the workspace.
5. Select the member and click on "Remove."
6. Go online
7. Verify that the delete confirmation modal is closed
Additional Bug 2
3. Go offline
4. Invite a member (who we chatted before) to the workspace.
5. Select the member and click on "Remove."
6. Go online
7. Verify that the delete confirmation modal still remained
Offline tests
QA Steps
Original Bug (only reproduce on WEB)
Additional Bug 1
3. Go offline
4. Invite a member (not exist yet like "qweqwe@gmail.com") to the workspace.
5. Select the member and click on "Remove."
6. Go online
7. Verify that the delete confirmation modal is closed
Additional Bug 2
3. Go offline
4. Invite a member (who we chatted before) to the workspace.
5. Select the member and click on "Remove."
6. Go online
7. Verify that the delete confirmation modal still remained
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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
Web
OP Bug
https://github.com/Expensify/App/assets/141406735/49ca9dfb-0fb8-4807-8597-1615cf39830c
Additional Bug
https://github.com/Expensify/App/assets/141406735/eee29fdc-25ae-42fb-b2bf-3d8ea1b2be73
Mobile Web - Chrome
Screen.Recording.2023-09-14.at.13.22.54.1.mp4
Mobile Web - Safari
Screen.Recording.2023-09-14.at.13.09.10.1.mp4
Desktop
OP Bug
https://github.com/Expensify/App/assets/141406735/288cbff9-9c9e-4aad-8214-3d7e3928d796
Additional Bug
https://github.com/Expensify/App/assets/141406735/34bc4754-2d98-4880-84c6-b216eb84ba43
iOS
Screen.Recording.2023-09-14.at.15.57.08.mp4
Android
Screen.Recording.2023-09-14.at.16.10.42.mp4