As a reader, I want to open the app and land on my site's home document, so that I can start reading at once, without setting anything up.
Situation
I have installed Seed on my iPhone. I may never have chosen a server, in which case the app reads from hyper.media, or I chose one earlier in Me. I do not need an identity to read.
What I do
Open Seed from the home screen.
Wait a moment for the home document to load.
Read, scroll, or tap anything on the page to go further.
Tap Read in the tab bar whenever I want to come back to where I was reading.
What I should see
The app opens on the Read tab, on the home document of my server. On a new install that is the home of hyper.media, titled "Hypermedia".
The document's name is shown as a large title at the top and moves into the bar when I scroll.
The home has no Back button: it is the bottom of the Read tab.
Until the page arrives the title reads "Seed", a spinner shows in the middle, and the bar offers only "Open site".
Once loaded, the bar offers "Open site", Directory, Discussion and Share.
Under the title come the summary, the authors and date, then the body, the documents "In this space" and the discussion.
A tab bar at the bottom shows Read, Activity, Agents and Me, with Read selected.
Going to another tab and tapping Read again returns me to the page I left, not to a reloaded home.
If I choose another server in Me, the Read tab's home becomes that server's home document.
I am never asked to sign in or create an identity before reading.
When something goes wrong
With no connection the page says "Couldn't reach the server." with a "Retry" button, and under it "Check your connection, then try again." Tapping "Retry" loads the home once I am back online.
A server that hosts no site says "This server has no registered site." I recover by choosing another server in Me, or by opening a site by its address.
Not included
The page does not say which server or site it comes from. The address is only visible in Me and in a shared link (Reading another site in place).
Nothing is kept for offline reading: pages are held only while the app is running (Read: loading pages, caches and embeds).
I cannot pick a different start page than my server's home (Current limits and known gaps).
Trace
Story US-READ-01, status Shipped. These links are kept in step with the traceability matrix and with the "User stories" section of every page listed here.
Design
Page | Part it plays |
|---|---|
The Read tab and its screens, of which the site home is the root | |
The screen the app opens on: the site home variant, its title fallback "Seed" and its states | |
Read is the first of the four tabs and the one the app starts on | |
The read route "/" as the root of the Read stack | |
The home bar: large title, no Back, the four trailing actions | |
Summary, byline and comment line under the title | |
Draws the body of the home document | |
The failure line with Retry when the home cannot load | |
The app shell that holds the tab panels and the tab bar | |
The navigation bar with the large title and the system tab bar | |
The spinner shown until the home arrives | |
Loading, failure with Retry and empty treatment of the home | |
The exact loading and failure strings of the document screen | |
Why the app opens on a document, not on a form or a feed | |
The predecessor opened on a server form; this app opens on the home | |
The large title and tab bar are drawn by iOS | |
The large title and the reading text styles |
Implementation
Page | Part it plays |
|---|---|
The package that owns the reader and the site home | |
DocScreen with home=true, its title fallback and testIds | |
The read route, readRefs ("" for the home) and the docs resource | |
readDocs, the source the home is asked from | |
An empty ref resolves to the server's registered site home, then the page is built | |
The GET client and the site config request | |
GET /hm/api/config (registeredAccountUid) and /api/Resource | |
The server state (default https://hyper.media, persisted) and the route switch | |
docs, readRefs and readEpoch declarations | |
The tab read at "/", pick and the four tab stacks | |
How the readDocs source is dispatched | |
Where the server that decides the home is chosen | |
read.test.contract and app.test.contract run against the live home | |
No offline reading; no choice of start page |
Code
File | What |
|---|---|
DocScreen (home=true: title fallback "Seed", bar, states, body) | |
routes: tab read "/" and the doc route | |
state server = "https://hyper.media" persist | |
readStack, readRefs and resource docs = readDocs(server, readRefs, readEpoch) | |
The read entry renders DocScreen with ref="" and home=true | |
The tab bar: Read, Activity, Agents, Me | |
readDocs source | |
siteHomeUid: the server's registered account, "This server has no registered site." | |
buildPage: an empty ref becomes the site home | |
siteConfig: GET /hm/api/config |
Tests
File | What it checks |
|---|---|
the site home loads with its title and blocks | |
the four tabs are there and each opens | |
refresh prevents late site config and directory responses from repopulating caches (the home account lookup) |
Delivery
Delivered by #1470.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime