This sheet starts a new conversation on a document. The person writes a comment, taps Post, and lands in the thread they just created. The screen component is DiscussComposeScreen (discuss.contract L242-L280).
At a glance
Tab | Read |
Route |
|
Presentation | sheet ( |
Title | inline, "New comment" |
How you get here | the "Add a comment" pill of the DiscussSection under a document |
Where it leads | the new Thread after posting; the Create identity sheet when there is no identity |
Anatomy
Navigation bar. Leading "Cancel" (the sheet's back control). Title "New comment". Trailing "Post", present only when the person has an identity.
With an identity, in a column padded 20 points and capped at 40rem:
"Commenting as Name" in footnote grey. The name is the current identity's profile name, or its key name, or its short id as a last resort.
An error line in -exact-system-red, only after a failed post.
A textarea with no border, in -exact-body, filling the rest of the sheet (at least 160 points tall). Placeholder "Write a comment…"; accessible name "Comment".
Without an identity, centred 40 points from the top: symbol:person in grey, "Create an identity to reply." in -exact-headline, "Comments are signed with an identity kept on this device." in callout grey, and a filled button "Create an identity".
This sheet does not use DiscussComposer. That component is the one-line field pinned under a thread; a first comment gets a whole page to write on.
States
State | What shows |
|---|---|
Empty draft | "Post" disabled |
Text entered | "Post" enabled |
Posting | The button reads "Posting…" and is disabled |
Post failed | The red line with the reason, for example "The server refused the comment (409): …" or "This identity’s key is not on this device." The text is kept |
No identity | The centred prompt; no text area, no Post |
Cancel does not discard the draft. The text is still there the next time the sheet opens. The draft is one value for the whole app, so it also appears when the sheet is opened from a different document (inferred from the single discussComposeDraft state).
Actions
Gesture | Result |
|---|---|
Type | Updates the draft |
Tap "Post" | Signs and publishes the comment. On success the draft is cleared, the sheet closes, the new Thread is pushed and a success haptic plays |
Tap "Cancel", or drag the sheet down | Dismisses the sheet and keeps the draft |
Tap "Create an identity" | Leaves for the Create identity sheet in the Me tab, with a fresh recovery phrase already generated |
Components used
Component | Kind | Role on this screen |
|---|---|---|
primitive | The sheet's bar: Cancel, title, Post | |
primitive | Cancel, Post, and the filled "Create an identity" | |
primitive | The comment body | |
primitive | Title, "Commenting as", error and prompt lines | |
primitive | The person symbol of the prompt | |
primitive | The centred writing column |
It uses no named component, no platform part and no inline part. The identity prompt is written inline and is not the EmptyState platform part.
Why it is designed this way
A sheet with Cancel and Post. This is the platform's form for "write one thing, then return": Mail and Messages compose the same way, and Exact's edit-sheet recipe puts Cancel leading and the confirming action trailing. See Stacks, pushes and sheets and Composers.
A borderless page. Exact's guidance is that "a document's own text (a note's title and body, as Notes draws them) says border="none"". A comment is the person's own writing, so the field is the page, not a box on it.
It says who is speaking. A person may hold several identities, and a comment is signed by one of them. "Commenting as Name" makes that visible before posting, by name and not by key: Names, not identifiers.
The missing identity is explained, not hidden. The "Add a comment" pill is always shown. A person without an identity learns here what is needed and why ("Comments are signed with an identity kept on this device.") and gets one button that starts it. See Honest state and Voice and wording.
Posting lands in the thread. The result of the action is shown as the thing itself, with the pinned composer ready for a follow-up, plus a haptic. See Refresh, haptics and progress.
One filled button. The only filled button on either variant is the single next step. See Buttons and actions.
Difference from DESIGN.md: the route is /compose/:ref, not /compose/:uid/*path. The prompt's wording says "reply" although this sheet writes a new comment; the string is shared with the thread composer.
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-READ-06 Keep reading another site in place: A comment is posted to the context site; "Commenting as" comes from the configured server
US-DISC-03 Comment on a document: The sheet where the comment is written
US-DISC-05 Be guided to create an identity before commenting: The no-identity variant of the compose sheet
US-APP-09 Know the app only reaches what it must: Comments are signed with an identity kept on this device.
Related
Parent: Read tab screens. Neighbours: Thread, All comments, Document and site home.
Structure: Moving between tabs and into the app for the jump to the Me tab.
Visual language: Color and tokens, Light and dark.
How it is built: Discuss: screens and components, Discuss: posting a comment, Discuss: root contract wiring.
Source: discuss.contract L242-L280, actions at app.contract L340-L364.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime