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
Stats: Total Subscribers Card #23084
Conversation
The same endpoint returns both totals and subscribers list, aggregating the Store response into a single data entity
📲 You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
|
.prefix(quantity) | ||
) | ||
completion(.success(followers)) | ||
let combinedSubscribers = Array((wpComFollowers?.topDotComFollowers ?? []) + (emailFollowers?.topEmailFollowers ?? []) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the answer here pejTkB-1l5-p2#comment-1316 the idea is for all of this aggregation to be replaced by v2/sites/{site_id}/stats/subscribers
. I think we can do that both in scope and outside the scope of the project depending on time constraints.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great, thanks @staskus!
Good question, @aditi-bhatia. No, at least not in this iteration. 👍 |
I couldn't see the comparison label in the designs mentioned in the issue #23048. I'm just asking to double-check that we're looking at the same designs. |
Ah good catch 🤔 I had been referencing this Figma IqhXWz3Iir7RMb5XH5gGfZ-fi-97_5069 from this discussion p1713440407948299-slack-C06BR07TJHK which looks like was a previous iteration. Thanks both! |
Fixes #23048
Solution
subscribersList
to return both subscribers and subscribers totals since they come from the same endpointNote: Insights Totals Subscribers card may show different numbers since it also adds publicize numbers. Fix is made here #23099
To test:
Regression Notes
None
What I did to test those areas of impact (or what existing automated tests I relied on)
What automated tests I added (or what prevented me from doing so)
Added unit tests
PR submission checklist:
RELEASE-NOTES.txt
if necessary.Testing checklist: