DiscussSection
The Discussion block under every document: a heading with the comment count, the first three threads, a See all link, and the Add a comment pill.

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

DocDiscussionSlot

Its only content

Document and site home (DocScreen), through the slot

The last part of every loaded document

It uses DiscussThreadRow, which uses DiscussBubble.

Props

Prop

Type

Effect

uid, path

strings

Which document's discussion to show

discussions

list

The loaded discussions; the section picks the one for this document

now, utc

numbers

The minute clock and time zone, for relative times

active

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.

The empty state: the heading, one grey sentence, and the pill.
The failure state: "Couldn't reach the server." in footnote grey, with the pill still offered. Older build, with the inline title.

Variants and states

State

What shows under the heading

Document not known yet

Nothing: heading only, no pill

Loading

A spinner (progress, label "Loading comments"), then the pill

Failure

The error sentence in -exact-footnote grey, then the pill. No Retry button; pulling down on the document reloads

Empty

"No comments yet. Start the conversation." in -exact-callout grey, then the pill

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

Related

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

Unsubscribe anytime

Attributes
name
DiscussSection
summary
The Discussion block under every document: a heading with the comment count, the first three threads, a See all link, and the Add a comment pill.