Skip to content

[HOLD for payment 2023-10-23] [HOLD for payment 2023-10-23] [HOLD for payment 2023-10-20] [HOLD for payment 2023-10-20] [$500] Workspace - WS invite page keeps loading in offline if no members present #27776

Closed

Description

@lanitochka17

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:

Pre-condition: 2 WS created, one with members and other without members

  1. Go to https://staging.new.expensify.com/
  2. Tap profile
  3. Tap preferences
  4. Toggle on forced offline
  5. Navigate to LHN
  6. Tap profile icon
  7. Tap workspaces
  8. Tap a workspace with no members
  9. Tap members
  10. Navigate to workspaces and tap workspace with members
  11. Tap members

Expected Result:

Workspace invite page, in offline, if members are present or not must be displayed properly without loading

Actual Result:

Workspace invite page displayed properly in offline if members are present. But, the workspace invite page keeps loading in offline if no members are present

Workaround:

Unknown

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.71-5

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

Bug6206161_load.mp4
Bug6206161_20230919_180240.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Intenral Team

Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01441465708e1a51d6
  • Upwork Job ID: 1704376130566787072
  • Last Price Increase: 2023-09-20
  • Automatic offers:
    • DylanDylann | Contributor | 27017314

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 19, 2023
  2. melvin-bot commented on Sep 19, 2023

    @melvin-bot

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

  3. melvin-bot commented on Sep 19, 2023

    @melvin-bot

    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
  4. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Sep 20, 2023
  5. changed the title [-]Workspace - WS invite page keeps loading in offline if no members present[/-] [+][$500] Workspace - WS invite page keeps loading in offline if no members present[/+] on Sep 20, 2023
  6. melvin-bot commented on Sep 20, 2023

    @melvin-bot
  7. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Sep 20, 2023
  8. melvin-bot commented on Sep 20, 2023

    @melvin-bot

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

  9. melvin-bot commented on Sep 20, 2023

    @melvin-bot

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

  10. nebiyuelias1 commented on Sep 20, 2023

    @nebiyuelias1

    Proposal

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

    Loading skeleton is shown for an empty workspace in offline mode.

    What is the root cause of that problem?

    The root cause is that inside the BaseSelectionList component we have the following ternary operation:

    {flattenedSections.allOptions.length === 0 && showLoadingPlaceholder ? (
    <OptionsListSkeletonView shouldAnimate />
    ) : (

    If the list size is 0 (in this case it is) and if showLoadingPlaceHolder is set to true, we show the loading skeletons. I'm not sure why we show the skeleton when the list size is 0.

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

    In order to solve this problem, we can pass the right value for the boolean prop(showLoadingPlaceHolder), i.e., make sure it's set to false in offline mode, in the WorkspaceMembersPage.js file to the SelectionList component:
    image
    We need to make sure the prop is set to true in case the app is in offline mode.

    What alternative solutions did you explore? (Optional)

    I was thinking of modifying the logic inside the BaseSelectionList component but modifying the BaseSelectionList component might affect other parts of the app.

  11. dukenv0307 commented on Sep 20, 2023

    @dukenv0307
    Contributor

    Proposal

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

    Workspace invite page displayed properly in offline if members are present. But, the workspace invite page keeps loading in offline if no members are present

    What is the root cause of that problem?

    In here, we'll show skeleton if there's no options and showLoadingPlaceholder is true.

    When we go to workspace for the first name, we'll load the policyMembers, and while it's loading policyMembers will be empty so the loading condition here will be true.

    This is not really correct since we already know for sure that the current logged in user is a member of the workspace, we also know the role. So there's at least 1 workspace member that we can show to the user rather than noone.

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

    If the props.policyMembers is empty, we can construct a default policyMembers by using the current logged in account id and use it instead. If we still want to show the loading skeleton when online and it's actually loading, we can use the default only if it's offline.

    So in this case, in offline mode when the user goes to the workspace members page for the first time, they will see themselves as the workspace member, and no skeleton will show.

    What alternative solutions did you explore? (Optional)

    NA

  12. DylanDylann commented on Sep 21, 2023

    @DylanDylann
    Contributor

    Proposal

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

    Workspace - WS invite page keeps loading in offline if no members present

    What is the root cause of that problem?

    Because we are offline, we can't load policyMembers. It causes policyMembers will be empty and skeleton view is displayed

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

    Define new variable

       const isOfflineAndNotGetDataYet = _.isEmpty(props.policyMembers) && props.network.isOffline
    
    

    const headerMessage = searchValue.trim() && !data.length ? props.translate('workspace.common.memberNotFound') : '';

    Update headerMessage to "You must be online in order to view members of this workspace" (with translation) isOfflineAndNotGetDataYet is true

    showLoadingPlaceholder={!OptionsListUtils.isPersonalDetailsReady(props.personalDetails) || _.isEmpty(props.policyMembers)}

    Don't show loading page if isOfflineAndNotGetDataYet is true

    Result

    Screenshot 2023-10-02 at 16 47 30
  13. 70 remaining items

  14. changed the title [-][HOLD for payment 2023-10-20] [HOLD for payment 2023-10-20] [$500] Workspace - WS invite page keeps loading in offline if no members present[/-] [+][HOLD for payment 2023-10-23] [HOLD for payment 2023-10-20] [HOLD for payment 2023-10-20] [$500] Workspace - WS invite page keeps loading in offline if no members present[/+] on Oct 16, 2023
  15. melvin-bot commented on Oct 16, 2023

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.84-10 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-10-23. 🎊

    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:

    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
  16. melvin-bot commented on Oct 16, 2023

    @melvin-bot

    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:

    • [@robertKozik] The PR that introduced the bug has been identified. Link to the PR:
    • [@robertKozik] 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:
    • [@robertKozik] 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:
    • [@robertKozik] Determine if we should create a regression test for this bug.
    • [@robertKozik] 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.
    • [@kadiealexander] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  17. changed the title [-][HOLD for payment 2023-10-23] [HOLD for payment 2023-10-20] [HOLD for payment 2023-10-20] [$500] Workspace - WS invite page keeps loading in offline if no members present[/-] [+][HOLD for payment 2023-10-23] [HOLD for payment 2023-10-23] [HOLD for payment 2023-10-20] [HOLD for payment 2023-10-20] [$500] Workspace - WS invite page keeps loading in offline if no members present[/+] on Oct 16, 2023
  18. melvin-bot commented on Oct 16, 2023

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.84-10 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-10-23. 🎊

    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:

    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
  19. melvin-bot commented on Oct 16, 2023

    @melvin-bot

    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:

    • [@robertKozik] The PR that introduced the bug has been identified. Link to the PR:
    • [@robertKozik] 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:
    • [@robertKozik] 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:
    • [@robertKozik] Determine if we should create a regression test for this bug.
    • [@robertKozik] 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.
    • [@kadiealexander] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  20. MariaHCD commented on Oct 23, 2023

    @MariaHCD
    Contributor

    Not overdue, I believe we just need the BZ checklist

  21. robertKozik commented on Oct 23, 2023

    @robertKozik
    Contributor
    • [@robertKozik] The PR that introduced the bug has been identified. Link to the PR: I cannot determine exact PR as it was freshly discovered edge-case rather than implementation problem
    • [@robertKozik] 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: N/A
    • [@robertKozik] 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: N/A
    • [@robertKozik] Determine if we should create a regression test for this bug. Yes, I think we should create the regression test for this as this issue can lead to problems with workspaces flows
    • [@robertKozik] 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.
      1. Tap profile
      2. Tap preferences
      3. Toggle on forced offline
      4. Navigate to LHN
      5. Tap profile icon
      6. Tap workspaces
      9. Navigate to workspaces and tap workspace with members
      10. Tap members
      11. Verify that members page is not in loading state
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorWaiting for copyUser facing verbiage needs polishing

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions