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.3k stars 2.73k forks source link

[HOLD for payment 07-31-2024][$250] CRITICAL [UX Reliability] The loading skeleton exhibits three different behaviors #43791

Closed m-natarajan closed 1 month ago

m-natarajan commented 2 months 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!


Version Number: v1.4.83-3 Reproducible in staging?: y Reproducible in production?: y 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 Expensify/Expensify Issue URL: Issue reported by: @muttmuure Slack conversation: https://expensify.slack.com/archives/C05LX9D6E07/p1718365848007159

Action Performed:

  1. Go to staging.new.expensify.com
  2. Click on any report in LHN

Expected Result:

Skeleton animation work as expected

Actual Result:

At times the static image of the skeleton shows and the skeleton doesn’t appear at all.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/Expensify/App/assets/38435837/60111ec1-9434-4e3a-968b-f42e70448721

https://github.com/Expensify/App/assets/38435837/5c7d9535-1d03-43b3-908f-51e522f05689

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~013a31dcebc0c8e5de
  • Upwork Job ID: 1802755576680221726
  • Last Price Increase: 2024-06-17
  • Automatic offers:
    • akinwale | Reviewer | 102780731
    • tsa321 | Contributor | 102780734
Issue OwnerCurrent Issue Owner: @lschurr
melvin-bot[bot] commented 2 months ago

