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

User Totals Not Displayed Correctly - Updated as Page Loads #89506

Open
masperber opened this issue Apr 12, 2024 · 5 comments
Open

User Totals Not Displayed Correctly - Updated as Page Loads #89506

masperber opened this issue Apr 12, 2024 · 5 comments
Labels
Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Feature] Calypso & wp-admin Navigation All navigation in Calypso and wp-admin, and the unified transitions between the two. [Feature] User Management Tools for managing site users, their roles, and permissions. [Platform] Simple [Pri] Normal [Product] WordPress.com All features accessible on and related to WordPress.com. Subscribers Page The new Subscribers page in Calypso Subscription Management Issues related to the Subscription Management portal (subscribe.wordpress.com). Triaged To be used when issues have been triaged. [Type] Bug

Comments

@masperber
Copy link

Quick summary

On Simple Sites, in Users > All Users the site administrators can view the number of users registered to the site. This is displayed as "Team X" at the top of the page, where X is the total number of registered users. Below this is a complete listing of all registered users, in an infinitely scrolling list. Above this list, it says "You have Y team members," where Y is the total number of users that have been loaded into the infinitely scrolling list. The number Y should be the same as the number X, whether or not the entire list of users has been loaded by scrolling to the very bottom.

Annotation on 2024-04-12 at 17-16-56

Steps to reproduce

  1. Upload more than 100 users to a Simple site. (Probably 120 should be sufficient)
  2. Go to Users > All Users
  3. Observe that the number of team members does not match the total number of users until scrolling to the bottom of the list of users.

What you expected to happen

The total number of users should be consistent.

What actually happened

The total number of users is inconsistent.

Impact

All

Available workarounds?

Yes, easy to implement

Platform (Simple and/or Atomic)

Simple

Logs or notes

Not tested on Atomic sites.

Workaround is to scroll to the bottom of the page when viewing all users, or to only use the number at the very top of the page.

@masperber masperber added [Type] Bug [Feature] Calypso & wp-admin Navigation All navigation in Calypso and wp-admin, and the unified transitions between the two. Needs triage Ticket needs to be triaged [Product] WordPress.com All features accessible on and related to WordPress.com. [Feature Group] Other Infrastructure Miscellaneous infrastructure features and improvements on WordPress.com. labels Apr 12, 2024
@masperber
Copy link
Author

7978970-zen Initial customer report.

I've reproduced the issue on another site with over 100 users.

Copy link

github-actions bot commented Apr 12, 2024

Support References

This comment is automatically generated. Please do not edit it.

@github-actions github-actions bot added the Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". label Apr 12, 2024
@liviopv liviopv added [Feature] User Management Tools for managing site users, their roles, and permissions. Subscription Management Issues related to the Subscription Management portal (subscribe.wordpress.com). Subscribers Page The new Subscribers page in Calypso Triaged To be used when issues have been triaged. and removed [Feature Group] Other Infrastructure Miscellaneous infrastructure features and improvements on WordPress.com. Needs triage Ticket needs to be triaged labels Apr 25, 2024
@liviopv
Copy link

liviopv commented Apr 25, 2024

📌 REPRODUCTION RESULTS

  • Tested on Simple – Replicated

📌 FINDINGS/SCREENSHOTS/VIDEO
I didn't have a safe user list to import to test it on my site, but I was able to reproduce the behaviour on the user site and a large P2 like dotcomhappy

CleanShot 2024-04-25 at 10 40 55@2x

📌 ACTIONS

  • Triaged

@Automattic/apex is this something you can look into based on your work in the Subscribers page last year?

@ivan-ottinger
Copy link
Contributor

ivan-ottinger commented Apr 26, 2024

Thanks for the ping, @liviopv.

Looks like the issue was unintentionally introduced by this PR: #88369.

The following change should fix it, but I think it would be better if @renancarvalho (👋🏼🙂 Hi!) could take a closer look - since the proposed fix may potentially cause some other regression to the changes introduced in the PR (that I may be unaware of).

diff --git a/client/my-sites/people/team-members/index.tsx b/client/my-sites/people/team-members/index.tsx
index fe5614fc31..f7384b0c68 100644
--- a/client/my-sites/people/team-members/index.tsx
+++ b/client/my-sites/people/team-members/index.tsx
@@ -55,7 +55,7 @@ function TeamMembers( props: Props ) {
 		( obj ) => obj.linked_user_ID === false
 	);
 
-	const membersTotal = nonPendingMembersSorted.length;
+	const membersTotal = data?.total;
 	const addTeamMemberLink = `/people/new/${ site?.slug }`;
 
 	function getPersonRef( user: Member ) {

@rinazrina
Copy link

Another user was confused with this: 8318410-zd-a8c

The Users page shows, "You have 100 team members" even though they have 600+ users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Feature] Calypso & wp-admin Navigation All navigation in Calypso and wp-admin, and the unified transitions between the two. [Feature] User Management Tools for managing site users, their roles, and permissions. [Platform] Simple [Pri] Normal [Product] WordPress.com All features accessible on and related to WordPress.com. Subscribers Page The new Subscribers page in Calypso Subscription Management Issues related to the Subscription Management portal (subscribe.wordpress.com). Triaged To be used when issues have been triaged. [Type] Bug
Projects
Development

No branches or pull requests

4 participants