Skip to content

Filter articles by subsection in the CMS list - #222

Merged
ssavutu merged 1 commit into
mainfrom
feat/subsection-article-filter
Aug 25, 2026
Merged

Filter articles by subsection in the CMS list#222
ssavutu merged 1 commit into
mainfrom
feat/subsection-article-filter

Conversation

@ssavutu

@ssavutu ssavutu commented Aug 25, 2026

Copy link
Copy Markdown
Member

The articles endpoint has accepted subsection_slug (with descendant expansion) for a while, but the list view only ever offered sections, so there was no way to narrow to a subsection from the UI.

What changed

All in frontend/src/pages/articleView.tsx:

  • Fetch /v1/taxonomy?type=subsection alongside sections, through one shared helper with its own sessionStorage cache key; the taxonomy type now carries parent_slug.
  • Selecting a section reveals an indented strip of its subsections. Selecting one of those reveals its children, so nested subsections drill down a level at a time. Each row has an "All ..." button that falls back to the level above, not all the way out to the section.
  • The selection is sent as subsection_slug, persisted alongside the other filters in the view's session UI state, and resets paging like they do.
  • A stale selection — a subsection since deleted or re-parented — is dropped once the taxonomy loads.

No server changes.

Testing

tsc --noEmit and eslint on the changed file are clean. Not yet checked in a browser.

🤖 Generated with Claude Code

The articles endpoint has accepted subsection_slug (with descendant
expansion) for a while, but the list view only ever offered sections, so
there was no way to narrow to a subsection from the UI.

Fetch the subsection taxonomy alongside sections and render an indented
strip under the selected section. Choosing a subsection reveals its own
children, so nested subsections drill down a level at a time, and each
row's "All ..." button falls back to the level above rather than to the
whole section. The selection is sent as subsection_slug, persisted with
the other filters, and dropped when it stops resolving.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@ssavutu
ssavutu merged commit 466c755 into main Aug 25, 2026
7 checks passed
@ssavutu
ssavutu deleted the feat/subsection-article-filter branch August 25, 2026 21:17
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.

1 participant