Thread Suite — 5 components for managing comment threads in collaborative contexts.
Components
collab_thread/1— Full thread view: root comment + replies + composer slotcollab_thread_header/1— Header bar with resolve/close actions and reply countcollab_thread_list/1— Sidebar list of all threads with sort/filtercollab_floating_thread/1— Absolutely-positioned thread (PhiaFloatingThread hook)collab_thread_resolved/1— Collapsed resolved thread with reopen action
Summary
Functions
Renders an absolutely-positioned thread panel.
Renders a full thread view with root comment, replies, and a composer slot.
Renders the thread header bar with resolve/reopen and close actions.
Renders a sidebar list of all threads with sort and filter controls.
Renders a collapsed view of a resolved thread.
Functions
Renders an absolutely-positioned thread panel.
Anchored to a specific (x, y) position within a document or editor.
Uses the PhiaFloatingThread JS hook for drag and click-outside-to-dismiss.
Attributes
id(:string) (required)thread(:map) (required)x(:any) - Defaults to0.y(:any) - Defaults to0.current_user_id(:string) - Defaults tonil.class(:string) - Defaults tonil.
Slots
composer
Renders a full thread view with root comment, replies, and a composer slot.
The thread displays all comments in chronological order with a header bar showing resolve/reopen controls.
Attributes
:thread— thread map with keys:id,resolved,comments(list of comment maps):current_user_id— ID of the viewing user:on_resolve— event name when resolving a thread:on_reopen— event name when reopening a resolved thread
Slots
:composer— slot for a composer component at the bottom of the thread
Attributes
id(:string) (required)thread(:map) (required)current_user_id(:string) - Defaults tonil.on_resolve(:string) - Defaults to"collab:thread:resolve".on_reopen(:string) - Defaults to"collab:thread:reopen".class(:string) - Defaults tonil.
Slots
composer
Renders the thread header bar with resolve/reopen and close actions.
Shows a reply count and action buttons. When the thread is resolved, the resolve button switches to a reopen button.
Attributes
id(:string) (required)thread_id(:string) (required)resolved(:boolean) - Defaults tofalse.reply_count(:integer) - Defaults to0.on_resolve(:string) - Defaults to"collab:thread:resolve".on_reopen(:string) - Defaults to"collab:thread:reopen".on_close(:string) - Defaults to"collab:thread:close".class(:string) - Defaults tonil.
Renders a sidebar list of all threads with sort and filter controls.
Each thread item shows a preview of the root comment, reply count, and participant avatars. Supports sorting by date, activity, or unresolved-first.
Attributes
id(:string) (required)threads(:list) - Defaults to[].current_user_id(:string) - Defaults tonil.sort_by(:atom) - Defaults to:activity. Must be one of:date,:activity, or:unresolved_first.show_resolved(:boolean) - Defaults totrue.class(:string) - Defaults tonil.
Renders a collapsed view of a resolved thread.
Shows a summary with the root comment preview and a reopen button.
Attributes
id(:string) (required)thread(:map) (required)on_reopen(:string) - Defaults to"collab:thread:reopen".class(:string) - Defaults tonil.