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 |
|
Presentation | sheet ( |
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 |
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 ( |
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 |
|---|---|---|
shared | The failure line with Retry | |
inline part | One document of the tree | |
primitive | The sheet's bar | |
primitive |
| |
primitive |
| |
primitive | Close, and every row | |
primitive | Title, row titles, the no-match line | |
primitive | The close and checkmark symbols | |
primitive | The search row and the indent spacer | |
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).
US-READ-06 Keep reading another site in place: Lists the space on the context site
US-READ-07 Browse and search a space's documents: The Directory sheet: bar, search field, tree, states and actions
US-READ-10 Refresh a page and recover from a failed load: The sheet's own loading and failure states
US-APP-06 See people and spaces by name: Titled with the space's name
Related
Parent: Read tab screens. Neighbours: Document and site home, Open site sheet.
Patterns: Lists, Loading, failure and empty states, Symbols and icons, Navigation bars and their actions.
How it is built: Read: screens and components, Read: rows, directory and author pages, Read: root contract wiring.
Source: read.contract L356-L398, actions at app.contract L316-L326.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime