-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Improve ActiveHoverable CPU performance #54744
Improve ActiveHoverable CPU performance #54744
Conversation
…to zirgulis/improve-ActiveHoverable-cpu-performance
🚧 @mountiny has triggered a test build. You can view the workflow run here. |
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
|
@mountiny I'm not sure what are the testing steps for the Fullstory QA part, therefore left as TBD in PR's the description |
I have added some generic steps, I am also not sure about anything specific to check but mainly just checking if the sessions are looking fine |
@zirgulis is there a GH issue this is associated with? And is this ready for C+ review/testing or not yet? |
It is coming from this thread in quality https://expensify.slack.com/archives/C05LX9D6E07/p1736326697079059 Made an issue for it and assigned you all 🙌 #55652 @brunovjk can you please complete the review and testing? @amyevans for the QA I think the crucial part is to ensure in staging that the fullstory sessios are recorded just fine even after this change (hence InternalQA) |
I'm afk for a couple of hours, I will review it as soon as I get home. If it's urgent, please reassign |
Okay great, thanks for creating the issue!
Cool, I verified I see sessions in FS currently following the |
Reviewer Checklist
Screenshots/VideosAndroid: NativeN/A Android: mWeb ChromeN/A iOS: NativeN/A iOS: mWeb SafariN/A MacOS: Chrome / Safari54744_chrome.mov54744_chrome_perf_result.movMacOS: Desktop54744_desktop.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.
Looking good to me.
@mountiny do we need any more reviewers/approvals? |
@mountiny you want to take a look too or nah? |
@amyevans All good, going to merge it now that you approved, thank you! |
✋ 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/mountiny in version: 9.0.90-0 🚀
|
✅ Internal QA passes on staging |
🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.0.90-6 🚀
|
if (!elementRef.current?.contains(event.target as Node) && !elementRef.current?.contains(event.relatedTarget as Node) && !shouldFreezeCapture) { | ||
setIsHovered(false); | ||
} |
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 this logic caused a regression here #57022, we fix it removing the whole logic for onblur, as it was no longer relevant.
Explanation of Change
The ActiveHoverable component manages hover states for interactive elements in our web interface. The original implementation used multiple event listeners, including a global document-level mouseover listener, which was causing performance overhead, especially in views with many hoverable elements.
Fixed Issues
$ #55652
PROPOSAL:
Optimize hover state management by:
Tests
ActiveHoverable component is used everywhere across the web/desktop application, therefore it's CRUCIAL to test and validate that it works the same as before.
Testing steps:
Offline tests
Testing steps:
QA Steps
Testing steps:
Fullstory testing:
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)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.2025-01-22.at.17.15.26.mp4
MacOS: Desktop
Screen.Recording.2025-01-22.at.17.22.10.mp4