DiscussSection is the glance at a document's discussion that sits at the end of the page. It is a named component defined in discuss.contract L82-L120. It shows enough to tell whether people are talking, and gives one way in to read more and one to join.
Used by
Parent | Where |
|---|---|
Its only content | |
Document and site home ( | The last part of every loaded document |
It uses DiscussThreadRow, which uses DiscussBubble.
Props
Prop | Type | Effect |
|---|---|---|
| strings | Which document's discussion to show |
| list | The loaded discussions; the section picks the one for this document |
| numbers | The minute clock and time zone, for relative times |
| flag | For tests only |
Anatomy
A column with 8 point gaps, top to bottom:
Heading row. "Discussion" in -exact-title3, weight 700, taking the width; at the right, on the same baseline, "49 comments" or "1 comment" in -exact-footnote grey, only when there are comments.
Threads. Up to three DiscussThreadRow, newest activity first, divided by 1 point -exact-separator lines (none above the first).
See all. When there are more than three threads: "See all 36 threads" in -exact-callout, brand, a link to All comments.
Add a comment. A pill link: brand fill, radius 999, padded 12 by 18 points, at least 44 points tall, label in -exact-headline white (ink.on-brand). It hugs its label at the left edge, 4 points below the rest. It opens the Compose sheet.
The heading counts comments (every root and reply); the link counts threads. A document can read "49 comments" and "See all 36 threads" at once.
Variants and states
State | What shows under the heading |
|---|---|
Document not known yet | Nothing: heading only, no pill |
Loading | A spinner ( |
Failure | The error sentence in |
Empty | "No comments yet. Start the conversation." in |
One to three threads | The rows, then the pill |
More than three | Three rows, "See all N threads", then the pill |
The pill looks the same whether or not the person has an identity. Without one, the sheet it opens explains what is needed.
Rules for use
One per document, through DocDiscussionSlot. Do not place it elsewhere.
Keep the limit of three. The section is a glance; the full list has its own screen.
The pill is the section's single filled action. Do not add a second filled control beside it.
The pill is a link styled as a button because it navigates to a sheet. A control that acts in place would be a button.
Why it looks this way
A glance, after the reading. DESIGN.md states the job as "glance at the discussion" and specifies the block almost word for word: "the first 3 threads (bubble rows) + "See all N" link + "Add a comment" button". The discussion never interrupts the document and never takes it over. See Reading first.
A heading like the document's own. "Discussion" uses -exact-title3 bold, the style of a nested heading in the body, so it reads as the document's last section and not as app chrome. See Typography.
The empty state names the next step. "No comments yet. Start the conversation." is followed directly by the control that does it, which is what DESIGN.md's principle 4 asks of an empty state. It is a plain sentence, not the EmptyState platform part, because DESIGN.md keeps that for "a whole-screen empty state (nothing else on screen)". See Honest state and Loading, failure and empty states.
One filled pill. It is the only filled brand shape on the document screen apart from a document's own button blocks, so the way to take part is easy to find at the end of a long page. The 44 point minimum height is the platform's touch target. See Buttons and actions and Accessibility.
Painted, not a platform list. The section sits in the reading column and holds bubbles, so it is content. See Leave it unsaid.
Where it falls short: the failure line has no Retry of its own, unlike the document's StatusLine.
DESIGN.md's components table does not list this component.
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-01 See the discussion on a document: Heading, count, first three threads, "See all" and "Add a comment"
US-DISC-03 Comment on a document: The "Add a comment" pill
US-DISC-05 Be guided to create an identity before commenting: The always-present "Add a comment" pill
Related
Parent page: Discuss components. The matching entry points at the top of the page: the bar's messages button and the "N comments" line in Document header and byline.
Visual language: Color and tokens, Spacing, radii and sizes, Voice and wording.
How it is built: Discuss: screens and components, Discuss: loading and posting, Discuss: root contract wiring.
Source: discuss.contract L82-L120; test "discuss: a document with comments shows the summary" in discuss.test.contract.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime