fix: Workspace switcher - Selection disappears after erasing character with workspace selected.#44222
Conversation
…r with workspace selected. Signed-off-by: Krishna Gupta <belivethatkg@gmail.com>
|
@dubielzyk-expensify @hoangzinh One of you needs to 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] |
| if ((prevTextInputValue === textInputValue && flattenedSections.selectedOptions.length === prevSelectedOptionsLength) || flattenedSections.allOptions.length === 0) { | ||
| return; | ||
| } | ||
| // Remove the focus if the search input is empty or selected options length is changed else focus on the first non disabled item |
There was a problem hiding this comment.
Can you update the comment here as well?
There was a problem hiding this comment.
updated to:
// Remove the focus if the search input is empty or selected options length is changed (and allOptions length remains the same)
// else focus on the first non disabled itemSigned-off-by: Krishna Gupta <belivethatkg@gmail.com>
|
@Krishna2323 can you merge the latest main to our PR? I'm getting this error when trying to do recordings |
|
@hoangzinh, done. |
|
oops @Krishna2323 lint is failed |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-06-26.at.20.14.56.android.movAndroid: mWeb ChromeScreen.Recording.2024-06-26.at.20.13.58.android.chrome.moviOS: NativeScreen.Recording.2024-06-26.at.20.10.43.ios.moviOS: mWeb SafariScreen.Recording.2024-06-26.at.20.11.58.ios.safari.movMacOS: Chrome / SafariScreen.Recording.2024-06-26.at.19.43.53.web.movMacOS: DesktopScreen.Recording.2024-06-26.at.19.44.39.desktop.mov |
|
✋ 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 production by https://github.com/jasperhuangg in version: 9.0.3-7 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.0.5-13 🚀
|
| const newSelectedIndex = textInputValue === '' || flattenedSections.selectedOptions.length !== prevSelectedOptionsLength ? -1 : 0; | ||
| // Remove the focus if the search input is empty or selected options length is changed (and allOptions length remains the same) | ||
| // else focus on the first non disabled item | ||
| const newSelectedIndex = |
There was a problem hiding this comment.
@hoangzinh 👋 , I think this might be a add on here, but we should had removed the focus if the search input is empty and prev search input not empty, the bug was caught during regression testing here, So not quite sure if the behaviour changed over the months.
This caused #50562

Details
Fixed Issues
$ #36140
PROPOSAL: #36140 (comment)
Tests
Workk.k.Offline tests
Workk.k.QA Steps
Workk.k.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_native.mp4
Android: mWeb Chrome
android_chrome.mp4
iOS: Native
ios_native.mp4
iOS: mWeb Safari
ios_safari.mp4
MacOS: Chrome / Safari
web_chrome.mp4
MacOS: Desktop
desktop_app.mp4