diff options
| author | grm <grm@eyesin.space> | 2026-09-15 23:17:17 +0300 |
|---|---|---|
| committer | grm <grm@eyesin.space> | 2026-09-15 23:17:17 +0300 |
| commit | 628dcb814ece6335667e2b719049728aa161d8c9 (patch) | |
| tree | 8fa4654771bee0166286b32fc123beec892870bb /AGENTS.md | |
| parent | 2c85ca1a46ddf4652f8fffc53d6bcfbe32b2b4ff (diff) | |
| download | blogspace-628dcb814ece6335667e2b719049728aa161d8c9.tar.gz blogspace-628dcb814ece6335667e2b719049728aa161d8c9.tar.bz2 blogspace-628dcb814ece6335667e2b719049728aa161d8c9.zip | |
Make the post form's tag input a box with a folded list of chips
A checkbox per existing tag stops working once a blog has dozens of
them. The form is now one comma-separated box, prefilled with the
post's tags, and the blog's tags sit folded under it as chips; a small
script toggles a clicked chip in the box, and without it the chips are
a plain list to copy from.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sd8UPWrvyYCLj97JexNw3A
Diffstat (limited to 'AGENTS.md')
| -rw-r--r-- | AGENTS.md | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -278,10 +278,12 @@ internal/web/ server.go (host router, middleware, render helpers) the URL (`/tag/<slug>`, `handleBlogTag`, published posts of every page, paginated) and the dedupe key — "Go" and "go" are one tag, the first spelling wins. `Post.Tags` rides along in `postCols` as two arrays. - The post form offers the blog's existing tags as checkboxes (`tag`) plus - a comma-separated `new_tags` box; `parseTags` normalises both into one - list (20 per post, 40 runes each; nothing slug-worthy → dropped) and - `SetPostTags` stores it after the post is saved. Tags no post carries + The post form is one comma-separated `tags` box (prefilled by + `tagsText`); the blog's existing tags sit folded under it as chips that + a small inline script toggles in the box (a plain list without JS). + `parseTags` normalises the box (20 per post, 40 runes each; nothing + slug-worthy → dropped) and `SetPostTags` stores it after the post is + saved. Tags no post carries are deleted (`deleteOrphanTags`, also after post/page deletion), so the form only lists tags in use. `TagCounts` counts published posts only: a tag on hidden posts alone shows nowhere public and its page is a 404. |
