Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C+ Checklist Needs Completion] [$1000] DEV:Takes time to change topbar(manual to scan, scan to manual) selection in request money #25428

Closed
1 of 6 tasks
kavimuru opened this issue Aug 17, 2023 · 63 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Internal Requires API changes or must be handled by Expensify staff Needs Reproduction Reproducible steps needed

Comments

@kavimuru
Copy link

kavimuru commented Aug 17, 2023

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. click "+" button
  2. select request money
  3. try to slide right to left

Expected Result:

selection change should be immediately

Actual Result:

selection change takes some time

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: Dev
Reproducible in staging?: dev
Reproducible in production?: dev
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

Screen.Recording.2023-08-16.at.5.42.59.PM.mov

Expensify/Expensify Issue URL:
Issue reported by: @niravkakadiya25
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1691384151135339

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~010c514d8b4722d88a
  • Upwork Job ID: 1692452963606020096
  • Last Price Increase: 2023-08-18
@kavimuru kavimuru added Daily KSv2 Needs Reproduction Reproducible steps needed Bug Something is broken. Auto assigns a BugZero manager. labels Aug 17, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 17, 2023

Triggered auto assignment to @greg-schroeder (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Aug 17, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@allroundexperts
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

Tab change not animating when screen is swiped when on MoneyRequestPage.

What is the root cause of that problem?

The root cause is that we're having static values as background colours for the buttons, icons and text inside the tab.

What changes do you think we should make in order to solve the problem?

We need to make use of the position property here and pass that onto the TabSelector component. Inside it, we need to interpolate this position value between:

  1. Background colour of the button in selected / un-selected state.
  2. Text colour of the button in selected / un-selected state.
  3. Icon colour of the button in selected / un-selected state.

These interpolated values of colours are then to be used inside TabSelectorItem component. This will result in a smooth transition which will dispel the lag effect.

What alternative solutions did you explore? (Optional)

We can also just disable the swipe on web so that the user can only switch the tab by pressing the button itself. However, I think that the solution proposed above is more elegant.

@greg-schroeder greg-schroeder added the External Added to denote the issue can be worked on by a contributor label Aug 18, 2023
@melvin-bot melvin-bot bot changed the title DEV:Takes time to change topbar(manual to scan, scan to manual) selection in request money [$1000] DEV:Takes time to change topbar(manual to scan, scan to manual) selection in request money Aug 18, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 18, 2023

Job added to Upwork: https://www.upwork.com/jobs/~010c514d8b4722d88a

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 18, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 18, 2023

Current assignee @greg-schroeder is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Aug 18, 2023

Triggered auto assignment to Contributor-plus team member for initial proposal review - @burczu (External)

@greg-schroeder
Copy link
Contributor

I can't repro DEV issues - I'm assuming since you made a proposal here @allroundexperts that you were able to?

@allroundexperts
Copy link
Contributor

Hi @greg-schroeder!

Yes, this is easily reproducible.

@shawnborton How should the animation look like here? Do you think animating the colours as the user slides the screen makes sense?

@studentofcoding
Copy link
Contributor

studentofcoding commented Aug 18, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

Tab change animations are delayed when the screen is swiped when on MoneyRequestPage.

What is the root cause of that problem?

The root cause of this problem is that by default, React Navigation lazy loads tab screens, which means that the screens are only rendered when accessed for the first time. This can cause a delay in rendering the new tab screen when swiping.

When the screen is swiped, the new tab screen needs to be rendered immediately to provide a smooth transition. However, because of lazy loading, there is a delay in rendering the new tab screen, resulting in delayed animation.

What changes do you think we should make to solve the problem?

What we need to do is simply disable lazy by setting the lazy prop of the OnyxTabNavigator component to false in MoneyRequestSelectorPage.js. This ensures that all tab screens are rendered upfront, eliminating the delay in the tab change animation.

<OnyxTabNavigator
                                    lazy={false} // Add this line
                                    id={CONST.TAB.RECEIPT_TAB_ID}
                                    tabBar={({state, navigation}) => (
                                        <TabSelector
                                            state={state}
                                            navigation={navigation}
                                            onTabPress={resetMoneyRequestInfo}
                                        />
                                    )}
                                >
                                    <TopTab.Screen
                                        name={CONST.TAB.MANUAL}
                                        component={NewRequestAmountPage}
                                        initialParams={{reportID, iouType}}
                                    />
                                    {canUseScanReceipts && (
                                        <TopTab.Screen
                                            name={CONST.TAB.SCAN}
                                            component={ReceiptSelector}
                                            initialParams={{reportID, iouType}}
                                        />
                                    )}
                                    {canUseDistanceRequests && (
                                        <TopTab.Screen
                                            name={CONST.TAB.DISTANCE}
                                            component={DistanceRequestPage}
                                        />
                                    )}
                                </OnyxTabNavigator>

What alternative solutions did you explore? (Optional)

None

cc @greg-schroeder

@shawnborton
Copy link
Contributor

This is not a bug, we can close. cc @AndrewGable

@allroundexperts
Copy link
Contributor

@shawnborton Is there any specific reason why this is not a bug? The tabs are clearly getting stuck.

@shawnborton
Copy link
Contributor

Based on the video the tabs don't look stuck. Looks like they slide in and out as intended.

@allroundexperts
Copy link
Contributor

allroundexperts commented Aug 18, 2023

@shawnborton Please watch from 8s onwards.

@shawnborton
Copy link
Contributor

It's really hard to tell because the mouse is moving like crazy in that video. Can we create a new video where the mouse is doing normal gestures?

@allroundexperts
Copy link
Contributor

Here you go @shawnborton.

Screen.Recording.2023-08-18.at.6.12.19.PM.mov

@shawnborton
Copy link
Contributor

Cool, thanks for that. Curious for @AndrewGable's thoughts here.

@redpanda-bit
Copy link
Contributor

Proposal

Selection change between tab screens is not immediate due to not using realtime animation of tab active state.

Please re-state the problem that we are trying to solve in this issue.

Make tabs active state have a faster feedback between screen changes.

What is the root cause of that problem?

It takes about a second for react-navigation/material-top-tabs to update navigation state with the current active tab, this time is reflected in this UI lag.

What changes do you think we should make in order to solve the problem?

Instead of changing states based on isSelected use the position property to determine active state.

tabs_active_state.mov

What alternative solutions did you explore? (Optional)

I consider adding new animations a risk at the moment. There is an android crash in react native related to animations. If it is not urgent, this should wait for that bug to be fixed in react native first, otherwise fixing this could introduce a different bug.

@greg-schroeder
Copy link
Contributor

going to wait on @AndrewGable's take before I take any action on this one like potentially closing or not

@melvin-bot melvin-bot bot added the Overdue label Aug 21, 2023
@greg-schroeder
Copy link
Contributor

bump @AndrewGable

@melvin-bot melvin-bot bot removed the Overdue label Aug 21, 2023
@AndrewGable
Copy link
Contributor

Yes this is something that can be improved. I agree with it being a bug.

@melvin-bot melvin-bot bot added the Awaiting Payment Auto-added when associated PR is deployed to production label Aug 31, 2023
@melvin-bot melvin-bot bot changed the title [$1000] DEV:Takes time to change topbar(manual to scan, scan to manual) selection in request money [HOLD for payment 2023-09-07] [$1000] DEV:Takes time to change topbar(manual to scan, scan to manual) selection in request money Aug 31, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Aug 31, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 31, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 31, 2023

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

If no regressions arise, payment will be issued on 2023-09-07. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

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

  • @burczu does not require payment (Contractor)
  • @allroundexperts does not require payment (Eligible for Manual Requests)

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Aug 31, 2023

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:

  • [@burczu / @allroundexperts] The PR that introduced the bug has been identified. Link to the PR:
  • [@burczu / @allroundexperts] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@burczu / @allroundexperts] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@burczu / @allroundexperts] Determine if we should create a regression test for this bug.
  • [@burczu / @allroundexperts] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@greg-schroeder] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Sep 1, 2023
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2023-09-07] [$1000] DEV:Takes time to change topbar(manual to scan, scan to manual) selection in request money [HOLD for payment 2023-09-08] [HOLD for payment 2023-09-07] [$1000] DEV:Takes time to change topbar(manual to scan, scan to manual) selection in request money Sep 1, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 1, 2023

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

