Components · Messages
ThreadPanel
The side panel for one thread — a header that names it, the original message, the replies and a composer, with no tabs.
Also called Thread
import { ThreadPanel } from "@botiverse/raft-ui";ThreadPanel shows the replies to one message beside the conversation it belongs to. It is not a narrower conversation panel: its header names the thread and where it is, the original message comes first, and it has no tabs.
When to use
Anatomy
ThreadPanelRoot: the panel. It is aPanelwithedge="attached", so it draws its own left seam.ThreadPanelHeader: the header (44px with a mouse, 56px on a touch screen), built onPanelHeaderRoot.ThreadPanelTitle: the title, "Thread", followed byThreadPanelTitleMetafor where the thread is.ThreadPanelActions:PanelActionbuttons. The last ones are Expand and the × (Panel, Navigation); folded over the conversation, the header starts with Back and has no ×.
ThreadPanelContent: everything under the header.ThreadPanelSearch, withThreadPanelSearchTrailingandThreadPanelSearchCount: an optional row for searching within the thread.ThreadPanelOriginalMessage: the message the thread replies to, with a hairline under it. The hairline is a boundary: it sits a section step, 24px, under the message's last line, and the replies start a section step under it (ThreadPanelReplySummary) (Timeline rhythm).ThreadPanelBody: the scrolling replies.ThreadPanelReplySummaryandThreadPanelReplyCounthead the list of replies.ThreadPanelFooter: the composer (Composer), with no space of its own above it, as in ConversationPanel.
Behavior
- A thread and a profile can be open together: a profile opened from the thread sits beside it, and a profile opened from the conversation replaces it (Page structure).
- Its width is in Spacing. When it sits beside the conversation and when it covers it is the product's rule (Raft Chat).
- On a phone the thread is a pushed page: the same panel covers the conversation, with Back instead of the ×, and the tab bar stays hidden, as under the conversation (Responsive layout). On desktop, where the row can't hold it beside the conversation, it folds over the conversation, in the conversation's column, with Back at its header's start and no × (The channel's side columns).
Content
- Title the panel "Thread".
- Say in the header where the thread is and how many replies it has: "#launch-week · 3 replies".
Accessibility
ThreadPanelRootrenders asection. Name it witharia-label="Thread".ThreadPanelTitlerenders anh2.- Give every icon-only action an
aria-label: "Search in thread", "Close thread".
Rules
- Don't add tabs to a thread. It holds the original message, the replies and the composer, nothing else.
- Leave 20px above the original message. The hover toolbar rides on a message's top edge (MessageItem); the original message is the first item in the scroll area, so with less room the toolbar is cut off and looks pinned under the header.
- Separate the original message from the replies with a
line-hairline, not a seam: both are content of the same panel.
API
ThreadPanelActions, ThreadPanelBody, ThreadPanelContent, ThreadPanelFooter, ThreadPanelHeader
Also takes the attributes of its element.
ThreadPanelOriginalMessage
Takes the attributes of its element.
ThreadPanelReplyCount, ThreadPanelReplySummary, ThreadPanelRoot, ThreadPanelSearch, ThreadPanelSearchCount, ThreadPanelSearchTrailing, ThreadPanelTitle, ThreadPanelTitleMeta
Also takes the attributes of its element.
Related
Changes
- 0.105.1 · FixedPanel, PanelHeader, PanelFooter: inside a sheet (
DrawerContent, orDialogSheetContenton a phone) they paint the sheet'slayer-popoverinstead of their column'slayer-canvas, so the sheet is one surface from the grab handle down;PanelHeaderkeeps itsline-seam. ConversationPanelRoot, ConversationPanelFooter, ThreadPanelRoot and ThreadPanelFooter keeplayer-canvasin a sheet, so a conversation or a thread in a sheet changes only in its head (PanelHeader,ThreadPanelHeader). Beside the page they are unchanged. - 0.5.1 · FixedRemoved the duplicate inset outline from Elegant dark
ThreadPanelContenton large screens, leaving the header/content seam with a single visual owner.