Show a note's tags under its title #168

Closed
opened 2026-10-14 06:54:54 +00:00 by kayg · 1 comment
Owner

kayg: with tags moving into frontmatter (the smart → in #149), "we need some way to surface those tags".

Design:

  • A quiet row of tag chips under the title, read from the frontmatter tags: field. Inline #tags in the body keep their own styling.
  • Tap a chip to open that tag's list.
  • + adds a tag (from the tag picker on search); × on hover removes one, and the change is written to the frontmatter.
  • No chips row when the note has no tags. No layout shift.
  • Phone: the row wraps cleanly at 320.
  • Source mode: the frontmatter shows as it is.
kayg: with tags moving into frontmatter (the smart → in #149), "we need some way to surface those tags". **Design:** - A quiet row of tag chips under the title, read from the frontmatter `tags:` field. Inline `#tags` in the body keep their own styling. - Tap a chip to open that tag's list. - `+` adds a tag (from the tag picker on search); × on hover removes one, and the change is written to the frontmatter. - No chips row when the note has no tags. No layout shift. - Phone: the row wraps cleanly at 320. - Source mode: the frontmatter shows as it is.
Author
Owner

Screenshots (Chromium, real server and engine), a note with 0, 1 and 8 tags (one tag is very long). Light and dark.

320 light: 0 tags, 1 tag, 8 tags

320-light-0-tags.png 320-light-1-tags.png 320-light-8-tags.png

320 dark: 0 tags, 1 tag, 8 tags

320-dark-0-tags.png 320-dark-1-tags.png 320-dark-8-tags.png

390 light: 0 tags, 1 tag, 8 tags

390-light-0-tags.png 390-light-1-tags.png 390-light-8-tags.png

390 dark: 0 tags, 1 tag, 8 tags

390-dark-0-tags.png 390-dark-1-tags.png 390-dark-8-tags.png

1440 light: 0 tags, 1 tag, 8 tags

1440-light-0-tags.png 1440-light-1-tags.png 1440-light-8-tags.png

1440 dark: 0 tags, 1 tag, 8 tags

1440-dark-0-tags.png 1440-dark-1-tags.png 1440-dark-8-tags.png

Hover (the x springs in at the chip's corner, nothing moves) and the + picker, 8 tags:

320 light:

320-light-8-hover.png 320-light-8-picker.png

320 dark:

320-dark-8-hover.png 320-dark-8-picker.png

390 light:

390-light-8-hover.png 390-light-8-picker.png

390 dark:

390-dark-8-hover.png 390-dark-8-picker.png

1440 light:

1440-light-8-hover.png 1440-light-8-picker.png

1440 dark:

1440-dark-8-hover.png 1440-dark-8-picker.png

Touch (no hover): each chip carries its own x:

320-touch-8-tags.png

Checks in the e2e: row sits between title and first paragraph; no horizontal overflow at 320/390/1440; row does not move when a chip is removed; frontmatter text verified on the server after add and remove; passes in Chromium 1440/390 and WebKit 390.

Perf: the row's decoration is rebuilt on a text change from the frontmatter slice only: about 34 microseconds per keystroke on a 50 KB note with 8 tags (micro-benchmark with bun), nothing is read from the body. No new requests, no effect on the perf budgets.

Left for others: #165's picker plugs in at lib/tag-source.ts. With zero tags there is no row (as the issue says), so the first tag is added from the Info sheet's tags property for now.

Screenshots (Chromium, real server and engine), a note with 0, 1 and 8 tags (one tag is very long). Light and dark. **320 light:** 0 tags, 1 tag, 8 tags ![320-light-0-tags.png](https://git.kayg.org/attachments/5f45a905-d66c-4c7d-8f26-f1522145a6f7) ![320-light-1-tags.png](https://git.kayg.org/attachments/489e465d-b546-49cf-a73f-b07703e6724d) ![320-light-8-tags.png](https://git.kayg.org/attachments/8baddb8f-20e4-40eb-b6ad-af35eefc482e) **320 dark:** 0 tags, 1 tag, 8 tags ![320-dark-0-tags.png](https://git.kayg.org/attachments/0ce6238b-09fb-4bbb-a296-3002c0f8b668) ![320-dark-1-tags.png](https://git.kayg.org/attachments/898e388d-81f3-4226-b3eb-07c12cc3d20a) ![320-dark-8-tags.png](https://git.kayg.org/attachments/37683009-bba9-4a98-a822-df08d63dd763) **390 light:** 0 tags, 1 tag, 8 tags ![390-light-0-tags.png](https://git.kayg.org/attachments/ca4f416f-d0c4-4e20-9547-80b1175f2493) ![390-light-1-tags.png](https://git.kayg.org/attachments/4215dad7-b356-4303-9757-9cc25455c16f) ![390-light-8-tags.png](https://git.kayg.org/attachments/86c1c4b0-7988-4a8e-a441-3d6d1c8d1213) **390 dark:** 0 tags, 1 tag, 8 tags ![390-dark-0-tags.png](https://git.kayg.org/attachments/a6cc9a15-db26-4afd-b5be-9e278c634723) ![390-dark-1-tags.png](https://git.kayg.org/attachments/66d0e1db-d4ab-48c1-91e8-a9836dc0bac9) ![390-dark-8-tags.png](https://git.kayg.org/attachments/accd644e-b5e1-447f-a245-c1e88915491d) **1440 light:** 0 tags, 1 tag, 8 tags ![1440-light-0-tags.png](https://git.kayg.org/attachments/b07aa334-5c7f-4271-816a-4353d83b2f1c) ![1440-light-1-tags.png](https://git.kayg.org/attachments/b2e982ee-f781-4fcf-b690-a5f24f65ce57) ![1440-light-8-tags.png](https://git.kayg.org/attachments/34de5522-619f-4099-9fc9-372019715f1a) **1440 dark:** 0 tags, 1 tag, 8 tags ![1440-dark-0-tags.png](https://git.kayg.org/attachments/6d350aec-6206-485b-a64f-141246f801b7) ![1440-dark-1-tags.png](https://git.kayg.org/attachments/f0607942-cc1e-49bc-a28c-9814e7f8dbe3) ![1440-dark-8-tags.png](https://git.kayg.org/attachments/5a8486d3-27d2-4843-8a96-376f6ab8e38d) **Hover (the x springs in at the chip's corner, nothing moves) and the + picker, 8 tags:** 320 light: ![320-light-8-hover.png](https://git.kayg.org/attachments/f2dd6a2f-35e9-4bc2-85bf-541424079081) ![320-light-8-picker.png](https://git.kayg.org/attachments/8de4f268-e691-412c-8ea7-d7212eb7030d) 320 dark: ![320-dark-8-hover.png](https://git.kayg.org/attachments/d704c177-21e7-419e-8e1a-a0462eca3c8f) ![320-dark-8-picker.png](https://git.kayg.org/attachments/0d7d97c5-2e7c-4cc5-9842-cd591546614a) 390 light: ![390-light-8-hover.png](https://git.kayg.org/attachments/e565cc45-a9b9-4058-ab85-fad0b0b42abc) ![390-light-8-picker.png](https://git.kayg.org/attachments/79729b01-ac7d-43f2-98bc-43c53fb7d0e8) 390 dark: ![390-dark-8-hover.png](https://git.kayg.org/attachments/7afe1ff8-a347-4500-9855-c80bb54cb5dc) ![390-dark-8-picker.png](https://git.kayg.org/attachments/cff98f7c-c27e-42b0-8c03-55ac9f80578e) 1440 light: ![1440-light-8-hover.png](https://git.kayg.org/attachments/fe353d17-f9a0-4bc8-8f16-d377a2a08349) ![1440-light-8-picker.png](https://git.kayg.org/attachments/ee9c9fe1-605c-4024-a518-f68c48fa6c0a) 1440 dark: ![1440-dark-8-hover.png](https://git.kayg.org/attachments/aa8d4733-0c8e-4e39-bd19-94319816056b) ![1440-dark-8-picker.png](https://git.kayg.org/attachments/8738298b-2bc9-401a-ad15-ae3ab2908896) **Touch (no hover): each chip carries its own x:** ![320-touch-8-tags.png](https://git.kayg.org/attachments/47d221c5-d5f5-4d51-8264-e345af2a42b9) Checks in the e2e: row sits between title and first paragraph; no horizontal overflow at 320/390/1440; row does not move when a chip is removed; frontmatter text verified on the server after add and remove; passes in Chromium 1440/390 and WebKit 390. Perf: the row's decoration is rebuilt on a text change from the frontmatter slice only: about 34 microseconds per keystroke on a 50 KB note with 8 tags (micro-benchmark with bun), nothing is read from the body. No new requests, no effect on the perf budgets. Left for others: #165's picker plugs in at `lib/tag-source.ts`. With zero tags there is no row (as the issue says), so the first tag is added from the Info sheet's tags property for now.
kayg closed this issue 2026-10-14 08:38:37 +00:00
Sign in to join this conversation.
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
kayg/calternal#168
No description provided.