fix: search header flickering on selection mode - #49510
Conversation
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid-app-2024-09-26_11.32.31.mp4Android: mWeb Chromeandroid-chrome-2024-09-20_13.39.36.mp4iOS: Nativeios-native-2024-09-20_13.43.35.mp4iOS: mWeb Safariios-safari-2024-09-20_13.45.34.mp4MacOS: Chrome / Safaridesktop-chrome-2024-09-20_13.26.15.mp4MacOS: Desktopdesktop-app-2024-09-20_13.31.31.mp4 |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
|
@jjcoffee I updated, please test again. Thanks! |
This comment was marked as resolved.
This comment was marked as resolved.
|
@jjcoffee Just to confirm, when selection mode is enabled and no item is selected, we should turn off selection mode when navigating to another route, and only keep selection mode on if there's at least one item selected, correct? |
|
@daledah That's correct as that's the behaviour on current main/staging. |
|
@jjcoffee I updated Screen.Recording.2024-09-26.at.15.56.38.mov |
|
@aldo-expensify I updated, please review again, thanks! |
aldo-expensify
left a comment
There was a problem hiding this comment.
Thanks, this looks better. I left a suggestion there to avoid casting.
|
@aldo-expensify I updated. |
The merge-base changed after approval.
The merge-base changed after approval.
|
There seems to be a bug not allowing me to approve:
https://github.com/orgs/community/discussions/58535?sort=top |
The merge-base changed after approval.
|
Closing and reopening the PR fixed it :) |
|
✋ 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/aldo-expensify in version: 9.0.47-1 🚀
|
|
🚀 Deployed to production by https://github.com/thienlnam in version: 9.0.47-4 🚀
|
| if (selectedItems.length > 0 && !selectionMode?.isEnabled) { | ||
| turnOnMobileSelectionMode(); | ||
| } else if (selectedItems.length === 0 && selectionMode?.isEnabled && !wasSelectionOnRef.current) { | ||
| turnOffMobileSelectionMode(); |
There was a problem hiding this comment.
In the case when There are actively two SelectionListWithModal on the screen, we didn't have the logic to limit the changes to only the focused list.
In the case of #50555, there are two Lists on the screens: a parent Tag list and a child Tag list. When we select a child tag, turnOnMobileSelectionMode is called as expected, but the parent Tag list has no selected item, which makes turnOffMobileSelectionMode called at the same time, result in selection mode not enabled.

Details
Fixed Issues
$ #49084
PROPOSAL: #49084 (comment)
Tests
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
Screen.Recording.2024-09-20.at.11.42.04.mov
Android: mWeb Chrome
Screen.Recording.2024-09-20.at.11.44.07.mov
iOS: Native
Screen.Recording.2024-09-20.at.11.29.17.mov
iOS: mWeb Safari
Screen.Recording.2024-09-20.at.11.35.15.mov
MacOS: Chrome / Safari
Screen.Recording.2024-09-20.at.11.19.22.mov
MacOS: Desktop
Screen.Recording.2024-09-20.at.11.58.55.mov