DocDiscussionSlot
The seam at the bottom of a document where the Discuss package draws its section. It has no appearance of its own.

DocDiscussionSlot is the place under a document where its discussion appears. It is a named component defined in read.contract L255-L268. It draws nothing itself: it hands the document's identity to DiscussSection and that component draws everything a person sees.

Used by

Parent

Where

Document and site home (DocScreen)

The last item of the page, after the blocks and the "In this space" panel

It uses DiscussSection and nothing else.

Props

Prop

Type

Effect

uid

string

The space the document belongs to

path

string

The document's path in that space; empty for a home document

eid, active

string, flag

For navigation and tests; no visual effect

It also receives, by injection from the app's root, the loaded discussions and the minute clock used for relative times. The document screen does not pass them through; they arrive directly. This is why the slot exists as a component: it is the one point where Read asks for data that belongs to Discuss.

Anatomy

A single column with no padding, colour or border, containing the DiscussSection.

The spacing around it comes from the document screen, which wraps the slot in a column padded 24 points above, 20 at the sides and 40 below, capped at 40rem and centred like the rest of the reading column. So the "Discussion" heading starts 24 points under the last block or the child panel, on the same left edge as the text.

Everything from "Discussion" down is drawn through the slot: the heading, here an error line, and the "Add a comment" pill. This build is older and shows the inline title.

Variants and states

The slot has none of its own. What appears in it depends on DiscussSection:

Situation

What the person sees in the slot

The document has not loaded

The slot is not on screen; the document shows its spinner or failure line instead

Comments loading

"Discussion" and a spinner

No comments

"No comments yet. Start the conversation." and the pill

Comments

Up to three threads, "See all N threads" when there are more, and the pill

Comments failed

A grey error sentence and the pill

Rules for use

    Exactly one per document screen, last.

    Do not style it. Change DiscussSection to change how the discussion looks, and the document screen to change the space around it.

    Do not use it outside a document. The other Discuss surfaces (Thread, All comments, Compose) are full screens of their own.

Why it exists

    Discussion belongs under the document. DESIGN.md lays the page out as content, then "In this space", then "Discussion": the first 3 threads (bubble rows) + "See all N" link + "Add a comment" button". Reading comes first and the conversation follows it, in the same column, with no tab or toggle between them. See Reading first.

    Two teams, one page. The source comment reads "Filled by pkg discuss: the discussion under a document." Read owns the document, Discuss owns comments, and the slot is the agreed boundary between them. For design this has a visible consequence: the discussion keeps one look wherever a document is shown, because there is exactly one component that draws it.

    It is always there. The slot renders for every loaded document, commented or not, so the invitation to comment is never missing. See Honest state.

DESIGN.md does not name this component. Its components table has no entry for the discussion section either.

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