Files
q-blog/docs/DEVELOPER_GUIDE_MULTIBLOG.md
greenflame089 0b100af686 Release v0.2.2
2025-08-22 07:28:42 -04:00

1.5 KiB
Raw Permalink Blame History

Developer Guide — Multiple Blogs per Name (Plan A)

Generated 2025-08-21

Start here to implement the multi-blog feature. This guide links to the overview, technical plan, and ADR; then gives a fast manual test checklist.

Read these first

  • docs/features/FEATURE_MULTIBLOG_OVERVIEW.md
  • docs/features/TECH_IMPL_MULTIBLOG.md
  • docs/DECISIONS/ADR-0005-multiple-blogs-per-name.md

Quick path (tasks)

  1. Add /{name}/blogs route and component (UserBlogs.tsx).
  2. Add smart redirect for /{name} → single blog → /{name}/{blog}/posts, else /{name}/blogs.
  3. Convert Header “My Blog” to “My Blogs” dropdown (0 blogs → “Create Blog” button).
  4. Wire listBlogsByName(nameId) query if missing; use it in Header + UserBlogs.
  5. Tests: header menu behavior, redirect, UserBlogs rendering + empty states, basic a11y smoke.

Manual test checklist (click-through)

  • As a new user (0 blogs):
    • Header shows Create Blog; clicking creates first blog.
    • Visiting /{name} navigates to /{name}/blogs with empty state + CTA.
  • As a user with 1 blog:
    • Visiting /{name} lands on that blogs posts (history replaced).
    • Header shows My Blogs; menu lists 1 blog + “Create new blog”.
  • As a user with 2+ blogs:
    • Header menu lists all blogs; selecting one routes to /{name}/{blog}/posts and marks it active.
    • /{name}/blogs lists all blogs; shows Edit/Create when viewing own name.
  • Keyboard:
    • Menu opens with Enter/Space; items navigable with arrows; ESC closes and returns focus to trigger.