Directory sheet
DirectoryScreen: the space's document tree as a searchable sheet, with the current document checked.

The directory answers "what else is in this space?". It lists every document of the space as an indented tree, lets the person filter it by title, and opens the one they tap. The screen component is DirectoryScreen (read.contract L356-L398). It replaces the sidebar of the React Native app.

At a glance

Tab

Read

Route

directory, /dir/:uid

Presentation

sheet (navigationPresentation="modal")

Title

inline: the space's name, or "Directory" until it is known

How you get here

the list button in the bar of a document

Where it leads

the chosen document

The directory of the Hypermedia space: Close, the space name, the search field, and the tree with the current document checked.
The same sheet in dark mode. The checkmark is the only brand colour.

Anatomy

    Navigation bar. Leading: a Close button (symbol:close, label "Close"), which is the sheet's back control. Title: the space's name when the loaded tree belongs to this space, otherwise "Directory".

    Search field. A row under the bar, padded 8 by 16 points, holding a search input with the placeholder "Search documents". It stays fixed while the list scrolls.

    The tree. An inset-grouped list with one section. Each row is a Directory row: a spacer 16 points wide per level of depth, the document's title, and a brand checkmark (symbol:checkmark, label "Current document") on the document being read.

The first row is the space's home, at depth 0; its children follow in tree order.

States

State

What shows

Loading

One section holding a spinner (progress, label "Loading"). It also shows while the tree in memory belongs to another space, so a previous space's rows never appear under a new title

Failure

A section with StatusLine: the error (for example "Couldn't load the directory.") and Retry

No match

"Nothing matches “glossary”." in secondary colour, with the typed text in curly quotes

Searching

Matching rows as a flat list, with no indentation

One rough edge, inferred from the code: a space whose directory loads with no documents and no search text shows "Nothing matches “”." There is no separate wording for an empty space.

Actions

Gesture

Result

Type in the search field

Filters rows by title as you type, ignoring case. Filtering happens on the device, so there is no wait

Tap a row

The sheet closes and the document opens in the reader, in one step. The search text is cleared

Tap Close, or drag the sheet down

Dismisses the sheet. The search text is cleared

Tap Retry

Asks for the tree again

The test "the directory opens, search filters, and a row opens its document" walks this path: open, type "Glossary", one row left, tap it, the sheet is gone and the title is "Glossary".

Components used

Component

Kind

Role on this screen

StatusLine

shared

The failure line with Retry

Directory row

inline part

One document of the tree

header

primitive

The sheet's bar

list and section

primitive

listStyle="inset-grouped": the tree

input

primitive

type="search": the filter field

button

primitive

Close, and every row

text

primitive

Title, row titles, the no-match line

image

primitive

The close and checkmark symbols

row and column

primitive

The search row and the indent spacer

progress

primitive

The loading spinner

Why it is designed this way

    One tap to anywhere. DESIGN.md's principle 3: "The space's directory is always one tap away (the nav bar's sidebar button opens a sheet)". The React Native app had a sidebar; on a phone a sheet over the document is the platform's form for the same thing. See What changed from the React Native app and why.

    A sheet, because it is a detour. The person picks a destination and returns to reading. Tapping a row closes the sheet and pushes in one motion, so the directory never stays on the stack. See Stacks, pushes and sheets.

    A native grouped list. Rows, separators, the rounded group and the search field are UIKit's: Leave it unsaid. Only the indent and the checkmark are authored.

    Titles only. A row shows a name and nothing else, so a tree of a hundred documents stays scannable. No identifiers appear: Names, not identifiers.

    Flat while searching. Indentation is dropped during a search because a match's parents may be filtered out, and an indent with no parent above it would mislead (inferred from the q == "" condition on the spacer).

    The check says "you are here". It uses the brand tint, the same role a selected tab has. See Color and tokens.

Difference from DESIGN.md: it says "Search field in the header". The built field is a row under the bar. Exact's guidance is that "a control fixed under the bar goes with an inline title", which is what this sheet does.

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

Attributes
name
Directory sheet
summary
DirectoryScreen: the space's document tree as a searchable sheet, with the current document checked.