Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.54k stars 2.88k forks source link

[HOLD for payment 2024-01-22] [$1000] Desktop - FAB - Modal for 'Send Message' freezes when opened #28916

Closed lanitochka17 closed 9 months ago

lanitochka17 commented 1 year ago

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:

  1. Open the testing desktop app
  2. Click on the FAB button
  3. Click on Send message
  4. Repeat 2-3 times

Expected Result:

Modal opens without any lags or freezes

Actual Result:

Modal freezes when it is opened / sometimes the sliding motion is neglected and it appears immediately without any sliding effect

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

Version Number: 1.3.78.0

Reproducible in staging?: Yes

Reproducible in production?: Yes

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

https://github.com/Expensify/App/assets/78819774/39206801-5320-47fb-9d9c-2347b8476204

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01a81bbd7ec35b9394
  • Upwork Job ID: 1709988778512769024
  • Last Price Increase: 2023-11-06
muttmuure commented 11 months ago

Sorry I missed this last week - I will call it out asking for a volunteer when I do the weekly update this week

muttmuure commented 11 months ago

Is this to do with FlatList specifically?

@TMisiukiewicz and @adhorodyski might have some insights into what is going wrong here

muttmuure commented 11 months ago

Going to try to get the performance update out tonight

muttmuure commented 11 months ago

performance update going out today

muttmuure commented 11 months ago

Update went out - @hurali97 and @kacper-mikolajczak are going to take a look

hurali97 commented 11 months ago

Hey 👋

We have some findings from our investigation and we want to share those with you.

The above fixes the issue but during the investigation we also found that there are many react commits when we close the Modal and they amount to more than 130+ in numbers, to fix those we suggest following options:

Lastly, we will also benefit from the improvements in this PR, since it targets the transition improvements for SearchPage on slower devices. For example, BaseOptionsSelector also underperforms in our case, which is optimised in the linked PR. Once that PR is merged, we can simply sync main in our new PR that we will create.

The results below are from the main branch and from all of the improvements mentioned above ( including some parts of the linked PR )

Result from main:

https://github.com/Expensify/App/assets/47336142/b7e2d0d5-3199-45ca-bbff-b44a062dd48a

Result from Improvements:

https://github.com/Expensify/App/assets/47336142/05c5aae9-9918-4546-8f49-9cc7ebe76c89


lschurr commented 11 months ago

What's next on this one @eVoloshchak @muttmuure @Julesssss?

Julesssss commented 10 months ago

@lschurr the PR was just assigned to the C+ for review, so nothing from us yet

Julesssss commented 10 months ago

Seems like we'll need to fix this. Did you see the comment, @hurali97?

hurali97 commented 10 months ago

@Julesssss yeah, I will try to fix that by Monday, since we are off tomorrow 👍

melvin-bot[bot] commented 10 months ago

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

melvin-bot[bot] commented 10 months ago

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

shubham1206agra commented 10 months ago

Hello @muttmuure @hurali97 @Julesssss @lschurr

I have tried to further optimize @hurali97's proposal here https://github.com/Expensify/App/pull/34480.

I tried to do 2 main things

  1. Instead of creating 2 new listener for focusin, and focusout for every use of useActiveElementRole, we are going to create context of activeRole, and will listen only once for events inside the Provider, which will be supplied to App root component directly. The aim was to remove the redundancy of listeners, as we know every button will have these listeners, and there are almost no places on App where we don't have a button.
  2. Instead of using the above context for every button rendered, we have used pressOnEnter prop to conditionally render KeyboardShortcutComponent, which will help in less re-render on changing of activeRole.

Now we use state for storing activeRole instead of ref cause this caused a regression https://github.com/Expensify/App/issues/34474, and restoring to using state directly causing some performance lag.

If you agree with me, @hurali97 can you profile https://github.com/Expensify/App/pull/34480 to make sure there is no performance degradation?

melvin-bot[bot] commented 9 months ago

Reviewing label has been removed, please complete the "BugZero Checklist".

melvin-bot[bot] commented 9 months ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.4.24-8 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-01-22. :confetti_ball:

For reference, here are some details about the assignees on this issue:

melvin-bot[bot] commented 9 months ago

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

Julesssss commented 9 months ago

oh I missed this notification

Julesssss commented 9 months ago

I have tried to further optimize @hurali97's https://github.com/Expensify/App/issues/28916#issuecomment-1853920181 here https://github.com/Expensify/App/pull/34480.

We're going to go ahead with this change on this linked PR

muttmuure commented 9 months ago

Not overdue

muttmuure commented 9 months ago

Is the problem resolved? Can we go ahead and pay?

melvin-bot[bot] commented 9 months ago

Payment Summary

Upwork Job

BugZero Checklist (@lschurr)

lschurr commented 9 months ago

This looks correct. @eVoloshchak - you can request payment via newdot.

Closing.

situchan commented 9 months ago

There were several regressions. One is not resolved yet.

eVoloshchak commented 9 months ago

@hurali97, could you take a look at the comment above?

eVoloshchak commented 9 months ago

@hurali97, bump on the above

eVoloshchak commented 8 months ago

@hurali97, bump on the above ignore this, I can see all of the regressions were solved