Skip to content

[Feature] Add support for custom taxonomies to FacetsManager #43

Merged
titouanmathis merged 3 commits intodevelopfrom
feature/facets-tax-query
Aug 14, 2025
Merged

[Feature] Add support for custom taxonomies to FacetsManager #43
titouanmathis merged 3 commits intodevelopfrom
feature/facets-tax-query

Conversation

@titouanmathis
Copy link
Contributor

@titouanmathis titouanmathis commented Aug 14, 2025

🔗 Linked issue

#42

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

This PR adds support for custom taxonomy to the URL parameters for the FacetsManager.

With a custom taxonomy named text_taxonomy, the following parameters can be used:

?facets[test_taxonomy]=slug1,slug2
?facets[test_taxonomy]=1,2,3
?facets[test_taxonomy__not_in]=excluded-slug
?facets[test_taxonomy__and]=slug1,slug2
?facets[test_taxonomy__exists]=1

As of now the relation operator for tax queries is not configurable and will always be AND. Usage will tell us if customization is needed.

📝 Checklist

  • I have linked an issue or discussion.
  • I have added tests (if possible).
  • I have updated the documentation accordingly.
  • I have updated the changelog.

@titouanmathis titouanmathis force-pushed the develop branch 2 times, most recently from fca86d6 to 9c5eb43 Compare August 14, 2025 10:19
@titouanmathis titouanmathis force-pushed the feature/facets-tax-query branch from f0bd545 to 419418b Compare August 14, 2025 10:20
@codecov
Copy link

codecov bot commented Aug 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.85%. Comparing base (9c5eb43) to head (2b11b89).
⚠️ Report is 4 commits behind head on develop.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop      #43      +/-   ##
=============================================
+ Coverage      66.56%   68.85%   +2.29%     
- Complexity       209      222      +13     
=============================================
  Files             15       15              
  Lines            625      671      +46     
=============================================
+ Hits             416      462      +46     
  Misses           209      209              
Flag Coverage Δ
unittests 68.85% <100.00%> (+2.29%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@titouanmathis titouanmathis force-pushed the feature/facets-tax-query branch from 9321827 to 2b11b89 Compare August 14, 2025 10:54
@titouanmathis titouanmathis merged commit 73be288 into develop Aug 14, 2025
11 checks passed
@titouanmathis titouanmathis deleted the feature/facets-tax-query branch August 14, 2025 10:57
@titouanmathis titouanmathis mentioned this pull request Aug 14, 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.

1 participant

Comments