feat(kb): filter article list by category from category cards #206

Merged
vas2000-work merged 1 commit from feat/MAPPS-193-kb-category-card-filter into main 2026-06-16 23:48:59 +02:00
Owner

Category cards on the KB home previously all navigated to the unfiltered
article list because the card only received title/description and the list
route had no category parameter. Add a category slot to the
KBArticleList route (/kb/articles?:q&:tag&:category), pass each
category id into CategoryCard, and push it on click so the card lands on
the list pre-filtered to that category.

On the list page, seed the category dropdown from the new initial_category
prop (kept in sync via use_reactive like the tag filter), so the existing
fetch issues GET /kb/articles?category_id=... and the dropdown reflects
the selection. The page heading now shows the selected category name. The
dropdown's onchange pushes the route so the filtered view is shareable and
back-button-safe, and selecting "All Categories" clears the filter. The
breadcrumb category links and the home search ?q= forwarding are updated
to carry the new route field unchanged in behavior.

#MAPPS-193

Category cards on the KB home previously all navigated to the unfiltered article list because the card only received title/description and the list route had no category parameter. Add a `category` slot to the `KBArticleList` route (`/kb/articles?:q&:tag&:category`), pass each category id into `CategoryCard`, and push it on click so the card lands on the list pre-filtered to that category. On the list page, seed the category dropdown from the new `initial_category` prop (kept in sync via `use_reactive` like the tag filter), so the existing fetch issues `GET /kb/articles?category_id=...` and the dropdown reflects the selection. The page heading now shows the selected category name. The dropdown's onchange pushes the route so the filtered view is shareable and back-button-safe, and selecting "All Categories" clears the filter. The breadcrumb category links and the home search `?q=` forwarding are updated to carry the new route field unchanged in behavior. #MAPPS-193
feat(kb): filter article list by category from category cards
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 1m51s
Create release / Create release from merged PR (pull_request) Has been skipped
8d60c50967
Category cards on the KB home previously all navigated to the unfiltered
article list because the card only received title/description and the list
route had no category parameter. Add a `category` slot to the
`KBArticleList` route (`/kb/articles?:q&:tag&:category`), pass each
category id into `CategoryCard`, and push it on click so the card lands on
the list pre-filtered to that category.

On the list page, seed the category dropdown from the new `initial_category`
prop (kept in sync via `use_reactive` like the tag filter), so the existing
fetch issues `GET /kb/articles?category_id=...` and the dropdown reflects
the selection. The page heading now shows the selected category name. The
dropdown's onchange pushes the route so the filtered view is shareable and
back-button-safe, and selecting "All Categories" clears the filter. The
breadcrumb category links and the home search `?q=` forwarding are updated
to carry the new route field unchanged in behavior.

#MAPPS-193
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-apps!206
No description provided.