-
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: deleted workspace room display in task share somewhere #41636
Conversation
Reviewer Checklist
Screenshots/VideosAndroid: NativeassignTaskAndroid.mp4Android: mWeb ChromeassignTaskAndroidChrome.mp4iOS: NativeassignTaskiOS.mp4iOS: mWeb SafariassignTaskiOSSafari.mp4MacOS: Chrome / SafariassignTaskChrome.mp4MacOS: DesktopassignTaskDesktop.mp4 |
if (replaceIndex === -1) { | ||
return; | ||
} | ||
const newReports = OptionsListUtils.createOptionList({}, reports).reports; |
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.
Generating the whole optionList whenever any report changes looks inefficient. Can we just update the last three or five updated reports?
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.
Updated. Deleting workspace is too buggy for me. I couldn't delete one. Even if so, the #admins
and #accounce
room are not archived.
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 am sorry. I see that there can be many policy expense chats of other invited members as well. So just deleting 5 reports might not suffice because the other reports still appear in the results.
deleteFiveReports.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.
Reverted!
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
|
||
setOptions((prevOptions) => { | ||
const newOptions = {...prevOptions}; | ||
newOptions.reports[replaceIndex] = newOption; |
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.
Just wanted to note that the old code was mutating data here which is pretty bad in React.
✋ 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/aldo-expensify in version: 1.4.74-0 🚀
|
Looks like this had some side effects in other lists - #42189 (comment) - let me know what you think! |
if (replaceIndex === -1) { | ||
return; | ||
} | ||
const newReports = OptionsListUtils.createOptionList({}, reports).reports; |
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.
Why we are passing empty object for the personal details? The personal details are used to get the correct icons. This is causing #42232. While testing I also found that the list becomes irresponsive and get into infinite loop (could be related to change here too?)
🚀 Deployed to production by https://github.com/chiragsalian in version: 1.4.74-6 🚀
|
|
||
if (!lastUpdatedReport) { | ||
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.
Removing the return early when no existing item need to update allow this useEffect
to handle adding the new items which should handle in the next useEffect that lead to duplicated new items in the list, and it handled here #43094
Details
Deleted workspace room display in task's share somewhere list. This PR fixes that.
Fixed Issues
$ #41062
PROPOSAL: #41062 (comment)
Tests
#admins
room does not showOffline tests
NA
QA Steps
#admins
room does not showPR 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_16-27-13.mp4
Android: mWeb Chrome
video_2024-05-04_16-34-08.mp4
iOS: Native
Screen.Recording.2024-05-04.at.16.25.49-compressed.mov
iOS: mWeb Safari
Screen.Recording.2024-05-04.at.16.30.19-compressed.mov
MacOS: Chrome / Safari
Screen.Recording.2024-05-04.at.16.13.25-compressed.mov
MacOS: Desktop
Screen.Recording.2024-05-04.at.16.17.30-compressed.mov