Skip to content

Conversation

@kirtangajjar
Copy link
Contributor

Description of the Change

Add categories to the pull screen. This is part 2 of 2 of this issue. This PR filters posts by categories.

Closes #428

How to test the Change

  1. Open post pull screen
  2. You should be able to see post categories in the filter.
  3. Select a category and filter. The posts should be filtered by categories.
  4. Pull the posts and verify only posts from that category have been pulled.
  5. Verify it on both internal and external connections.
  6. Verify it in conjunction with post type filter as well.

Changelog Entry

Added - Category filter in pull screen

Credits

Props @kirtangajjar

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@kirtangajjar kirtangajjar requested a review from a team as a code owner July 9, 2024 22:54
@kirtangajjar kirtangajjar requested review from Sidsector9 and faisal-alvi and removed request for a team and Sidsector9 July 9, 2024 22:54
@jeffpaul jeffpaul added this to the 2.1.0 milestone Jul 9, 2024
@jeffpaul jeffpaul linked an issue Jul 9, 2024 that may be closed by this pull request
Copy link
Contributor

@faisal-alvi faisal-alvi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kirtangajjar thanks for working on this. I tested and found the category filter does not work. Please check the GIF:

1244-01

When I select test03, 0 posts should return as results, but it still shows the post with the Uncategorised category.

@dkotter dkotter modified the milestones: 2.1.0, 2.2.0 Feb 7, 2025
@sanketio
Copy link

@faisal-alvi The issue mentioned in #1244 (review), should be fixed now. In addition to that, I have removed outputting the filters from the bottom, as it is being rendered with the same HTML id attribute, which is an issue.

One more thing we need to work on, is we will have to update the taxonomy list based on the supported post-types, I think, instead of just outputting all the taxonomies for all the post-types. I will work on it in this PR.

cc: @jeffpaul

@sanketio
Copy link

@jeffpaul I think we should also not generalize this only for the category, but give an option (maybe a filter) to allow other taxonomies as well, just a thought! What you say?

@sanketio
Copy link

For example, if the page post-type does not supports category or any other taxonomies, we shouldn't display the filter. So I think that category (taxonomy in general) filter should be based on post-type supports, instead of just the category or taxonomy.

In addition to that, it should respect the remote site's post-type and not the post-type on the current site.

@sanketio
Copy link

Just adding a note about #1244 (comment), that it's going to be tricky because we will have to generate the taxonomy terms again and again when someone changes the post-type filter. But I think we can get all the terms when creating a post-type filter, so trying it out as of now.

@jeffpaul
Copy link
Member

I think we should also not generalize this only for the category, but give an option (maybe a filter) to allow other taxonomies as well, just a thought! What you say?

Making this filterable so folks with custom taxonomies sounds good to me.

In addition to that, it should respect the remote site's post-type and not the post-type on the current site.

Since you're filtering terms from a separate site, we should render those in the taxonomy dropdown. If that term is missing on the current site then it should get added as part of the pull distribution

@sanketio
Copy link

After thorough testing I found that the pull feature with this PR breaks, and I tried debugging it but it keeps taking more time.

I'm creating new PR to generalize the taxonomy terms filter. :)

@sanketio
Copy link

@jeffpaul Just an update, I started working on generalizing taxonomy filter, and it's going pretty good. I think I will be able to complete it by tomorrow. :)

@sanketio
Copy link

Created a new PR: #1327 for this, I will continue working on this in that PR.

@dkotter dkotter modified the milestones: 2.2.0, 2.3.0 Aug 26, 2025
@sanketio
Copy link

sanketio commented Sep 5, 2025

@jeffpaul @dkotter This can be closed, as I have merged #1327 to the main PR #1237

@dkotter dkotter closed this Sep 5, 2025
@dkotter dkotter removed this from the 2.3.0 milestone Sep 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add Category to bulk pull screen

6 participants