forked from Qortal/q-blog
1.5 KiB
1.5 KiB
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.mddocs/features/TECH_IMPL_MULTIBLOG.mddocs/DECISIONS/ADR-0005-multiple-blogs-per-name.md
Quick path (tasks)
- Add
/{name}/blogsroute and component (UserBlogs.tsx). - Add smart redirect for
/{name}→ single blog →/{name}/{blog}/posts, else/{name}/blogs. - Convert Header “My Blog” to “My Blogs” dropdown (0 blogs → “Create Blog” button).
- Wire
listBlogsByName(nameId)query if missing; use it in Header + UserBlogs. - 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}/blogswith empty state + CTA.
- As a user with 1 blog:
- Visiting
/{name}lands on that blog’s posts (history replaced). - Header shows My Blogs; menu lists 1 blog + “Create new blog”.
- Visiting
- As a user with 2+ blogs:
- Header menu lists all blogs; selecting one routes to
/{name}/{blog}/postsand marks it active. /{name}/blogslists all blogs; shows Edit/Create when viewing own name.
- Header menu lists all blogs; selecting one routes to
- Keyboard:
- Menu opens with Enter/Space; items navigable with arrows; ESC closes and returns focus to trigger.