Skip to content

SCIX-778 feat(classic-form): extract collection and property into query filters#772

Merged
thostetler merged 7 commits intoadsabs:masterfrom
thostetler:SCIX-778-classic-form-query-filters
Jan 21, 2026
Merged

SCIX-778 feat(classic-form): extract collection and property into query filters#772
thostetler merged 7 commits intoadsabs:masterfrom
thostetler:SCIX-778-classic-form-query-filters

Conversation

@thostetler
Copy link
Member

@thostetler thostetler commented Jan 20, 2026

Classic form now generates fq_database and fq_property filter params instead of embedding collection and property in the q param, matching legacy ADS URL format.

  • Add getSearchQueryParams function with getDatabaseFilter and getPropertyFilter helpers
  • Refactor getSearchQuery to delegate to new function
  • Update query preview UI to show filters separately
image

Add interface for structured query params with filter query support.
This type will be used as the return type for the new getSearchQueryParams
function that extracts collection and property into separate fq params.
…raction

Add getSearchQueryParams function that returns structured query params
instead of a URL string. This extracts collection and property choices
into separate fq_database and fq_property filter params, moving them
out of the main q param.

- Add getDatabaseFilter helper for database: (x OR y) filters
- Add getPropertyFilter helper for property: (x AND y) filters
- Add makeFQHeader helper for Solr filter query headers
- Update test imports for new function
…ters to fq params

getSearchQuery now delegates to getSearchQueryParams, eliminating
duplicated code. This changes the default behavior so that collection
and property filters are extracted to fq_database and fq_property
params instead of being embedded in the q parameter.
Export getSearchQueryParams, getDatabaseFilter, getPropertyFilter and
IClassicFormQueryParams from the barrel file using explicit named exports.
Added index signature to IClassicFormQueryParams for compatibility with
SafeSearchUrlParams, and added explicit return type annotation to useMemo
in CurrentQuery component to fix implicit any[] type inference.
@codecov
Copy link

codecov bot commented Jan 20, 2026

Codecov Report

❌ Patch coverage is 98.95833% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 61.0%. Comparing base (b6389d6) to head (f9c1ddd).

Files with missing lines Patch % Lines
src/components/ClassicForm/helpers.ts 99.0% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master    #772     +/-   ##
========================================
+ Coverage    60.9%   61.0%   +0.1%     
========================================
  Files         301     301             
  Lines       35040   35128     +88     
  Branches     1500    1505      +5     
========================================
+ Hits        21320   21408     +88     
  Misses      13686   13686             
  Partials       34      34             
Files with missing lines Coverage Δ
src/components/ClassicForm/helpers.ts 98.4% <99.0%> (+0.2%) ⬆️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@thostetler thostetler requested a review from shinyichen January 20, 2026 03:37
@thostetler thostetler marked this pull request as ready for review January 20, 2026 03:37
@thostetler thostetler merged commit ed2c00b into adsabs:master Jan 21, 2026
5 checks passed
@thostetler thostetler deleted the SCIX-778-classic-form-query-filters branch January 21, 2026 01:30
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.

2 participants