Add loading skeleton to SearchRouter#64796
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] |
|
@sosek108 Could you please explain how you fix the previous regression? |
|
@DylanDylann The problem was with skeleton we've put in There was a brief moment that both skeleton and empty list was rendered. Empty list rendered as View with background and that created the problem. This time I do not add that skeleton, I've only added skeleton to |
|
@sosek108 With this PR, the white page still displays instead of the skeleton. Although shouldShowList is true but the data is still not ready Screen.Recording.2025-06-26.at.14.38.15.mov |
|
@sosek108 Could we check the sections.data.length > 0 if true, we will render the sectionList otherwise, we will display the skeleton |
|
@DylanDylann can you check wich logging if |
|
@DylanDylann I've resolved conflicts. PR Mentioned someday by me was merged so the overall perfomance should be improved here. I've added skeleton in As this issue is observed on |
|
@sosek108 From my testing, the white screen still displays for a long time and the loading skeleton doesn't even appear Screen.Recording.2025-06-30.at.11.55.58.mov |
|
@DylanDylann can you confirm if |
|
@sosek108 Yes
Screen.Recording.2025-06-30.at.21.14.31.mov |
|
@sosek108 Any update? |
|
@DylanDylann this is how it looks at my end (large Onyx State): Nagranie.z.ekranu.2025-07-7.o.12.23.26.movDo you have latest branch? I've merged |
|
Let me try again |
|
I still see this situation. I can reproduce it consistently
Screen.Recording.2025-07-07.at.18.37.49.mov |
|
@DylanDylann can you share your onyx state? |
|
I DMed you |
|
@DylanDylann can we push this forward? |
|
@sosek108 Sorry for the delay. I am checking again |
|
It still doesn't display the loading skeleton on my side. Relating this place App/src/components/Search/SearchAutocompleteList.tsx Lines 729 to 732 in 17e84c8 SelectionList only be rendered if areOptionsInitialized is true --> It means that showLoadingPlaceholder prop will alway be false |
|
@sosek108 Let's see the video below, when opening the search page, the loading skeleton is displayed first (but in this time, I see shouldShowList is true -> it means that this loading skeleton is handled in SelectionList) and then It displays the white space.
Screen.Recording.2025-07-17.at.14.03.47.mov |
|
@sosek108 Any updates? |
|
@sosek108 Alright, Thanks for your summary |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeScreen.Recording.2025-08-05.at.14.36.08.moviOS: HybridAppScreen.Recording.2025-08-05.at.16.04.10.moviOS: mWeb SafariScreen.Recording.2025-08-05.at.14.34.41.movMacOS: Chrome / SafariScreen.Recording.2025-08-05.at.14.28.17.movMacOS: DesktopScreen.Recording.2025-08-05.at.14.33.18.mov |
DylanDylann
left a comment
There was a problem hiding this comment.
LGTM. @sosek108 Could you please update the PR description to reflect all new updates?
|
@DylanDylann yeah, done |
|
@yuwenmemon Could you take a look at this PR? Thanks |
|
Can you resolve the conflicts? Thanks. |
|
cc @sosek108 |
|
Conflicts are resolved |
|
@yuwenmemon kindly bump |
|
✋ 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/yuwenmemon in version: 9.1.96-0 🚀
|
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.1.96-2 🚀
|
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.1.96-2 🚀
|

Explanation of Change
This change improves the user experience of the search autocomplete by allowing the component to render even when data is still loading. We update conditional renderings on
SearchRouterto show loading skeleton while data from onyx is loading. TheSearchAutocompleteListis rendered only if data required by it is ready - otherwise user will be presented with loading skeletonFixed Issues
$ #62335
PROPOSAL: #62335 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand 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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop