Optimize last accessed report calculation#45494
Merged
francoisl merged 1 commit intoExpensify:mainfrom Jul 18, 2024
Merged
Conversation
|
@rayane-djouah 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] |
roryabraham
approved these changes
Jul 16, 2024
Contributor
roryabraham
left a comment
There was a problem hiding this comment.
Just notice this same thing and was thinking we should do something like this 👍🏼
Contributor
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-07-18.at.10.57.24.PM.movAndroid: mWeb ChromeScreen.Recording.2024-07-18.at.10.55.26.PM.moviOS: NativeScreen.Recording.2024-07-18.at.10.54.05.PM.moviOS: mWeb SafariScreen.Recording.2024-07-18.at.10.52.15.PM.movMacOS: Chrome / SafariScreen.Recording.2024-07-18.at.10.49.24.PM.movMacOS: DesktopScreen.Recording.2024-07-18.at.10.50.35.PM.mov |
francoisl
approved these changes
Jul 18, 2024
Contributor
|
🚀 Deployed to staging by https://github.com/francoisl in version: 9.0.10-2 🚀
|
Contributor
|
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.0.10-3 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
Contributor
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.0.10-7 🚀
|
Merged
50 tasks
Contributor
|
🚀 Deployed to production by https://github.com/francoisl in version: 9.0.11-5 🚀
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Details
#44955 was partially reverted in #45224, because of the issue mentioned in the latter. This has still improved the performance, but since the calculation has been moved outside the useEffect it was still being affected by the component re-renders. The main issue in the original PR was caused by the fact that since the useEffect wasn't dependable on the app loading state, the reports fetched weren't up-to-date inside of the useEffect. Now the issue should be fixed regaining the advantage lost in the PR revert.
Fixed Issues
$ #45212
PROPOSAL:
Tests
Navigate to https://staging.new.expensify.com
User A: Log in with a new Gmail account
User A: Create a workspace
User A: Navigate to Workspace settings - Members
User A: Invite a Gmail address that doesn't have an account yet (User B)
User B: Open Chrome in incognito mode
User B: Navigate to https://staging.new.expensify.com/
User B: Log in
Verify that no errors appear in the JS console
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2024-07-16.at.18.08.13.mov
MacOS: Desktop