fix: status has blue border when refresh page#61454
Conversation
|
@DylanDylann 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] |
|
@DylanDylann While working on this |
|
I am afraid that refactoring to use SelectionList will cause unexpected problems. @linhvovan29546 Wdyt if we use your second approach |
|
@DylanDylann We’ve used SelectionList in multiple places, such as the Priority Mode and Languages pages,etc. So I think this is fine. This change improves the behavior compared to the previous implementation. I'm not sure why we previously not use SelectionList.
As shown in the video above, pressing 'Tab' now behaves differently from before and is incorrect |
I think we can ask the internal engineer of that change for more context—what do you think? |
Ahh oke, Got it |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2025-05-12.at.15.02.15.movAndroid: mWeb ChromeScreen.Recording.2025-05-12.at.15.00.52.moviOS: HybridAppScreen.Recording.2025-05-12.at.15.02.47.moviOS: mWeb SafariScreen.Recording.2025-05-12.at.15.00.06.movMacOS: Chrome / SafariScreen.Recording.2025-05-12.at.14.59.13.movMacOS: DesktopScreen.Recording.2025-05-12.at.15.03.30.mov |
DylanDylann
left a comment
There was a problem hiding this comment.
The change looks great
|
It is fine to me, let's wait for thoughts from the design team |
|
Hi @dubielzyk-expensify Could you help confirm the comment above? ^ #61454 (comment) |
|
@linhvovan29546 test failed. could you please take a look? |
|
The test failure doesn't seem related to this change, it might be resolved after i merge main again. |
|
@rafecolton Could you please take a look at this PR? |
|
✋ 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/rafecolton in version: 9.1.47-0 🚀
|
|
🚀 Deployed to production by https://github.com/arosiclair in version: 9.1.47-6 🚀
|
|
🚀 Deployed to production by https://github.com/arosiclair in version: 9.1.47-6 🚀
|
|
🚀 Deployed to production by https://github.com/arosiclair in version: 9.1.47-6 🚀
|



Explanation of Change
In the
StatusClearAfterPage, we currently useRadioListIteminside a .map() function to render the list of selection options. When the page is refreshed, it triggers theshouldSyncFocuslogic, which causes blue focus border on the selected option.To resolve this, this PR replaces the .map() approach with
SelectionList, which handles focus and selection more appropriately.Additionally, the page is currently wrapped with
FormProvider, which is unnecessary here since it is only used to supportScrollView. This causes the following warning:"VirtualizedLists should never be nested inside plain ScrollViews with the same orientation."
Therefore, we also remove
FormProviderin this PR to prevent the nesting conflict.Fixed Issues
$ #60766
PROPOSAL: #60766 (comment)
Tests
Test 1: Blue Border Should Not Appear on "Never" Selection
✅ Expected Result: The "Never" option should remain selected, and there should be no blue border around it.
Test 2: Keyboard Navigation in Clear After Dropdown
✅ Expected Result: The highlighted option should update correctly, and the selected option should be applied as expected.
Offline tests
Same as test above
QA Steps
Same as test above
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)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.2025-05-06.at.11.47.49.mov
Android: mWeb Chrome
Screen.Recording.2025-05-06.at.11.50.08.mov
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2025-05-06.at.11.46.17.mov
MacOS: Desktop
Screen.Recording.2025-05-06.at.13.58.53.mov