Compose comment sheet
DiscussComposeScreen: a sheet for writing a new top-level comment on a document, or a prompt to create an identity first.

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

compose, /compose/:ref

Presentation

sheet (navigationPresentation="modal")

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

Signed in: Cancel, the title, a disabled Post, the "Commenting as" line and the empty text area.
No identity: the same sheet explains why and offers one filled button. There is no Post button.
In dark mode the filled button uses the lighter teal of the brand token.

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

header

primitive

The sheet's bar: Cancel, title, Post

button

primitive

Cancel, Post, and the filled "Create an identity"

textarea

primitive

The comment body

text

primitive

Title, "Commenting as", error and prompt lines

image

primitive

The person symbol of the prompt

column

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).

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime

Connections0
Linked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkCompose comment sheetCompose comment sheet
Citations 0Children & links 30

Loading child documents…

Connections show where other documents or comments link to this document.

Related documents

Loading connections…