-
Notifications
You must be signed in to change notification settings - Fork 32
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
PCH Related Top Posts: Add filter values drop-down #1986
PCH Related Top Posts: Add filter values drop-down #1986
Conversation
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.
Looks good to me! :) I have added an inline comment with a question, but otherwise, no blockers from me.
Regarding the need to refresh to get co-authors, the problem is related with the fact that the CAP terms are only added to the post on save, and therefore the new local API endpoint returns no co-authors, making the filter either empty or outdated, right?
I haven't dug in detail about why this is exactly happening so I don't know, but it does feel quirky in regular use to the point I'm thinking of temporarily dropping Co-Authors support and directly getting the Author from Gutenberg. The final solution would be to get co-authors data from Gutenberg as well, as we can do with the other data. |
I'm dropping Co-Authors support for now, to make the user experience better. We can then sort out in time how to get the data from the plugin. |
I've removed Co-Authors Plus support, and modified the PR's description to reflect that. |
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.
Looks great! 👍
Description
This PR introduces the ability to select a specific
Tag
,Section
(Category) orAuthor
value as a way to fine-grain results within the PCH's Related Top Posts panel. Once one of the filter types (let's sayTag
) has been selected and the post has more than 1 tags, a second drop-down will be displayed to select the specific tag to filter by.Motivation and context
How has this been tested?
Some existing tests were slightly modified to pass. The testing was manual and there are no automated tests specifically targeting filter type and value selection.
Screenshots
The filter type drop-down
The filter value drop-down
The same view/functionality applies in the case of many categories or authors.