Skip to content

fix(facets): limit Collections facet to classic ADS databases - #2382

Merged
thostetler merged 1 commit into
adsabs:masterfrom
thostetler:chore/collections-facet-ads-only
Sep 30, 2026
Merged

thostetler merged 1 commit into
adsabs:masterfrom
thostetler:chore/collections-facet-ads-only

Conversation

@thostetler

Copy link
Copy Markdown
Member

The Collections facet was listing SciX subcategories (astrophysics, planetary, heliophysics, earthscience) alongside the classic ADS databases; this is the ADS UI, so it now offers only astronomy, physics, and general.

  • Display-only, via an allowlist in the facet's preprocessors hook (same mechanism refereed_facet.js uses) — query handling is untouched.
  • A saved or shared query already filtered to a hidden collection (e.g. database:astrophysics) still runs and still shows its filter breadcrumb; it's just no longer offered as a facet checkbox.

@thostetler
thostetler marked this pull request as ready for review September 30, 2026 18:07
Copilot AI balanced review requested due to automatic review settings September 30, 2026 18:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Filtering a full page can leave pagination requesting the wrong offset, making later collections unreachable.

Review effort: Balanced
Findings: 1 High severity

Open (1)
What changed in this PR

This PR limits the ADS Collections facet to classic databases while leaving saved queries for other collections intact.

Changes:

  • Allowlist astronomy, physics, and general in the facet display.
  • Add tests for filtering, counts, pagination, and query preservation.
File Description
test/​mocha/​js/​wraps/​database_facet.spec.js Tests the Collections facet behavior.
src/​js/​wraps/​database_facet.js Filters the displayed collection options.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/js/wraps/database_facet.js
Collections facet now lists only astronomy, physics, and general;
SciX subcategories (astrophysics, planetary, heliophysics,
earthscience) no longer appear. A query already filtered to a
hidden collection still runs unchanged — only the facet checkbox
list is filtered.
@thostetler
thostetler force-pushed the chore/collections-facet-ads-only branch from e91bf08 to 8088b56 Compare September 30, 2026 18:25
@thostetler
thostetler merged commit 045c18f into adsabs:master Sep 30, 2026
1 check passed
@thostetler
thostetler deleted the chore/collections-facet-ads-only branch September 30, 2026 20:07
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.

3 participants