-
Notifications
You must be signed in to change notification settings - Fork 819
Update the stats icon and add pageview count in the post list #42218
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
Conversation
…s directly Instead of calling the admin menu class, we now use a helper function that returns the object. This also removes a quick fix that prevented the quick switcher to be registered twice in the UI.
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! Jetpack plugin: No scheduled milestone found for this plugin. If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Code Coverage SummaryCoverage changed in 2 files.
1 file is newly checked for coverage.
|
0ffd51f
to
f1c8af8
Compare
/** | ||
* Add a Stats column in the post and page lists. | ||
*/ | ||
class Admin_Post_List_Column { |
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.
Most of the code here is just moved from modules/stats.php.
We need to move it in a separate class to also use it on Simple Sites.
f285bec
to
df9ec3f
Compare
projects/packages/stats-admin/src/class-admin-post-list-column.php
Outdated
Show resolved
Hide resolved
projects/packages/stats-admin/src/class-admin-post-list-column.php
Outdated
Show resolved
Hide resolved
Hey @Automattic/red Can you have a look at this PR? This adds a counter in the WP-Admin -> Post list with the number of pageviews a user had in the last 30 days (the same amount of days we used to display in Calypso Post list). However, there's no UI indication that it's for the last 30 days (like we do in Calypso). How do you feel about changing the title of the link from "View stats for this post" to something like "X views in the last 30 days. View more stats"? |
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.
This works nicely for me, and it's good to see more of the implementation unified.
The one last thing remaining is the question about how to make it clear to users what they're looking at.
Updates the icon in the Post and Page lists and adds the page view count for each post. The code was also moved in Stats Admin package so that we can be able to reuse the implementation in WPCOM Simple.
The counter displayed in the post list displays the number of views an article had in the last 30 days.
Fixes Automattic/wp-calypso#98912
Before

After

Proposed changes:
Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions: