Suggestion for @mention improvement #160
Labels
No labels
area/ci
area/desktop
area/packaging
area/protocol
area/reading
area/ui
area/web
area/writing
kind/bug
kind/feature
kind/infra
kind/request
needs/user
parked
perf
security
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
littlefox/neokom#160
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is from a user on LysKOM who suggested the combined use of person number and person name and translating it upon display:
En idé är att i inlägget skriva det som <person 14777: Johan Holtz,
Lysator> men sedan i klienten visa det som @Johan Holtz, Lysator. Då
fungerar det bra även i andra klienter. Dessutom har du ett visst
skydd mot att personen byter namn mellan att inlägget skrivs och att
det läses.
Triage: a good fit, added to 0.4. Recorded as D-047.
This is exactly elisp's own link syntax.
lyskom-edit-insert-link(edit-text.el) writes<person N: Name>,<möte N: name>and<text N: subject>, and elisp shows them as buttons. So elisp users get a clickable person, not raw text, and other clients still see something readable.Plan:
<person 14777: Johan Holtz, Lysator>into the body. The composer shows it as an@Johan Holtz, Lysatorchip, so the user never edits the raw form by accident.<person N: …>is shown as@+ the person's current name (looked up by number, with the written name as the fallback). It links to their profile (#151).<möte N: …>and<text N: …>become links to the channel and the post.@Namein posts from other clients (and NeoKOM's 0.3 posts) still counts, as today.Compat check before building: what elisp does with the name part after a rename (it should just show what was written), and that lyskomd's text limit isn't an issue for long names.
Extended (D-047, your comment): NeoKOM will also write
<möte N: name>and<text N: subject>, not only show them, the same convention as elisp and jskom. In the composer, picking a channel or a post to link inserts that form (a # suggestion list for channels, and a post number for texts), shown as a chip. In the reader, all three become links with the current name or subject.A correction to my plan: the composer shows the raw
<person N: Name>text, not a chip. A plain textarea can't hold chips, and the raw form is what elisp users see too. Implementation in PR #162.Merged in #162 (D-047).
@namewrites<person N: Full Name>,#namewrites<möte N: name>, and#123writes<text 123: subject>.Verified: markup and wrap unit tests; links.spec on desktop, Android and iPhone (write with @/#, read, follow each, Tove sees the mention); the mentions, compose, format and notifications specs; screenshots checked; CI green.