Directory row
One document in the Directory sheet's tree: an indent per level, the title, and a brand checkmark on the document being read.

A directory row is one line of a space's document tree. It shows a title at its depth in the tree and marks where the reader currently is. This is an inline part. It is not a named component in code: it is written directly inside DirectoryScreen, at read.contract L392-L398.

Used by

Screen

Where

Directory sheet (DirectoryScreen)

Every row of the sheet's single list section

Inputs

Each row reads one directory item (its title, depth and link) and compares the item's id with the document currently being read. It also looks at the search text, which changes its layout.

Anatomy

A button placed in a section of an inset-grouped list, so the platform draws it as a grouped list row: the row height, the side insets, the separator and the pressed highlight are UIKit's. Inside, a horizontal layout with an 8 point gap, text aligned to the start:

    Indent, only when the item is below the top level and no search is active: an empty spacer depth × 16 points wide. It does not shrink, and it is hidden from VoiceOver.

    Title: the document's name as text in the platform's row style and -exact-label, taking the remaining width.

    Checkmark, only on the current document: symbol:checkmark in brand, with the label "Current document".

With the 8 point gap after the spacer, a first-level child's title starts 24 points to the right of the home row's title, and each further level adds 16.

"Hypermedia" at the top level with the checkmark; its children one step in; "Any Blob" and "Annotation" one step further.

Variants and states

Case

Result

Top level

No spacer

Nested

Spacer of 16 points per level

Searching

No spacer at any depth: results are a flat list

Current document

Trailing brand checkmark

Long title

Wraps within the row (inferred: no line clamp is set)

There is no chevron, no summary, no date and no icon. There is no disclosure control either: the tree is always fully expanded.

Behaviour

Tapping a row closes the sheet and opens that document in the reader, in one step, and clears the search text. The row is a button and not a link for that reason: it does two things, dismiss and navigate, where a link would only push on top of the sheet.

Rules for use

    Use it only in the directory. Other lists of documents use DocItemRow, which carries a summary, people and a date.

    Keep it to a title. The directory is for finding a place, not for previewing content.

    Use the checkmark for "you are here" only. Do not reuse it for selection of several items.

    Drop the indent whenever rows are filtered.

Why it looks this way

    It is the platform's picker row. A plain row with a trailing checkmark is how iOS shows the current choice in a list (the Settings pattern). Since tapping a row dismisses the sheet, a chevron, which promises a push, would be wrong. See Leave it unsaid and Lists.

    Indentation is the only structure. The tree is shown by position alone, 16 points a level, the same step the document body uses for nested blocks and comment replies use for nesting. One indent size across the app keeps depth readable. See Spacing, radii and sizes.

    Flat when searching. A match can appear without its parent, and an orphaned indent would suggest a parent that is not on screen (inferred from the condition on the spacer).

    Brand for the current place. The checkmark uses the same tint as the selected tab: brand means "this is where you are" as well as "this navigates". See Color and tokens and Symbols and icons.

    Titles, never ids. A row shows the document's name. See Names, not identifiers.

    One tap to anywhere. DESIGN.md: "an inset-grouped list of the space's documents as a tree (indent by depth), current doc checked. Tap = close + push." The built row matches this description exactly.

Accessibility

The spacer is hidden from assistive technology, so VoiceOver reads only the title, and "Current document" on the checked row. Depth is not announced: a VoiceOver user hears a flat list. That is a gap worth noting for Accessibility (inferred from the attributes; not tested with VoiceOver).

Why it is not a named component

It is four lines used in one loop on one screen (inferred). The Me, Agents and Activity tabs each have their own inline rows for the same reason; see Inline parts.

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

Comments