Skip to content

standardize subsite filtering across listings, feeds, and bare pages#3979

Draft
dannon wants to merge 8 commits into
galaxyproject:mainfrom
dannon:subsite-filter-standardization
Draft

standardize subsite filtering across listings, feeds, and bare pages#3979
dannon wants to merge 8 commits into
galaxyproject:mainfrom
dannon:subsite-filter-standardization

Conversation

@dannon
Copy link
Copy Markdown
Member

@dannon dannon commented May 14, 2026

Summary

Replaces 5+ inconsistent inline subsite-filter implementations with one shared utility (astro/src/utils/subsites.ts) and routes every news/event/article listing, atom feed, JSON feed, and bare page through it. Locks in the semantics agreed in #3839: global is a regular subsite ID (the root site), all is broadcast, all-eu/all-fr are regional groups.

Also fixes a latent bug in astro/src/pages/eu/feed.atom.ts where all-eu-tagged content was being dropped because that feed never checked the group tag.

Behavior changes

Content tagged [global, us] (the dominant pattern, ~981 files) no longer leaks onto EU or FR bare pages and feeds.

Route Before After Drop %
/bare/eu/news/ 1682 1262 -420 25%
/bare/eu/events/ 1403 823 -580 41%
/bare/fr/news/ 1026 422 -604 59%
/bare/fr/events/ 1220 462 -758 62%
/eu/feed.atom 1602 1259 -343 21%
/eu/news/feed.atom 1682 1262 -420 25%

The 422 / 462 items remaining on /bare/fr/* are content actually tagged with fr, all-fr, ifb, or all. The unfiltered main listings (/news/, /events/, /us/news/, JSON feeds) are unchanged.

Heads-up for embedders

@bgruening @natalie-wa -- the FR bare pages drop ~60% with this change. Anyone embedding /bare/fr/news/ or /bare/fr/events/ should sanity-check; the remaining items are those actually tagged fr/all-fr/ifb/all. If items disappeared that you intended to surface, the fix is updating their content frontmatter, not reverting this PR.

Test plan

  • npm run test:unit -- 118 tests pass
  • npm run build -- exits clean
  • npx playwright test -- subsite/bare/feed tests pass; remaining failures (search strict-locator, redirect timeout, /admin/ navigation timeout) are pre-existing flakes that pass in isolation
  • Before/after content counts captured per route

Supersedes the documentation in #3839 -- docs follow in a separate PR once this is consistent.

@dannon dannon marked this pull request as draft May 14, 2026 02:13
@bgruening
Copy link
Copy Markdown
Member

Thanks. I ping some people to double-check.

My assumption is that this is ok as it is. Once this is all working and consistent we will document all the features and changes and see if we can get more subsites to use more use of the Hub

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