experiments in a post-browser web
10
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(page): page-host tag widget accepts comma-separated tags

Pasting or typing `book, fiction, novel` in the page-host floating
tag input previously created a single literal tag with the entire
string as its name (commas, spaces and all). The Enter handler now
splits on commas, trims each segment, drops empty segments, and
adds each as its own tag. Single-tag input is unchanged.

Tab-completion still operates on the whole input value — typing
`boo, fic` won't suggest tags starting with `fic`. Better
last-segment-aware completion is a separate scope.

+11 -1
+11 -1
app/page/page.js
··· 3506 3506 e.preventDefault(); 3507 3507 const value = tagsInput.value.trim(); 3508 3508 if (value) { 3509 - addTagToPage(value); 3509 + // Split on commas so the user can paste / type comma-separated 3510 + // tags in one go (`book, fiction, novel`). Each segment is added 3511 + // as its own tag; empty segments and pure-whitespace tokens are 3512 + // dropped. Single-tag input still works — split gives `[value]`. 3513 + const names = value 3514 + .split(',') 3515 + .map(t => t.trim()) 3516 + .filter(Boolean); 3517 + for (const name of names) { 3518 + addTagToPage(name); 3519 + } 3510 3520 tagsInput.value = ''; 3511 3521 if (tagsSuggestion) tagsSuggestion.textContent = ''; 3512 3522 }