This page lists the pkg:read decl and pkg:discuss decl blocks of the root contract. They sit together because discuss is drawn inside read's document screen and reads read's derives.
Read (lines 79-106)
Name | Kind | Meaning |
|---|---|---|
| state | Text typed in the open-site sheet |
| state | Error shown under that field |
| state | Bumped on every edit and every new sheet visit |
| state | The revision that the pending submission was made at |
| derive | True when the sheet is on top and the two revisions match, so a late reply for an edited draft is ignored |
| mutation, | Validates the typed URL through |
| state | Pull to refresh counter. A new value makes sources drop their caches |
| state |
|
| task, |
|
| state | Search text of the directory sheet |
| derive | All entries of the read tab's stack |
| derive | The ref of each |
| derive | The ref of the reader context: the last |
| derive | The server of the loaded page whose ref is |
| derive | The top read entry only, so covered detail routes make no requests |
| derive | The uid of a visible |
| derive | The uid of a visible |
| derive |
|
| resource | One page per stacked document. See Loading pages |
| resource | The space's document tree |
| resource | Author profile pages |
All three resources use else empty(), so screens read a typed zero value while loading.
Discuss (lines 107-120)
Name | Kind | Meaning |
|---|---|---|
| state | Pull to refresh counter for comments, added to |
| state | Reply text in a thread |
| state | Text in the compose sheet |
| state | Comment id the reply targets, |
| derive | Refs of loaded documents on the context server, plus the ref of a visible |
| derive |
|
| derive |
|
| derive | Profile name, else key name, else short id of the current account |
| resource | Comment listings per document. See Discuss: loading and posting |
| resource | Thread pages |
| mutation, | Signs and publishes a comment |
| derive |
|
Actions that write these
Read's actions are at lines 281-327 (readShowOpenSite, readEditSite, readSubmitSite, readSiteAfterOpen, readClockStep, readRetry, readRefresh, readDirRetry, readAuthorRetry, readOpenDir, readDirSearch, readDirClose, readDirOpen). Discuss's are at lines 328-365 (discussRefresh, discussRetry, discussEdit, discussEditCompose, discussSetReply, discussPost, discussAfterPost, discussCancelCompose, discussOpenCreate).
User stories
The code described here exists to deliver these stories. Each story lists this page in its Trace (traceability).
US-READ-01 Open the app to my site's home: docs, readRefs and readEpoch declarations
US-READ-02 Read a document: docs and the readTick minute clock behind relative dates
US-READ-04 Open a Seed site by URL: readSiteDraft, readSiteError, the revisions and readSiteOpened
US-READ-06 Keep reading another site in place: The context derives, one line each
US-READ-07 Browse and search a space's documents: dirQuery, dirUid, readCurrent, directory
US-READ-08 See the documents under and inside a document: docs; readNow and readUtc provided to rows and cards
US-READ-09 See who wrote a document and visit their profile: authorUids and authors
US-READ-10 Refresh a page and recover from a failed load: readEpoch and the resources it feeds
US-DISC-01 See the discussion on a document: The discuss declarations in the root contract
US-DISC-02 Read a thread: readTick and the discuss declarations
US-DISC-03 Comment on a document: The discussPosted mutation and what it refreshes
US-DISC-04 Reply in a thread: discussPosted refreshes discussions and discussThreads
US-DISC-05 Be guided to create an identity before commenting: discussSignedIn derives from currentAccount and meIds
US-ACT-02 Open what a notification is about: readContextRef treats an Activity thread as a configured-server context
US-APP-02 Move around the app without losing my place: Derives that read the Read stack and decide the reader context
US-APP-05 Always know what is happening: readEpoch, discussEpoch and the post reply
US-APP-06 See people and spaces by name: discussAccountName for Commenting as
US-TEAM-04 Understand how the app is built: Root declarations for Read and Discuss, one line each
Related
State, refresh and stale-reply patterns: epochs, the minute clock and the revision check used here
Navigation and routes: the stack these derives read
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime