Closed kbecciv closed 4 months ago
Unsure what's best here. Between chat switcher and the compose box, there seems to be multiple issues with being slow or laggy :/
Tested again on latest staging version, still happening, regularly missing 1 or 2 keystrokes
Still a lil slow, I typed lucien
here then pressed enter quickly
https://github.com/Expensify/App/assets/22508304/074f163f-58ea-47d2-b9de-a8dd77023223
We're off hold, Fabric is live and the chat switch is still a lil slow, at least for me. In a few tests I did right now, it was just the first letter that doesn't show, if you type quickly after typing cmd+k
in Desktop. @filip-solecki , any thoughts on next best steps here?
I will try to find the root cause and hopefully also some solution in a few days
Hi! Coming back after investigation. The problem is in the BaseSelectionList. In the screenshot I uploaded, you can see that we deliberately delay the focus on the input. This was changed(by removing shouldDelayFocus flag) a long time ago to fix the focus problem when going back to the page with SelectionList. Basically, the only roving we can do in this case is to conditionally bypass setTimeout, in this particular case. It seems that just in this case the error mentioned above should not occur, because from the ChatSwitcher page it is not possible to go anywhere further and then go back to it.
@mallenexpensify
Thanks @filip-solecki . Does this affect other parts of the app too? I've been noticing that the first character often gets missed. ie. here I typed black
and only lack
shows.
cmd+k
to open the chat switcher and start typing, the first character (or more) don't show. I'd love to fix this if we can. Currently it can occur on every page with SelectionList when you start typing before animation transition is over.
Thanks @filip-solecki . What do you propose are the next best steps here? (I'm unfamiliar with SelectionList and def not an engineer).
The simplest solution might be to provide an option to bypass the timeout causing missing letters on certain pages where it's possible. This is not a perfect solution since there are pages that need this timeout to prevent previously mentioned bugswhen navigating back.
Another option is to discover an alternate solution for the aforementioned bug. The current timeout is essentially a workaround. If we can find a different approach, we won't need the timeout and the related issue will be eliminated.
Thanks @filip-solecki. Since this is a part of #newdot-quality and you're a member of the channel, can you start a conversation there about how we want to proceed? With more 👀, we might be able to find a solution that covers all bases. Thx
@filip-solecki posted in #newdot-quality here. I cross posted to the SWM room to see if any devs could dive in.
Here's the post from Filip
There's an ongoing issue related to the slow Chat Switcher that has existed for quite some time now. From my investigation, it appears that this issue is caused by the BaseSelectionList code fragment(attached). Specifically, the input in the SelectionList (which is implemented in numerous places, for example, the Chat Switcher) grabs focus only after the transition ends, which takes 300 milliseconds. Consequently, this might lead to missing a few characters.
Originally, the delay was incorporated to fix a different problem associated with navigation back to a page embedding a SelectionList.
Currently, we have two potential approaches we can undertake to fix this issue:
- Eliminate Delay in Some Pages - We could eliminate the delay on pages where backward navigation is not used. For instance, negating this delay in the Chat Switcher page would address the issue there, but there's a potential for it to recur on other pages.
- Find Alternative Solutions - Another tactic would be to discover another fix for the navigation issue, which would allow us to eliminate the timeout altogether. This would, in turn, automatically rectify the problem of missing characters.
Indeed, the second option seems inherently superior, though it could demand an extended period of research and testing to stumble upon an alternative solution for this issue. What are your thoughts?
followed up in slack
It seems like we either need to find someone internal to get on this and make it Daily
if we think it's truly CRITICAL, or lower the priority level so it is not CRITICAL.
PR is in review. Let me know if I can hellp with testing, I have a feeling regressions on this could be pretty bad.
@aimane-chnaif can you please accept the job and reply here once you have? https://www.upwork.com/jobs/~01bcbf7accb280d408
I reviewed the issue and PR, there are pretty much no comments on this issue but you reviewed the PR and made a couple comments, so I set the price at $250.
Accepted thanks. @mallenexpensify what do you think of https://github.com/Expensify/App/issues/43004#issuecomment-2179142446?
Contributor+: @aimane-chnaif paid $250 via Upwork.
@aimane-chnaif , for urgent issues, they need to have the High Priority
label in order to be auto-increased in price. The issue you linked to was an error that I'm addressing internally.
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
command+k
to open chat switcherExpected Result:
The characters you type show up in search
Actual Result:
Many characters are missed. ie. I typed
lauren
quickly and only then
showed.Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.73.0 Reproducible in staging?: n/a Reproducible in production?: n/a If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation
n/a
Expensify/Expensify Issue URL: Issue reported by: @mallenexpensify Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1695286362554219
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @mallenexpensify