CommentCount
A small messages symbol followed by a number, shown on document rows and cards when the document has comments, and nothing when it has none.

CommentCount tells a person that a listed document has discussion, and how much. It is a named component defined in read.contract L113-L122, and it is the smallest one in the toolkit: a symbol and a number.

Used by

Parent

Where

DocItemRow

The end of the row's meta line, after the authors and date

DocCard

The right end of the card's footer

Through those it can appear on the document screen (in "In this space" and in query blocks) and on the Author profile (in Documents).

Props

Prop

Type

Effect

count

number

The number shown. Zero or less draws nothing at all

testId

string

For tests only

Anatomy

    A row with a 3 point gap, vertically centred.

    symbol:messages as an image, 13 by 13 points, in -exact-secondary-label.

    The count as text in -exact-caption1, -exact-secondary-label.

It has no background, no border and no tap target of its own. It is part of the row or card that holds it, and tapping it opens the document like the rest of that row.

Variants and states

Case

Result

count is 0

Nothing is rendered: no symbol, no "0", no reserved space

count is 1 or more

Symbol and number

There is no loading state. The count comes with the listing: a row shows it only when the list of documents already carried the number, and the app never asks once per row. A row with no count may therefore mean "no comments" or "not known here".

No screenshot in the set shows this component: none of the captured rows or cards had a comment count. For the neighbouring layout see the card footers on DocCard.

Accessibility

The symbol itself is silent (an empty label). The row is labelled in words: "1 comment" or "12 comments". VoiceOver says the meaning, not "messages 12". See Accessibility.

Rules for use

    Use it inside a row or card that represents a document, in the meta line, last.

    Do not use it as a button. The tappable discussion affordances are different pieces: the bar's messages button and the brand "N comments" line of the Document header and byline, and the "N replies" line of a DiscussThreadRow.

    Do not show a zero. Absence is the zero state.

    Keep it grey. Brand colour is for things that navigate on their own; this is information about a row. See Color and tokens.

Why it looks this way

The source describes it as ""💬 n" as the Messages symbol and the count; nothing when there are none". Three choices follow from the app's principles:

    A system symbol, not an emoji or a drawing. The app uses the platform's symbols throughout, and the same symbol:messages marks discussion in the navigation bar, so the meaning is learned once. See Symbols and icons.

    Quiet. A list of documents is for choosing what to read. The count is the least important fact on the row, so it has the smallest type style the Read tab uses and the secondary colour. See Reading first.

    Nothing instead of zero. Most documents have no comments. Printing "0" on every row would add noise and make the rows with discussion harder to spot (inferred from the count > 0 guard). This matches the rule seen across the Read components: empty parts disappear.

DESIGN.md does not mention this component. Its DocRow had only title, summary and date; the count arrived with the cards work.

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