Skip to content
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

Query Filters: Add taxonomy term counts #228

Merged
merged 2 commits into from
Oct 10, 2023

Conversation

renintw
Copy link
Contributor

@renintw renintw commented Oct 8, 2023

Closes #225

This PR adds taxonomy term counts to the filter dropdowns.

Screen Shot 2023-10-09 at 3 59 42 AM

@renintw renintw added [Component] Blocks/Editor Custom blocks, block variations, or editor customization [Type] Enhancement New feature or request labels Oct 8, 2023
@renintw renintw self-assigned this Oct 8, 2023
@renintw renintw force-pushed the enhance/add-taxonomy-term-count branch from 19afbd1 to c388405 Compare October 8, 2023 19:29
Copy link
Contributor

@adamwoodnz adamwoodnz left a comment

Choose a reason for hiding this comment

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

Nice, works on categories for me.

I was expecting numbers on the other filters (tags and flavors) too though. I think the same confusion would exist for them. Any reason not to?

@renintw renintw force-pushed the enhance/add-taxonomy-term-count branch from c388405 to 1a365ad Compare October 9, 2023 03:06
@renintw
Copy link
Contributor Author

renintw commented Oct 9, 2023

Ah, yeah, you are right. I didn't notice that each taxonomy has its own function. Thanks!

Updated Screenshots

Screen Shot 2023-10-09 at 12 06 32 PM Screen Shot 2023-10-09 at 12 06 36 PM

@renintw renintw requested a review from adamwoodnz October 9, 2023 13:22

/**
* Get an array of option labels.
* Each label is a string formatted as 'name (count)'. e.g, Business (30).
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️

Copy link
Contributor

@adamwoodnz adamwoodnz left a comment

Choose a reason for hiding this comment

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

LGTM! :shipit:

@renintw renintw merged commit ec0a70b into main Oct 10, 2023
1 check passed
@renintw renintw deleted the enhance/add-taxonomy-term-count branch October 10, 2023 05:01
renintw added a commit that referenced this pull request Oct 16, 2023
renintw added a commit that referenced this pull request Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] Blocks/Editor Custom blocks, block variations, or editor customization [Type] Enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Add taxonomy counts to the filter dropdowns
2 participants