If no regressions arise, payment will be issued on 2023-09-08. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

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

  • @burczu does not require payment (Contractor)
  • @allroundexperts does not require payment (Eligible for Manual Requests)

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Sep 1, 2023

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:

  • [@burczu / @allroundexperts] The PR that introduced the bug has been identified. Link to the PR:
  • [@burczu / @allroundexperts] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@burczu / @allroundexperts] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@burczu / @allroundexperts] Determine if we should create a regression test for this bug.
  • [@burczu / @allroundexperts] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@greg-schroeder] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@greg-schroeder
Copy link
Contributor

Processing payments

@greg-schroeder
Copy link
Contributor

Was this issue merged in time to be eligible for the speed bonus? ❌
Were their any regressions? ❌

Payment summary:

Reporter: @niravkakadiya25 - $250
Contributor: @allroundexperts - $1000
C+: @burczu - $1000

@greg-schroeder
Copy link
Contributor

Offer sent to @niravkakadiya25. @allroundexperts you can make a manual request. All that's left is the checklist.

@greg-schroeder greg-schroeder changed the title [HOLD for payment 2023-09-08] [HOLD for payment 2023-09-07] [$1000] DEV:Takes time to change topbar(manual to scan, scan to manual) selection in request money [C+ Checklist Needs Completion] [$1000] DEV:Takes time to change topbar(manual to scan, scan to manual) selection in request money Sep 8, 2023
@allroundexperts
Copy link
Contributor

Requested.

@JmillsExpensify
Copy link

$1,000 payment approved via NewDot based on BZ summary.

@greg-schroeder
Copy link
Contributor

Bump on the checklist @burczu and then we can close this out!

@burczu
Copy link
Contributor

burczu commented Sep 13, 2023

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:

  • [@burczu / @allroundexperts] The PR that introduced the bug has been identified. Link to the PR: this is not regression
  • [@burczu / @allroundexperts] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: -
  • [@burczu / @allroundexperts] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: -
  • [@burczu / @allroundexperts] Determine if we should create a regression test for this bug.
  • [@burczu / @allroundexperts] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@greg-schroeder] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot
Copy link

melvin-bot bot commented Sep 14, 2023

@burczu @greg-schroeder @allroundexperts @thienlnam this issue is now 4 weeks old and preventing us from maintaining WAQ, can you:

  • Decide whether any proposals currently meet our guidelines and can be approved as-is today
  • If no proposals meet that standard, please take this issue internal and treat it as one of your highest priorities
  • If you have any questions, don't hesitate to start a discussion in #expensify-open-source

Thanks!

@melvin-bot melvin-bot bot added Daily KSv2 Internal Requires API changes or must be handled by Expensify staff and removed Weekly KSv2 External Added to denote the issue can be worked on by a contributor labels Sep 14, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 14, 2023

Current assignees @burczu and @allroundexperts are eligible for the Internal assigner, not assigning anyone new.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Internal Requires API changes or must be handled by Expensify staff Needs Reproduction Reproducible steps needed
Projects
None yet
Development

No branches or pull requests

10 participants