Repository navigation
feat(search): split ADS compat collection filter into pills - #937
Open
thostetler wants to merge 2 commits into
Open
thostetler wants to merge 2 commits into
thostetler wants to merge 2 commits into
Conversation
Bundle sizeShared by all pages: 629.5 kB (-0.1 kB) ⚪
First load = polyfills + shared |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #937 +/- ##
========================================
+ Coverage 55.0% 55.1% +0.2%
========================================
Files 374 377 +3
Lines 11462 11605 +143
Branches 2514 2545 +31
========================================
+ Hits 6303 6394 +91
- Misses 4527 4573 +46
- Partials 632 638 +6
🚀 New features to boost your workflow:
|
thostetler
force-pushed
the
feature/ads-compat-collection-pills-master
branch
from
September 29, 2026 20:11
af7ed35 to
9a984e6
Compare
In ADS compat mode the OR-joined fq_database filter rendered as one pill for "astronomy OR physics", so removing it dropped both collections at once. It now splits into one removable pill per collection, joined by a small OR chip, and the pill is labeled "collection" instead of "database". AND-joined groups keep the single combined pill. - Add removeFQTerm to drop a single term from an AND-group inside an fq value, instead of only removing the whole group, and parenthesize every group it rebuilds — getClauses only recognizes a parenthesized group, so an unwrapped one parses back to nothing and its pills disappear while the filter stays applied - Gate the compat collection defaults on ads_compat=1 rather than on fq_database being unset, so a collection the user removed isn't reapplied on the next search, and clearing every collection sticks - Replace a settings-derived database filter when entering compat mode instead of AND-joining onto it, which produced empty result sets - Gate the compat-to-normal strip on ads_compat=1 still being present; it previously matched on filter shape alone and could wipe a normal-mode user's Collections facet pick, since astronomy/physics are valid choices there too - Match compat filters regardless of term quoting, so the shape Classic Form produces is recognized and stripped like the default one - Normalize a single fq value to an array before filtering or appending to it — it round-trips through the URL as a bare string, and ramda's array ops were silently spreading it into one element per character - Widen the filter pill max width from 200px to 400px so longer labels like "collection: earthscience AND general" aren't clipped
setFQ pulled in query-utils' zod/store/api graph via searchMode.ts, adding it to the landing page, ClassicForm, and abs bundles. Extract safeGetArray into an import-free leaf module and inline the one setFQ call searchMode.ts needs as setDatabaseFQ, so the module no longer imports query-utils at all.
thostetler
force-pushed
the
feature/ads-compat-collection-pills-master
branch
from
September 30, 2026 02:32
9a984e6 to
ff0b37e
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In ADS compat mode the OR-joined database filter showed as a single pill, so removing it dropped every collection at once, and removing a collection could get silently reapplied on the next search. This ports the fix that shipped as v0.50.2-hotfix-1 to master.