-
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
[CP Staging] fix: ReportScreen props not updating #35638
Conversation
@aimane-chnaif 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] |
In this PR, let's make sure that we're not missing any key remaining to be added to memo.
|
This time, please check all properties in |
Yes, I was aware of that and as I mentioned in PR description, I have used |
Thanks, also check in isPinned, chatReportID, visibility were examples |
Lint failing |
Just to confirm: if all values are same but just json object (i.e. order) is changed, this will be treated as equal, right? i.e. |
Yeah that's correct. |
I am verifying all the missing keys and will let you know once done. |
@aimane-chnaif Looks good now, I have verified the report props throughout the React tree and util methods. 🙏 |
👋 How are we getting on here, guys? Keen to resolve this as one of the last blockers for the deploy. Thanks! |
@aimane-chnaif I have brought back the individual comparison and double checked it so no property is missing which is used. |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeScreen.Recording.2024-02-02.at.12.22.29.PM.moviOS: mWeb SafariScreen.Recording.2024-02-02.at.12.26.30.PM.movMacOS: Chrome / SafariMacOS: Desktop |
Seems like there's navigation bug on back button on main (after ideal nav PR merge) |
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.
Works well on iOS.
Not able to test other mobile platforms because of navigation bug - #35626
I used tricky way to test iOS (swipe left instead of back button)
[CP Staging] fix: ReportScreen props not updating (cherry picked from commit d02ee8d)
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 1.4.35-7 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 1.4.35-7 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 1.4.35-7 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.35-7 🚀
|
Details
This fixes the recent regression which happened due to some report properties not added to the memo. I have added
_.isEqual(prevReport, nextReport)
and the reason is that we inReportScreen
already construct a newreport
object leveraginguseMemo
. So when this object is passed to children it will maintain it's instance if no dependency changes.Fixed Issues
$ #35590
PROPOSAL: #35590 (comment)
Tests
Go to workspace chat
Create a distance request
Navigate to request details page
Tap Distance
Change the distance and save it
The amount should be updated
Verify that no errors appear in the JS console
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 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)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label 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
android-fix.mp4
Android: mWeb Chrome
N/A
iOS: Native
ios-fix.mp4
iOS: mWeb Safari
N/A
MacOS: Chrome / Safari
N/A
MacOS: Desktop
N/A