etherpad-lite/doc/api
John McLear 504b05bc11 feat(userlist): click a user to open chat with @<name> prefilled
Newcomers to a multi-user pad regularly fail to discover the chat
panel and the @-mention convention. Make the user list itself the
discovery affordance: clicking another user's row opens chat (if
hidden) and prefills the input with "@<their_name> ", ready to send.

The skin gets a small visual cue — pointer cursor on .usertdname and
an underline on hover — so the affordance is visible without
requiring a redesign. The color swatch keeps its own click semantics
(color picker), so the swatch cell is excluded from the new handler.

To let bot/AI plugins substitute their trigger string for an
otherwise-useless @-mention of the bot's display name (e.g.
"@AI Assistant" → "@ai"), this adds a new client-side hook,
chatPrefillFromUser, that takes {authorId, name, prefill} and lets
the first plugin to return a non-empty string override the default
prefill. Documented in doc/api/hooks_client-side.md alongside
chatSendMessage.

Plugin errors in the hook are caught — a misbehaving plugin can't
break the click. If chat is hidden by pad settings, chat.show() is
a no-op and the click effectively does nothing, which matches the
existing behavior of "no chat means no chat-related affordances".

The new prefill never clobbers a real partial message in the input;
if the user was mid-typing something, the @-mention is appended
rather than replacing.
2026-05-02 20:04:57 +01:00
..
api.adoc Added docs as asciidoctor with cross platform support. (#5733) 2023-06-21 13:13:31 +01:00
changeset_library.adoc chore: Rename some occurences of etherpad-lite to etherpad (#7552) 2026-04-19 16:53:57 +02:00
changeset_library.md chore: Rename some occurences of etherpad-lite to etherpad (#7552) 2026-04-19 16:53:57 +02:00
editbar.adoc Added docs as asciidoctor with cross platform support. (#5733) 2023-06-21 13:13:31 +01:00
editbar.md Added docs and search. (#6273) 2024-03-24 09:53:17 +01:00
editorInfo.adoc Added docs as asciidoctor with cross platform support. (#5733) 2023-06-21 13:13:31 +01:00
editorInfo.md feat(editor): add IDE-style line ops (duplicate / delete) (#7564) 2026-04-29 09:21:05 +01:00
embed_parameters.adoc Added docs as asciidoctor with cross platform support. (#5733) 2023-06-21 13:13:31 +01:00
embed_parameters.md Added vitepress for documentation. (#6270) 2024-03-23 20:58:05 +01:00
hooks_client-side.adoc Add docs for aceRegisterLineAttributes hook (#7512) 2026-04-14 13:48:33 +01:00
hooks_client-side.md feat(userlist): click a user to open chat with @<name> prefilled 2026-05-02 20:04:57 +01:00
hooks_overview.adoc Added docs as asciidoctor with cross platform support. (#5733) 2023-06-21 13:13:31 +01:00
hooks_overview.md Added vitepress for documentation. (#6270) 2024-03-23 20:58:05 +01:00
hooks_server-side.adoc Added vitepress for documentation. (#6270) 2024-03-23 20:58:05 +01:00
hooks_server-side.md Added docs and search. (#6273) 2024-03-24 09:53:17 +01:00
http_api.adoc feat(api): public compactPad API + bin/compactPad CLI over existing Cleanup (#7567) 2026-05-01 14:23:54 +01:00
http_api.md feat(api): public compactPad API + bin/compactPad CLI over existing Cleanup (#7567) 2026-05-01 14:23:54 +01:00
index.md Added vitepress for documentation. (#6270) 2024-03-23 20:58:05 +01:00
pluginfw.adoc Added docs as asciidoctor with cross platform support. (#5733) 2023-06-21 13:13:31 +01:00
pluginfw.md Added vitepress for documentation. (#6270) 2024-03-23 20:58:05 +01:00
toolbar.adoc Added docs as asciidoctor with cross platform support. (#5733) 2023-06-21 13:13:31 +01:00
toolbar.md Added vitepress for documentation. (#6270) 2024-03-23 20:58:05 +01:00