Fix - Web - Blue selection border on plan option after a refresh#54682
Conversation
|
@hoangzinh 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] |
|
I am having trouble building for android native. |
|
@FitseTLT there is a failed unit tests in your new tests |
@hoangzinh the problem was caused by the unit test importing always the native code; I proved that b/c the test passes if I delete the native file. So I fixed it by separating the implementation in a different file and importing it 👍 U can proceed. |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2025-01-31.at.21.28.29.android.movAndroid: mWeb ChromeScreen.Recording.2025-01-31.at.21.29.37.android.chrome.moviOS: NativeScreen.Recording.2025-01-31.at.21.41.24.moviOS: mWeb SafariScreen.Recording.2025-01-31.at.21.30.51.ios.safari.movMacOS: Chrome / SafariScreen.Recording.2025-01-31.at.21.23.57.web.movMacOS: DesktopScreen.Recording.2025-01-31.at.21.27.07.desktop.mov |
|
@FitseTLT it seems we haven't fixed this issue completely, when reload the page the blue selection border does not show but when I start to select options, it shows again Screen.Recording.2025-01-03.at.17.14.23.mov |
|
@hoangzinh Fixed U can proceed |
|
Bug 2: It doesn't sync focus in the first key down press. It only works from 2nd time Screen.Recording.2025-01-22.at.22.07.36.mov |
|
@hoangzinh Fixed |
The problem where the syncing didn't work on the first key press was caused because the key down event listener in useSyncFocus was called after the focus on the item was changed so syncing wasn't happening as the hasKeyBeenPressed ref will be false by the time the effect runs. So, now we activate the sycing immediately on focus change via arrow (useArrowKeyFocusManager) and also when other key presses happen (SelectionList). |
hoangzinh
left a comment
There was a problem hiding this comment.
Sorry for late review. It works for me. Just a few feedbacks
|
|
||
| return () => removeKeyDownPressListener(setHasKeyBeenPressed); | ||
| }, [setHasKeyBeenPressed]); | ||
|
|
There was a problem hiding this comment.
Same, some comments might help for whoever comes here in the future.
There was a problem hiding this comment.
@cristipaval I added a comment here
App/src/components/SelectionList/BaseSelectionList.tsx
Lines 328 to 330 in 1c9c6a7
Isn't that enough? Because here the name of the ref already gives a hint why it is being set on key down event. WDYT
There was a problem hiding this comment.
yes, I think that should be enough to know the reason for this code. Thanks
|
✋ 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/cristipaval in version: 9.0.95-0 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.0.95-6 🚀
|
| (shouldDebounceScrolling ? debouncedScrollToIndex : scrollToIndex)(index, true); | ||
| } | ||
| }, | ||
| ...(!hasKeyBeenPressed.current && {setHasKeyBeenPressed}), |
There was a problem hiding this comment.
passing this prop optionally refreshes the component, which then reregisters the arrow focus manage,r causing #75633
Details
Fixed Issues
$ #54502
PROPOSAL: #54502 (comment)
Tests
Offline tests
Same as above
QA Steps
Same as above
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel so 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: mWeb Chrome
aw.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
iw.mp4
MacOS: Chrome / Safari
w.mp4
MacOS: Desktop
d.mp4