Add debounce on SearchAutocompleteInput#62582
Conversation
|
A performance test is failing likely due to fewer renders. |
|
I can review this PR as I am assigned to the related issue #59262 (comment) |
|
@parasharrajat , sure! Go ahead. Let me know if you cannot. |
|
@parasharrajat can you please review now? thanks! |
|
Yes, doing in few minutes. |
|
BUG:Web: Sometimes Cursor jumps back and typed charactors are deleted. Steps:
23.05.2025_00.41.47_REC.mp4 |
|
BUG: Android: Same as before, the last typed character blinks. Steps;
23.05.2025_00.44.26_REC.mp4 |
|
@parasharrajat I will investigate letter blinking. The pointer shift issue is on main already so this is not related to my change. I suspect that this is related to markdown and parser functionality. This also causes problem with text selection on iPhone |
|
Ok, great. Let's get that character blinking fixed. |
|
The problematic line is here
Example: I'll push commit to try move some logic to SearchInput |
|
Unfortunately this is not easy. Doing so repaired blinking issue but introduced others issues. |
|
@parasharrajat I think I did find good solution for that. I've pushed my update |
|
Reviewinfg in 15 minutes. |
Screenshots🔲 iOS / native🔲 iOS / Safari🔲 MacOS / Desktop🔲 MacOS / Chrome🔲 Android / Chrome🔲 Android / native |
|
Web: I noticed that on the Reports search page, sometimes the search text in the autocomplete list is not in sync with the search value. Check the last few seconds of the vid. On staging, it quickly updates to the search value but here it takes time, seems like waiting for the search to complete. I couldn't get the staging build to run locally on this PR to compare that, but letting you know. 27.05.2025_20.33.50_REC.mp4 |
|
@parasharrajat It does not replicate on my side. Could you please share onyx state with me? Could you also verify if this occurs on this Draft PR? #62962 |
|
Sure, let me check. which key's value do you want? |
|
@parasharrajat I've added one quick change. Could you please test it? edit: no, it's not good. Previous error showed up. This |
|
@sosek108 do you htink we should keep this open or close? |
|
We can close this PR |




Explanation of Change
This PR provides debounce effect of 300 ms to
SearchAutocompleteInputmain goal is to minify API calls and rerenders while user is actively typing.Fixed Issues
$ #62106
PROPOSAL:
Tests
Offline tests
N/A
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
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