A composer is where a person writes into a conversation. The mobile app has three: a reply bar pinned under a thread, a full sheet for a new top-level comment, and a message bar under an agent session. Two are bars of the same shape; one is a sheet. This page compares them so a fourth can match.
The three composers
Composer | Screen | Form |
|---|---|---|
Thread reply | A bar pinned under the list, the named component DiscussComposer | |
Compose sheet | A modal sheet whose text area fills it, with "Post" in the bar | |
Agents message | A bar pinned under the transcript, the inline Agents composer |
Field, placeholder, send control, error placement, the no-identity treatment and what happens after sending are compared on The three composers compared.
The bar shape
Both bars are the same construction, written twice:
A row with align-items="flex-end", border-radius=20, a 1-point -exact-separator outline and padding 0 4px 0 12px.
Inside it, the text area with no border and a transparent background, padding="12px 0", taking the remaining width.
The Send button at the trailing end with margin="4px 0", so it sits on the last line as the field grows.
The field starts at one line and grows with its content up to 140 points, then scrolls. The thread bar adds a 1-point top separator across the screen; the agents bar sits on -exact-background with a 6px 12px margin.
Differences between the two bars, as built: the agents bar turns its outline brand and adds a 1-point brand ring while focused (composerFocused), and the thread bar does not. The thread bar is a named component and the agents bar is inline. Inferred: they were built by different packages (discuss and agents) and not yet unified.
Focus and the keyboard
Both pinned bars are on screens with interactive-widget="resizes-content", so the keyboard shrinks the content and the bar rides above it.
Both Send buttons have retainFocus=true: tapping Send does not dismiss the keyboard, so a person can send several messages in a row.
Tapping "Reply" on a comment sets the reply target and moves focus to the reply field (focus("reply-composer")). Sending an agent message returns focus to the message field.
Return inserts a new line in all three. Sending is always the button. This is inferred from the absence of a submit= handler on the three text areas.
In an agent session driven by a parent conversation, the bar is replaced by a row: "Driven by a parent conversation. Open it to intervene."
Do and do not
Do disable Send for a blank draft instead of reporting an error.
Do say who is writing or who is being answered ("Commenting as", "Replying to").
Do replace the field with a path forward when there is no identity. Do not show a field that cannot send.
Do not put a composer on the Document screen. "Add a comment" opens the sheet.
Why
DESIGN.md asks for the thread composer "pinned at bottom (textarea + Send), disabled with a 'Create an identity to reply' link when no identity", and for the session composer to follow Exact's chat-thread recipe. The built thread bar shows a sentence and a bordered "Create" button, not a link. The compose sheet exists because the document screen keeps "no chrome in the content; actions go in the nav bar". Signing is why identity matters here: "Comments are signed with an identity kept on this device." See Names, not identifiers for how the author is shown.
User stories
This page helps deliver these stories. Each story lists this page in its Trace, so the link holds in both directions (traceability).
US-DISC-03 Comment on a document: Why a first comment gets a sheet and a reply gets a pinned field
US-DISC-04 Reply in a thread: One pinned composer, two targets; keyboard handling
US-DISC-05 Be guided to create an identity before commenting: The composer when there is no identity
US-AGENT-05 Chat with an agent: The shared composer pattern
US-APP-07 Read clear, consistent wording: The three places a person writes
Related
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime