-
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
Optimize last accessed report calculation #45494
Optimize last accessed report calculation #45494
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] |
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 notice this same thing and was thinking we should do something like this 👍🏼
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 |
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
🚀 Deployed to staging by https://github.com/francoisl in version: 9.0.10-2 🚀
|
🚀 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. |
🚀 Deployed to production by https://github.com/mountiny in version: 9.0.10-7 🚀
|
🚀 Deployed to production by https://github.com/francoisl in version: 9.0.11-5 🚀
|
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 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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2024-07-16.at.18.08.13.mov
MacOS: Desktop