Skip to content

Add active filters to facet count queries - #48

Merged
PhilipTrauner merged 1 commit into
mainfrom
reload-dimensions-facets
Sep 17, 2026
Merged

PhilipTrauner merged 1 commit into
mainfrom
reload-dimensions-facets

Conversation

@pierosavi

Copy link
Copy Markdown
Member

Closes OHF-Device-Database/backlog-items#168

The dimensions endpoint was queried once, without filters

Count each facet against every other active filter. The selected facet itself still lists every alternative so several values can be combined, and a selected value that drops to zero stays listed so it can be deselected.

@netlify

netlify Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for device-database-preview ready!

Name Link
🔨 Latest commit 2a9d39a
🔍 Latest deploy log https://app.netlify.com/projects/device-database-preview/deploys/6aabe5d460bbdf0008765e14
😎 Deploy Preview https://deploy-preview-48--device-database-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@PhilipTrauner PhilipTrauner left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

thanks, looks good to me 👍

Comment thread src/pages/browse.astro
Comment on lines +50 to +55
// with at most one dimension selected both facets share the same query
const manufacturerDimensionsRequest =
browseFiltersToHref(categoryFacetFilters) ===
browseFiltersToHref(manufacturerFacetFilters)
? categoryDimensionsRequest
: getDimensions(browseFiltersToQuery(manufacturerFacetFilters));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

reducing this to one request when possible is neat 👌

@PhilipTrauner
PhilipTrauner merged commit 527ac2e into main Sep 17, 2026
7 checks passed
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.

reload dimensions on selection

2 participants