Make tag badges link to tag pages #190

Merged
erik merged 1 commit from fix/task-b21377e4-tag-badge-links into main 2026-06-22 11:51:09 -05:00
Owner

Summary

Ensure public tag badges are rendered through a shared link component with accessible focus styling, and add regression coverage for post detail tag badge links.

Task

Task: #task-b21377e4

Changes

  • Added a shared TagBadgeLink renderer for public tag badges.
  • Kept tag badge links pointing to /tags/{slug} in feed and post contexts.
  • Added focus ring styling while preserving existing badge hover appearance.
  • Updated public page tests to assert post detail tag badges link to the tag page.

Testing

  • Unit tests added/updated
  • Manual testing performed

Verification:

  • npm exec --workspace @slugkit/template-site -- vitest run --config ../../vitest.config.ts src/routes/__tests__/public.test.ts
  • ./scripts/pre-pr.sh

Note: the current page already rendered anchors for the inspected tag badges; this PR adds explicit regression coverage and shared accessible link styling so that behavior is preserved.

Checklist

  • ./scripts/pre-pr.sh passes
  • Documentation updated (if needed)
  • No unrelated changes included
## Summary Ensure public tag badges are rendered through a shared link component with accessible focus styling, and add regression coverage for post detail tag badge links. ## Task Task: #task-b21377e4 ## Changes - Added a shared `TagBadgeLink` renderer for public tag badges. - Kept tag badge links pointing to `/tags/{slug}` in feed and post contexts. - Added focus ring styling while preserving existing badge hover appearance. - Updated public page tests to assert post detail tag badges link to the tag page. ## Testing - [x] Unit tests added/updated - [x] Manual testing performed Verification: - `npm exec --workspace @slugkit/template-site -- vitest run --config ../../vitest.config.ts src/routes/__tests__/public.test.ts` - `./scripts/pre-pr.sh` Note: the current page already rendered anchors for the inspected tag badges; this PR adds explicit regression coverage and shared accessible link styling so that behavior is preserved. ## Checklist - [x] `./scripts/pre-pr.sh` passes - [x] Documentation updated (if needed) - [x] No unrelated changes included
fix: ensure public tag badges are links
All checks were successful
CI / build-lint-test (pull_request) Successful in 50s
67876e924d
Task: #task-b21377e4
Author
Owner

PR Review

Summary

Reviewed PR #190 for task task-b21377e4. The diff is scoped to public tag badge rendering and public page regression coverage. The shared TagBadgeLink keeps tag badges linked to /tags/{slug} and adds visible focus styling while preserving the badge appearance.

Acceptance criteria

  • Public tag badges link to the correct tag detail pages.
    • PostTags and FeedTagBadges render anchors via TagBadgeLink with href="/tags/${tag.slug}".
  • Link styling preserves the badge appearance and accessible focus/hover behavior.
    • Existing badge classes are retained and focus ring classes were added.
  • Existing public page tests are updated or added to cover tag badge links.
    • public.test.ts now creates a tagged post detail page and asserts the tag href, badge text, and focus styling.

Verification

  • Local: ./scripts/pre-pr.sh passed.
  • Forgejo Actions: #260 passed (success build-lint-test, commit 67876e924d).

Blocking issues

None.

Warnings

None.

Verdict

Approved. Do not merge until explicit human merge approval is given.

## PR Review ### Summary Reviewed PR #190 for task `task-b21377e4`. The diff is scoped to public tag badge rendering and public page regression coverage. The shared `TagBadgeLink` keeps tag badges linked to `/tags/{slug}` and adds visible focus styling while preserving the badge appearance. ### Acceptance criteria - [x] Public tag badges link to the correct tag detail pages. - `PostTags` and `FeedTagBadges` render anchors via `TagBadgeLink` with `href="/tags/${tag.slug}"`. - [x] Link styling preserves the badge appearance and accessible focus/hover behavior. - Existing badge classes are retained and focus ring classes were added. - [x] Existing public page tests are updated or added to cover tag badge links. - `public.test.ts` now creates a tagged post detail page and asserts the tag href, badge text, and focus styling. ### Verification - Local: `./scripts/pre-pr.sh` passed. - Forgejo Actions: #260 passed (`success build-lint-test`, commit `67876e924d`). ### Blocking issues None. ### Warnings None. ### Verdict Approved. Do not merge until explicit human merge approval is given.
erik merged commit 05f9cd1fa7 into main 2026-06-22 11:51:09 -05:00
erik deleted branch fix/task-b21377e4-tag-badge-links 2026-06-22 11:51:09 -05:00
Sign in to join this conversation.
No description provided.