You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[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
Navigate to workspaces and tap workspace with members
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:
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
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:
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.
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)
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
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:
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:
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
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:
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:
[@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
Activity
melvin-bot commentedon Sep 19, 2023
Triggered auto assignment to @kadiealexander (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Sep 19, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)[-]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[/+]melvin-bot commentedon Sep 20, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01441465708e1a51d6
melvin-bot commentedon Sep 20, 2023
Current assignee @kadiealexander is eligible for the External assigner, not assigning anyone new.
melvin-bot commentedon Sep 20, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @robertKozik (
External)nebiyuelias1 commentedon Sep 20, 2023
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:
App/src/components/SelectionList/BaseSelectionList.js
Lines 339 to 341 in e2a1343
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:

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.
dukenv0307 commentedon Sep 20, 2023
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
showLoadingPlaceholderis true.When we go to workspace for the first name, we'll load the policyMembers, and while it's loading
policyMemberswill 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.policyMembersis empty, we can construct a defaultpolicyMembersby 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
DylanDylann commentedon Sep 21, 2023
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 causespolicyMemberswill be empty and skeleton view is displayedWhat changes do you think we should make in order to solve the problem?
Define new variable
App/src/pages/workspace/WorkspaceMembersPage.js
Line 341 in dee1632
Update headerMessage to "You must be online in order to view members of this workspace" (with translation) isOfflineAndNotGetDataYet is true
App/src/pages/workspace/WorkspaceMembersPage.js
Line 402 in dee1632
Don't show loading page if isOfflineAndNotGetDataYet is true
Result
70 remaining items
[-][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[/+]melvin-bot commentedon Oct 16, 2023
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.
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:
melvin-bot commentedon Oct 16, 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:
[-][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[/+]melvin-bot commentedon Oct 16, 2023
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.
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:
melvin-bot commentedon Oct 16, 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:
MariaHCD commentedon Oct 23, 2023
Not overdue, I believe we just need the BZ checklist
robertKozik commentedon Oct 23, 2023