Repository navigation
Fix: Saved search item remains highlighted after delete confirmation modal is dismissed - #95958
Conversation
|
@bernhardoj 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] |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
34a0ae3 to
3824dd3
Compare
3824dd3 to
c91031d
Compare
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safariweb.mp4 |
| isFocused?: boolean; | ||
|
|
||
| /** Track hover with native DOM listeners instead of React synthetic events for rows that open a portalled popover (web only). */ | ||
| shouldUseNativeHoverEvents?: boolean; |
There was a problem hiding this comment.
NAB, but I think it's a good idea to take the prop type from Hoverable.
type MenuItemBaseProps = ForwardedFSClassProps &
WithSentryLabel & Pick<Hoverable, 'shouldUseNativeHoverEvents'> & {
bernhardoj
left a comment
There was a problem hiding this comment.
LGTM! NAB above.
cc: @annaweber830
|
Hi @bernhardoj I updated my PR. |
|
Thanks! Waiting for @NikkiWines review |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 NikkiWines has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/NikkiWines in version: 9.4.35-1 🚀
|
No help site changes requiredI reviewed this PR against the help site articles under Why: This is an internal bug fix for how a row's hover highlight is tracked. It swaps React's synthetic The change is entirely mechanical/behavioral:
Nothing here alters documented behavior of Saved Searches or any other feature, so the help site remains accurate as-is. @annaweber830 — because no help site changes are required, I did not create a draft docs PR, so there's nothing to mark |
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.4.35-6 🚀
|
Explanation of Change
Track the row's hover with the native mouseenter/mouseleave events instead of the synthetic ones, behind a new opt-in prop. Native boundary events fire only when the pointer actually crosses the row's real DOM boundary, so the portalled popover can neither deliver a false enter to latch nor swallow the real leave — every dismissal (Delete, Share, Escape, click-outside) clears it.
Add an opt-in shouldUseNativeHoverEvents prop (default false) to Hoverable/ActiveHoverable.
In ActiveHoverable, conditionally subscribe to EITHER native OR synthetic — never both (addressing "we don't subscribe to native mouseenter" and "we still subscribe to React's").
Thread the prop MenuItem → Hoverable, and enable it only for the saved-search rows in createBaseSavedSearchMenuItem (used by SavedSearchList) — flowing through MenuItemList's existing props spread — so every other Hoverable keeps the synthetic behavio.
Fixed Issues
$ #95617
PROPOSAL: #95617 (comment)
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.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
619727463-d5adcfe4-6ef9-45f5-a392-df7f9c75ada9.mp4