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

[HOLD for payment 2023-06-01] [$1000] Opening workspace settings by link displays 'hmm it's not here' page for few seconds #18828

Closed
6 tasks done
kavimuru opened this issue May 12, 2023 · 20 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 External Added to denote the issue can be worked on by a contributor

Comments

@kavimuru
Copy link

kavimuru commented May 12, 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. Open the app
  2. Open settings
  3. Open workspaces
  4. Open any workspace
  5. Open settings and copy the URL
  6. Log out and visit the copied link
  7. Login again and observe that it displays 'hmm it's not here' page for few seconds

Expected Result:

App should display loading animation until page is loaded

Actual Result:

App displays 'hmm it's not here' page until page is loaded

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: 1.3.13.0
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
Notes/Photos/Videos: Any additional supporting documentation

hmm.its.not.here.on.login.and.workspace.settings.mp4
Recording.574.mp4

Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1683803147715459

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01cd95e1be49eca753
  • Upwork Job ID: 1657093160754028544
  • Last Price Increase: 2023-05-12
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 12, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 12, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 12, 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

@hoangzinh
Copy link
Contributor

hoangzinh commented May 12, 2023

Proposal

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

Opening workspace settings by link displays 'hmm it's not here' page for few seconds

What is the root cause of that problem?

  • The NotFound screen only appears in Workspace Setting page when we can't find policy in the Onyx store

    shouldShow={_.isEmpty(this.props.policy)}

  • After login, we will trigger OpenApp API call to load initialize data (including policies data), if this API call is not finished yet => we couldn't find this policy in Onyx store => we might see Not found screen for few seconds

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

We need show a Fullscreen loading indicator if if we're fetching OpenApp API. To do it, we can:

  • Connect to the Onyx key ONYXKEYS.IS_LOADING_REPORT_DATA
  • Check if this key is true, we show FullScreenLoadingIndicator component in the render method of component WorkspacePageWithSections
  • Otherwise we render the component itself

@slafortune
Copy link
Contributor

looks good!

@slafortune slafortune added the External Added to denote the issue can be worked on by a contributor label May 12, 2023
@melvin-bot melvin-bot bot changed the title Opening workspace settings by link displays 'hmm it's not here' page for few seconds [$1000] Opening workspace settings by link displays 'hmm it's not here' page for few seconds May 12, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 12, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01cd95e1be49eca753

@melvin-bot
Copy link

melvin-bot bot commented May 12, 2023

Current assignee @slafortune is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented May 12, 2023

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

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

melvin-bot bot commented May 12, 2023

Triggered auto assignment to @dangrous (External), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@dukenv0307
Copy link
Contributor

dukenv0307 commented May 13, 2023

Proposal

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

When navigating to the Workspace Settings page by link and login, App displays 'hmm it's not here' page until page is loaded.

What is the root cause of that problem?

In here

shouldShow={_.isEmpty(this.props.policy)}
, we're showing Not Found page if the this.props.policy is empty. When we navigate to the Workspace Settings page by link and login, the policy wasn't loaded yet (using the OpenApp API), so it shows Not Found briefly until the policy is loaded.

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

The same issue happens for the WorkspaceInviteMessagePage, WorkspaceInvitePage, WorkspaceMembersPage, WorkspacePageWithSections, WorkspaceInitialPage, ContinueBankAccountSetup so we should apply the following fix for all those pages:

  1. In here , we need to check if the policy is empty and the report is loading, if yes that means the policy is not initially loaded yet, so we show a FullscreenLoadingIndicator
if (this.props.isLoadingReportData && _.isEmpty(this.props.policy)) {
    return <FullscreenLoadingIndicator />;
}

We need to check for both conditions because if we only check for the isLoadingReportData, it will show the loading indicator in other cases like going from offline to online which is not desirable, we only want to show the loading when the policy is not initially loaded.

  1. Add
isLoadingReportData: {
    key: ONYXKEYS.IS_LOADING_REPORT_DATA,
},

to

, and add corresponding propTypes and defaultProps for the isLoadingReportData. That approach to checking if report data is loaded has been used the same in other places like here.

What alternative solutions did you explore? (Optional)

I'd also suggest to retest all pages that use the FullPageNotFoundView with the same scenario because the above issue could likely happen for some other pages as well.

@mollfpr
Copy link
Contributor

mollfpr commented May 15, 2023

@dangrous @slafortune the proposal from @dukenv0307 looks good to me!

🎀 👀 🎀 C+ reviewed!

@dangrous
Copy link
Contributor

Yep, that makes sense to me - assigning now!

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label May 15, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 15, 2023

