standardize subsite filtering across listings, feeds, and bare pages#3979
Draft
dannon wants to merge 8 commits into
Draft
standardize subsite filtering across listings, feeds, and bare pages#3979dannon wants to merge 8 commits into
dannon wants to merge 8 commits into
Conversation
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 |
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.
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:globalis a regular subsite ID (the root site),allis broadcast,all-eu/all-frare regional groups.Also fixes a latent bug in
astro/src/pages/eu/feed.atom.tswhereall-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.The 422 / 462 items remaining on /bare/fr/* are content actually tagged with
fr,all-fr,ifb, orall. 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 passnpm run build-- exits cleannpx playwright test-- subsite/bare/feed tests pass; remaining failures (search strict-locator, redirect timeout, /admin/ navigation timeout) are pre-existing flakes that pass in isolationSupersedes the documentation in #3839 -- docs follow in a separate PR once this is consistent.