-
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 pending delete room members are not strikethrough-ed #39231
Fix pending delete room members are not strikethrough-ed #39231
Conversation
@@ -50,7 +50,7 @@ const getAllParticipants = ( | |||
!!userPersonalDetail?.login && !CONST.RESTRICTED_ACCOUNT_IDS.includes(accountID) ? LocalePhoneNumber.formatPhoneNumber(userPersonalDetail.login) : translate('common.hidden'); | |||
const displayName = PersonalDetailsUtils.getDisplayNameOrDefault(userPersonalDetail); | |||
|
|||
const pendingChatMember = report?.pendingChatMembers?.find((member) => member.accountID === accountID.toString()); | |||
const pendingChatMember = report?.pendingChatMembers?.findLast((member) => member.accountID === accountID.toString()); | |||
return { |
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.
So, I applied the fix to the report participants page too, but when I tested it, I found out that removing a WS member removes the user completely from the report participants, so we can't see it getting strikethrough. (see video below).
Screen.Recording.2024-03-29.at.18.28.35.mov
This is the same issue as #31764, just on a different page. (they fix for room members, but not for announce report participants)
We can fix this with the same solution by removing this optimistic code that removes the user from the list. Do we want to do it here? Or should #31764 handle it as part of the issue?
App/src/libs/actions/Policy.ts
Line 783 in 5a8cb7f
const remainUsers = announceReport.participantAccountIDs.filter((e) => !accountIDs.includes(e)); |
App/src/libs/actions/Policy.ts
Lines 786 to 792 in 5a8cb7f
announceRoomMembers.onyxOptimisticData.push({ | |
onyxMethod: Onyx.METHOD.MERGE, | |
key: `${ONYXKEYS.COLLECTION.REPORT}${announceReport.reportID}`, | |
value: { | |
participantAccountIDs: [...remainUsers], | |
visibleChatMemberAccountIDs: [...remainUsers], | |
pendingChatMembers, |
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.
Yeah, would be great to do it here in this PR if you can. 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.
Reviewer Checklist
Screenshots/VideosAndroid: Native39231.Android.mp4Android: mWeb Chrome39231.mWeb-Chrome.mp4iOS: Native39231.iOS.moviOS: mWeb Safari39231.mWeb-Safari.movMacOS: Chrome / Safari39231.Web.mp4MacOS: Desktop39231.Desktop.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!
@francoisl looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
Not an emergency, that's a bug with the merge checks. |
✋ 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/francoisl in version: 1.4.59-0 🚀
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.4.60-13 🚀
|
Details
We store the pending action as a list, but we get the first pending action instead of the last, so the delete pending action is never detected.
Fixed Issues
$ #38821
PROPOSAL: #38821 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
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
Screen.Recording.2024-03-29.at.18.17.30.mov
Android: mWeb Chrome
Screen.Recording.2024-03-29.at.18.20.26.mov
iOS: Native
Screen.Recording.2024-03-29.at.18.16.03.mov
iOS: mWeb Safari
Screen.Recording.2024-03-29.at.18.08.48.mov
MacOS: Chrome / Safari
Screen.Recording.2024-03-29.at.18.03.52.mov
MacOS: Desktop
Screen.Recording.2024-03-29.at.18.05.38.mov