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 |
|---|---|
The end of the row's meta line, after the authors and date | |
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 |
|---|---|---|
| number | The number shown. Zero or less draws nothing at all |
| string | For tests only |
Anatomy
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 |
|---|---|
| Nothing is rendered: no symbol, no "0", no reserved space |
| 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).
US-READ-08 See the documents under and inside a document: The comment count on rows and cards, absent at zero
US-DISC-01 See the discussion on a document: The comment count shown on document rows and cards
US-APP-04 Use the app with large text and assistive technology: The one fixed 13 point glyph
Related
Parent page: Read components. Sibling in the same footer: FacePile.
Patterns: Lists, Cards and panels. Type: Typography.
How it is built: Read: screens and components, Read: rows, directory and author pages for where the number comes from.
Source: read.contract L113-L122.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime