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
[Awaiting bug report payment][$1000] Workspace - No loader for workspace members page #21567
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2
Open the app in a new incognito window. Don't open in an existing incognito window.
Create a workspace if you don't already have one.
Go to Settings > Workspaces > Members.
Notice that there is no loader for the members and the message "Member not found. To invite a new member to the workspace, please use the Invite button above." is shown before members are loaded.
Expected Result:
A loader should be shown before members are loaded.
Actual Result:
There is no loader before members are loaded and the message "Member not found. To invite a new member to the workspace, please use the Invite button above." is shown which might be confusing for users if they have slow connection.
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.29-11 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
Please re-state the problem that we are trying to solve in this issue.
Loader is not shown on workspace members page before members are loaded. Instead an error message is shown - "Member not found. To invite a new member to the workspace, please use the Invite button above."
What is the root cause of that problem?
We are showing an error message if the length is 0 for members. When members are not loaded, length of members is 0 and we show this message instead of a loader. See line 471.
What changes do you think we should make in order to solve the problem?
Check if props.policyMembers is empty or props.personalDetails is empty using _.isEmpty(props.policyMembers) || !OptionsListUtils.isPersonalDetailsReady(props.personalDetails) and show Skeleton using OptionsListSkeletonView component if it is indeed empty.
We need to check props.personalDetails is also loaded because this page uses personalDetails prop to get details of policyMembers.
{_.isEmpty(props.policyMembers)||!OptionsListUtils.isPersonalDetailsReady(props.personalDetails) ? (<OptionsListSkeletonViewshouldAnimate/>) : (// existing code to render members, buttons, etc. when all data is loaded)}
Alternatively, we can also make a function for this in the WorkspaceMembersPage or in PolicyUtils (which has other utilities related to workspace) -
Then, we can use this function in WorkspaceMembersPage. If this function returns true then we can render members, buttons, etc. otherwise we render OptionsListSkeletonView.
What alternative solutions did you explore? (Optional)
I think this is a dupe of this issue and should be fixed by this PR when we implement the skeleton UI on this page when it's loading. Going to close it out!
@trjExpensify this is not a dupe of #19236, that issue is trying to fix the 'Hmm.. it's not here page' that appears when we open the members or invite page using deeplink in desktop app.
Screenshot of that issue -
Video of that issue -
members.mov
This issue appears on all platforms and is not related to deeplink at all. This issue is simply the lack of loader on Workspace Members page which shows this message until members are not loaded -
"Member not found. To invite a new member to the workspace, please use the Invite button above."
You can see the issue description for more details.
Hm, but isn't the root cause the same? We don't currently have the skeleton UI implemented on the workspace members page? By adding it, this won't be a problem.
@trjExpensify I tested that PR and it doesn't fix this issue because the state of policyMembers (whether they are loaded or not) is not being checked anywhere in existing code and that PR. That PR is showing the skeleton view when the workspace details have not loaded which includes details like name, owner, currency, etc. but doesn't include policyMembers since there is a separate API call for that.
Screen recording using the PR's code locally checked out -
Screen.Recording.2023-06-27.at.3.02.50.AM.mov
The HOC that is being changed in that PR - WithPolicyAndFullscreenLoading is also used in the initial workspace page (see screenshot below) so we cannot check for policyMembers in it since that API is not even called for this page so it would keep on showing loading indicator if we check for policyMembers in that page -
changed the title [-]Workspace - No loader for workspace members page[/-][+][$1000] Workspace - No loader for workspace members page[/+]on Jun 27, 2023
changed the title [-][HOLD #21387][$1000] Workspace - No loader for workspace members page[/-][+][Awaiting bug report payment][$1000] Workspace - No loader for workspace members page[/+]on Aug 22, 2023
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2
Activity
melvin-bot commentedon Jun 26, 2023
Triggered auto assignment to @trjExpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jun 26, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)Nikhil-Vats commentedon Jun 26, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Loader is not shown on workspace members page before members are loaded. Instead an error message is shown - "Member not found. To invite a new member to the workspace, please use the Invite button above."
What is the root cause of that problem?
We are showing an error message if the length is 0 for members. When members are not loaded, length of members is 0 and we show this message instead of a loader. See line 471.
App/src/pages/workspace/WorkspaceMembersPage.js
Lines 448 to 472 in 1e308ca
What changes do you think we should make in order to solve the problem?
Check if
props.policyMembersis empty orprops.personalDetailsis empty using_.isEmpty(props.policyMembers) || !OptionsListUtils.isPersonalDetailsReady(props.personalDetails)and showSkeletonusingOptionsListSkeletonViewcomponent if it is indeed empty.We need to check
props.personalDetailsis also loaded because this page usespersonalDetailsprop to get details ofpolicyMembers.Alternatively, we can also make a function for this in the
WorkspaceMembersPageor inPolicyUtils(which has other utilities related to workspace) -Then, we can use this function in
WorkspaceMembersPage. If this function returnstruethen we can render members, buttons, etc. otherwise we renderOptionsListSkeletonView.What alternative solutions did you explore? (Optional)
NA
Result -
Screen.Recording.2023-07-20.at.11.11.29.PM.mov
trjExpensify commentedon Jun 26, 2023
I think this is a dupe of this issue and should be fixed by this PR when we implement the skeleton UI on this page when it's loading. Going to close it out!
Nikhil-Vats commentedon Jun 26, 2023
@trjExpensify this is not a dupe of #19236, that issue is trying to fix the 'Hmm.. it's not here page' that appears when we open the members or invite page using deeplink in desktop app.
Screenshot of that issue -

Video of that issue -
members.mov
This issue appears on all platforms and is not related to deeplink at all. This issue is simply the lack of loader on Workspace Members page which shows this message until members are not loaded -
"Member not found. To invite a new member to the workspace, please use the Invite button above."
You can see the issue description for more details.
trjExpensify commentedon Jun 26, 2023
Hm, but isn't the root cause the same? We don't currently have the skeleton UI implemented on the workspace members page? By adding it, this won't be a problem.
Happy to reopen and get a second opinion however! CC: @kowczarz @aimane-chnaif
Nikhil-Vats commentedon Jun 26, 2023
@trjExpensify I tested that PR and it doesn't fix this issue because the state of

policyMembers(whether they are loaded or not) is not being checked anywhere in existing code and that PR. That PR is showing the skeleton view when the workspace details have not loaded which includes details like name, owner, currency, etc. but doesn't includepolicyMemberssince there is a separate API call for that.Screen recording using the PR's code locally checked out -
Screen.Recording.2023-06-27.at.3.02.50.AM.mov
The HOC that is being changed in that PR -

WithPolicyAndFullscreenLoadingis also used in the initial workspace page (see screenshot below) so we cannot check forpolicyMembersin it since that API is not even called for this page so it would keep on showing loading indicator if we check forpolicyMembersin that page -[-]Workspace - No loader for workspace members page[/-][+][$1000] Workspace - No loader for workspace members page[/+]melvin-bot commentedon Jun 27, 2023
Job added to Upwork: https://www.upwork.com/jobs/~010e98a1022376a0f5
40 remaining items
roryabraham commentedon Aug 2, 2023
on HOLD
trjExpensify commentedon Aug 14, 2023
Linked PR is still in review.
[-][HOLD #21387][$1000] Workspace - No loader for workspace members page[/-][+][Awaiting bug report payment][$1000] Workspace - No loader for workspace members page[/+]trjExpensify commentedon Aug 22, 2023
Deployed to staging 15 hours ago! Retested and the skeleton UI circumvents the problem:
teuNJJiq9K.mp4
With that, I've sent @Nikhil-Vats an offer for $250 for the bug report. Once settled, we can close this out! :)
Nikhil-Vats commentedon Aug 22, 2023
Offer accepted @trjExpensify.
trjExpensify commentedon Aug 22, 2023
Settled!