Document and site home
DocScreen: the reading screen used for the site home and for every pushed document, with its bar actions, reading column, child list and discussion.

This is the screen a person reads on. It shows one document as a calm column of text, then the documents beneath it, then its discussion. The Read tab opens on it (the site home) and every link pushes another copy of it. The screen component is DocScreen (read.contract L270-L354).

At a glance


Site home

Pushed document

Tab

Read

Read

Route

read, /

doc, /d/:ref

Presentation

tab root, no Back

pushed, with Back

Title

large

large

home prop

true, ref=""

false, ref from the route

Title while nothing is loaded

"Seed"

"Document"

How you get here

launching the app, the Read tab

any document link, row, card or embed; the Directory sheet; the Open site sheet; the document line of a Thread; an Author profile; a deep link

Where it leads

another document, Author profile, Thread, All comments, Compose, the two sheets, the system share sheet

same

Those are all the differences. The route switch renders the same component with the same actions for both (app.contract L750-L753).

The site home: bar actions, large title, summary, byline, the "49 comments" line, then the reading column. The screenshot predates the "Open site" bar button.
A pushed document: Back, the same large title, and the whole page down to Discussion.
Dark mode changes only platform colours and the brand tint.

Anatomy

    Navigation bar. The title is the document's name as a level 1 heading, which iOS draws as a large title under the bar and collapses into the bar on scroll. Trailing, in order: a text button "Open site"; the directory button (symbol:list, label "Directory") when the space has a directory; the discussion button (symbol:messages, label "Discussion" or "Discussion, 49 comments") when the document has loaded; share (symbol:share, label "Share") when there is a share URL. See Navigation bars and their actions.

    Header and byline. Summary, author avatars and names, date, and a brand "N comments" line. This is the inline part Document header and byline.

    Blocks. One DocBlockView per block, each padded 6 points above and below and 20 at the sides, in a column capped at 40rem and centred.

    "In this space". An uppercase footnote label over a rounded panel (-exact-secondary-background, radius 12) of DocItemRow rows separated by hairlines: the child documents the body does not already link.

    Discussion. DocDiscussionSlot, which draws DiscussSection: the heading, up to three threads, "See all N threads" and the "Add a comment" pill. 40 points of space follow it.

States

State

What shows

Loading, nothing cached

A centred spinner (progress, label "Loading"). The bar shows only "Open site".

Failure

StatusLine with the error (for example "Couldn't load this document.") and Retry, then "Check your connection, then try again." in footnote grey. The title falls back to "Document" or "Seed".

Loaded, no blocks

"This page is empty." in secondary colour, then the child list and Discussion as usual.

Refreshing

The pull-to-refresh spinner, only while a loaded page reloads. The content stays.

A failed load never substitutes another document: the tests assert that an unreachable typed site shows the error and Retry, "and never substitutes the default home". See Loading, failure and empty states.

Actions

Gesture

Result

Tap a link in the text, a row, a card, an embed, a button block

Pushes that document

Tap an author avatar (44 point target)

Pushes the Author profile

Tap "Open site"

Opens the Open site sheet with an empty field

Tap the list symbol

Opens the Directory sheet for this space

Tap the messages symbol, or "N comments"

Pushes All comments

Tap a thread row

Pushes the Thread

Tap "Add a comment"

Opens the Compose sheet

Tap share

The system share sheet with the title and the public URL

Pull down

Reloads the document, its lists and its discussion

Long press text

Selects it (paragraphs and code are selectable)

Swipe from the edge, or Back

Returns to the covered document

Components used

Component

Kind

Role on this screen

DocBlockView

named

Every block of the body

DocItemRow

named

Rows of "In this space"

DocDiscussionSlot

named

The discussion under the document

DiscussSection

named, through the slot

Heading, threads, "Add a comment"

DiscussThreadRow

named, through DiscussSection

Each of the first threads under "Discussion"

DiscussBubble

named, through DiscussThreadRow

The root comment of each thread

DocCard

named, through DocBlockView

Embed cards and query cards in the body

FacePile

named, through DocCard and DocItemRow

Overlapping author faces on cards and rows

CommentCount

named, through DocCard and DocItemRow

The comment count on cards and rows

Avatar

shared

28 point author faces in the byline

StatusLine

shared

The failure line with Retry

Document header and byline

inline part

Summary, authors, date, comment line

header

primitive

The navigation bar

list

primitive

appearance="none": the scrolling, refreshable body

text

primitive

Title, summary, labels, empty line

button

primitive

The four bar actions

link

primitive

Author targets and the comment line

image

primitive

The bar and comment symbols

row and column

primitive

The centred reading column and its panels

progress

primitive

The loading spinner

Why it is designed this way

    One screen for home and document. DESIGN.md's principle 2 is "Reading first": "a calm column with excellent type" and "no chrome in the content; actions go in the nav bar". A home that looked different would be a second thing to learn. See Reading first.

    Large title everywhere. DESIGN.md asked for a large title on the home and an inline one on pushed documents. The built screen uses level 1 for both; the contract's note says the large title "wraps instead of truncating at the inline title's width". An older screenshot shows the problem it fixed: "Empty Page In..." cut off in the bar.

    The count is also in the page. The contract notes that iOS draws the bar's discussion button "as its symbol alone", so the count repeats as a tappable brand line under the byline.

    Directory in the bar. Principle 3 is "One tap to anywhere in the space".

    Failure with Retry. Principle 4, Honest state.

    The 40rem column keeps the measure readable on wide devices (inferred from the cap and centring; on a phone it is simply 20 point margins).

Differences from DESIGN.md: the route is /d/:ref, not /d/:uid/*path; "Open site" is new; the child list is a painted panel inside the reading column, not an inset-grouped list.

User stories

This page helps deliver these stories. Each story lists this page in its Trace, so the link holds in both directions (traceability).

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

Unsubscribe anytime

Comments