Triggered auto assignment to @lschurr (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

melvin-bot[bot] commented 2 months ago

Triggered auto assignment to @tgolen (AutoAssignerNewDotQuality)

tsa321 commented 2 months ago

Proposal

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

UX Reliability issue: The loading skeleton exhibits three different behaviors. Sometimes skeleton view shown above one or two report actions, sometimes doesn't show up, sometimes full cover skeleton shown in

What is the root cause of that problem?

When user open app / first OpenApp, back end returns certain reportActions types (IOU report actions, reportpreview aciton, and some others...). There are three different case:

  1. When opening a report the report actions returned by OpenApp will be displayed at bottom and skeleton shown above it. When OpenReport request completed the report actions moved to proper position.

  2. For other case when full skeleton view is displayed it means, there is no cached report actions (there is no report actions type IOU, or other type that returned by OpenApp). So cached report actions is empty.

  3. Case when user open report then App immediately displays the messages, it means there are cached report actions in onyx.

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

When opening a report, OpenReport will return around 100 latest reportActions. We could show full skeleton view when getContinous reportActions :

https://github.com/Expensify/App/blob/75c104bfe009ef937bcd129a35bb5a2e52f4339d/src/pages/home/ReportScreen.tsx#L257-L261

When the continuous reportActions doesn't reach around 50 / 100 or the oldest reportAction type isn't CREATED type. We should wait for OpenReport to be completed and show the full skeleton view.

In the end there will be two behavior, If cached report actions exist and fulfill the criteria above we immediately show it. If the above criteria doesn't met we display full skeleton view and wait for OpenReport to be completed.

https://github.com/Expensify/App/blob/75c104bfe009ef937bcd129a35bb5a2e52f4339d/src/pages/home/ReportScreen.tsx#L382-L384

The shouldShowSkeleton could be:

const isCreatedActionExist = ReportActionsUtils.isCreatedAction(reportActions.at(-1));
const shouldShowSkeleton = 
        (isLinkingToMessage && !isLinkedMessageAvailable) ||
        (reportActions.length < 50 && !isCreatedActionExist && !!reportMetadata?.isLoadingInitialReportActions) ||
        isLoading ||
        (!!reportActionIDFromRoute && reportMetadata?.isLoadingInitialReportActions);

The in here the condition to show reportActionsView is !shouldShowSkeleton

Result: https://github.com/Expensify/App/assets/114975543/fc333f1a-a34f-4f0f-b6a2-57b1b632b41a
tgolen commented 2 months ago

I'm going to discuss this internally first to see what the expected behavior should be.

melvin-bot[bot] commented 2 months ago

Job added to Upwork: https://www.upwork.com/jobs/~013a31dcebc0c8e5de

melvin-bot[bot] commented 2 months ago

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

tgolen commented 2 months ago

OK, it sounds like the solution from @tsa321 is inline with our expectations. I'm going to label this as external and then the C+ can give the proposal a look.

muttmuure commented 2 months ago

@abdulrahuman5196 is ooo, let's reapply the label

melvin-bot[bot] commented 2 months ago

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

akinwale commented 2 months ago

@tsa321's proposal makes sense here.

🎀👀🎀 C+ reviewed.

melvin-bot[bot] commented 2 months ago

Current assignee @tgolen is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

melvin-bot[bot] commented 2 months ago

📣 @akinwale 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link Upwork job

melvin-bot[bot] commented 2 months ago

📣 @tsa321 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻 Keep in mind: Code of Conduct | Contributing 📖

tsa321 commented 2 months ago

@akinwale PR is ready...

melvin-bot[bot] commented 2 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 2 months ago

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

melvin-bot[bot] commented 2 months ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.1-19 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-07-02. :confetti_ball:

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

melvin-bot[bot] commented 2 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:

tsa321 commented 2 months ago

I am sorry for the regression. I am still working on a new PR for this issue and will submit it later.

tsa321 commented 2 months ago

@akinwale, my PR is actually ready. However, there is a bug in the main branch related to comment linking. When a user returns from a transaction thread by clicking the link header, the parent report scrolls down and does not focus on the highlighted/linked report action. After merging the latest main into my branch, the bug persists, which will interfere with testing my PR.

Video of the bug:

https://github.com/Expensify/App/assets/114975543/58ba2cc6-d7ac-4274-a1c7-abbc0088a4be

tsa321 commented 2 months ago

Waiting for https://github.com/Expensify/App/issues/44625 to be fixed.

lschurr commented 2 months ago

Added hold for #44625. Noting that the payment amounts will be subject to the regression penalty.

melvin-bot[bot] commented 2 months ago

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

melvin-bot[bot] commented 2 months ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.3-7 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-07-10. :confetti_ball:

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

melvin-bot[bot] commented 2 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:

tsa321 commented 1 month ago

@akinwale PR is ready

lschurr commented 1 month ago

Just clarifying - What are we waiting on here @akinwale @tsa321? Is this bug now fixed?

akinwale commented 1 month ago

@lschurr There was a regression, so I'll need to review the PR.

lschurr commented 1 month ago

Any update here @akinwale? Have you had a chance to review the PR?

akinwale commented 1 month ago

Any update here @akinwale? Have you had a chance to review the PR?

Not yet. I will wrap this up tonight. Thanks for the reminder.

melvin-bot[bot] commented 1 month 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 1 month ago

@tgolen, @akinwale, @lschurr, @tsa321 Whoops! This issue is 2 days overdue. Let's get this updated quick!

melvin-bot[bot] commented 1 month ago

@tgolen, @akinwale, @lschurr, @tsa321 Eep! 4 days overdue now. Issues have feelings too...

tsa321 commented 1 month ago

Update: The PR was deployed to production 3 days ago.

melvin-bot[bot] commented 1 month ago

@tgolen, @akinwale, @lschurr, @tsa321 Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!

akinwale commented 1 month ago

@lschurr It looks like this is ready for payment as the follow-up PR has been in production for over a week now. Thanks.

lschurr commented 1 month ago

Thanks @akinwale - And just to clarify, the original bug here is now fixed, but the first PR caused a regression, correct? https://github.com/Expensify/App/pull/44488 fixed that, right?

akinwale commented 1 month ago

Thanks @akinwale - And just to clarify, the original bug here is now fixed, but the first PR caused a regression, correct? #44488 fixed that, right?

Yes, this is correct.

lschurr commented 1 month ago

Payment summary (50% due to regression):

lschurr commented 1 month ago

Payments are complete.