📣 @dukenv0307 You have been assigned to this job by @dangrous!
Please apply to this job in Upwork 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 📖

@dukenv0307
Copy link
Contributor

@dangrous @mollfpr The PR is ready to review.

@melvin-bot
Copy link

melvin-bot bot commented May 23, 2023

@dangrous, @slafortune, @mollfpr, @dukenv0307 Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels May 25, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Opening workspace settings by link displays 'hmm it's not here' page for few seconds [HOLD for payment 2023-06-01] [$1000] Opening workspace settings by link displays 'hmm it's not here' page for few seconds May 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 25, 2023

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label May 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 25, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.17-5 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-06-01. 🎊

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

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 May 25, 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:

  • [@mollfpr] The PR that introduced the bug has been identified. Link to the PR:
  • [@mollfpr] 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:
  • [@mollfpr] 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:
  • [@mollfpr] Determine if we should create a regression test for this bug.
  • [@mollfpr] 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.
  • [@slafortune] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@slafortune
Copy link
Contributor

@dhanashree-sawant, @mollfpr @dukenv0307 Offers sent!
@mollfpr - When you get a chance can you complete the above check list
I am OOO but will come back to pay this out on the 1st.

@mollfpr
Copy link
Contributor

mollfpr commented May 30, 2023

[@mollfpr] The PR that introduced the bug has been identified. Link to the PR:
[@mollfpr] 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:

No offending PR. This is an improvement to show the loading state while the policy is fetched.

[@mollfpr] 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:

The regression step should be enough.

[@mollfpr] Determine if we should create a regression test for this bug.

Yes!

[@mollfpr] 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.

The regression step will cover the place where PR has the changes. Mostly the step is the same.

Test cases
  • The workspace setting page should display loading animation until the page is loaded
  1. Login with any account
  2. Go to Setting > Workspace
  3. Open any workspace
  4. Open General settings and copy the URL
  5. Logout and visit the link that is copied above
  6. Login again with the same account in step 1
  7. Verify that the workspace setting page displays loading animation until the page is loaded
  • The report detail page should display loading animation until the page is loaded
  1. Login with any account
  2. Open any admin room
  3. Click on the header to see detail page
  4. Copy the URL
  5. Logout and visit the link that is copied above
  6. Login again with the same account in step 1
  7. Verify that the report detail page displays loading animation until the page is loaded
  • The report setting page should display loading animation until the page is loaded
  1. Login with any account
  2. Open any admin room
  3. Click on the header to see detail page
  4. Open setting and copy the URL
  5. Logout and visit the link that is copied above
  6. Login again with the same account in step 1
  7. Verify that the report setting page displays loading animation until the page is loaded
  • The report participant page should display loading animation until the page is loaded
  1. Login with any account
  2. Open any group chat
  3. Click on the header to see the participant page
  4. Copy the URL
  5. Logout and visit the link that is copied above
  6. Login again with the same account in step 1
  7. Verify that the report participant page displays loading animation until the page is loaded
  • The workspace initial page should display loading animation until the page is loaded
  1. Login with any account
  2. Open Setting > Workspaces
  3. Open any workspace
  4. Copy the URL
  5. Logout and visit the link that is copied above
  6. Login again with the same account in step 1
  7. Verify that the workspace initial page displays loading animation until the page is loaded
  • The workspace member page should display loading animation until the page is loaded
  1. Login with any account
  2. Open Setting > Workspaces
  3. Open any workspace
  4. Open manage members and copy the URL
  5. Logout and visit the link that is copied above
  6. Login again with the same account in step 1
  7. Verify that the workspace member page displays loading animation until the page is loaded
  • The workspace invite message page should display loading animation until the page is loaded
  1. Login with any account
  2. Open Setting > Workspaces
  3. Open any workspace
  4. Open manage members
  5. Click on invite button to open invite page
  6. Select some users and click on next button to open invite message page
  7. Copy the URL
  8. Logout and visit the link that is copied above
  9. Login again with the same account in step 1
  10. Verify that the workspace invite message page displays loading animation until the page is loaded
  • The workspace invite page should display loading animation until the page is loaded
  1. Login with any account
  2. Open Setting > Workspaces
  3. Open any workspace
  4. Open manage members
  5. Click on invite button to open invite page
  6. Copy the URL
  7. Logout and visit the link that is copied above
  8. Login again with the same account in step 1
  9. Verify that the workspace invite page displays loading animation until the page is loaded

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels May 31, 2023
@slafortune
Copy link
Contributor

Paid!

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 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

6 participants