-
Notifications
You must be signed in to change notification settings - Fork 798
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
Top Posts & Pages Block: Remove Deleted Content #37251
Conversation
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 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Jetpack plugin: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
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 feels like something that may be best addressed higher up, at least in the get_top_posts
method of WPCOM_Stats
.
@Automattic/red What's your take on this?
I originally thought so too, but I concluded that there might be cases where it’s beneficial to display all the top posts irrespective of whether they’ve been deleted - for example, in the Stats dashboard on the backend, where users might want to compare all posts regardless of whether they’ve now been deleted. I think this is the only case where the top posts list is actually shown to site readers, which is where I felt deleted posts ought to be removed. Happy to change it if you reckon that’d be more fitting though! |
This PR has been marked as stale. This happened because:
If this PR is still useful, please do a [trunk merge or rebase](https://github.com/Automattic/jetpack/blob/trunk/docs/git-workflow.md#keeping-your-branch-up-to-date) and otherwise make sure it's up to date and has clear testing instructions. You may also want to ping possible reviewers in case they've forgotten about it. Please close this PR if you think it's not valid anymore — if you do, please add a brief explanation. If the PR is not updated (or at least commented on) in another month, it will be automatically closed. |
4133b4c
to
98ceb82
Compare
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 well for me. Thanks for the contribution!
* Changelog * Top Posts & Pages Block: Filter Deleted Content
* Changelog * Top Posts & Pages Block: Filter Deleted Content
Fixes Automattic/wp-calypso#90308
Proposed changes:
Jetpack product discussion
N/A.
Does this pull request change what data or activity we track or use?
No.
Testing instructions:
For context, this issue only applies to posts which are published and viewed several times, then subsequently deleted; the API endpoint still considers them a 'most viewed post', even though it has been deleted. It doesn't apply to the randomly generated posts whenever there aren't enough posts provided by the endpoint.