DocBlockView: embed and query blocks
How DocBlockView presents an embedded document (a brand-edged card) and a query block (a card grid with an optional banner, or plain rows), including columns and empty states.

Two kinds of block point at other documents: an embed shows one document, a query shows a live list of them. Both are drawn by DocBlockView; this page covers those two kinds in detail. It is an extra page split out of the DocBlockView page. Source: read.contract L208-L244.

Used by

These are branches of DocBlockView, so they appear wherever it does: the body of the document screen. They in turn use FacePile, DocCard and DocItemRow.

Embed card

An embed is another document quoted inside this one. It is drawn as a single link:

    Surface: -exact-secondary-background, radius 12, 14 points of padding, 6 points between parts.

    Edge: a 3 point solid left border in brand. This is the mark that says "this is a reference, not part of the text".

    Cover, when the embedded document has one: full width, 140 points tall, radius 8, cropped to fill.

    Title line: a brand symbol (symbol:document by default) and the title in -exact-headline.

    Summary in -exact-subheadline grey, at most three lines. It is the embedded document's summary, or the start of its text.

    Authors: a FacePile and then the names in -exact-footnote grey on one line.

Tapping anywhere pushes the embedded document. Until the embedded document has loaded, the card shows only the symbol and a provisional title taken from the link: the last part of its path, or for a home document the first eight characters of its account key and an ellipsis. That is one of the few places a key can surface, briefly; see Names, not identifiers.

The embed "Building Peace" with its teal edge, document symbol and summary. Below it, the "Posts" query drawn as rows. This older build shows no authors on the embed.

Query block

A query lists documents chosen by a rule, most often "the children of this document". The block carries a style, and the style picks one of two presentations.

Card style

Used when the style is "Card", which is also the default when the block names no style.

    The block is a column with 12 point gaps and 4 points of space above and below.

    Banner. When the block has its banner flag set, the first result is a full-width DocCard in its banner variant (200 point cover, -exact-title3 title).

    Grid. The remaining results are regular cards in a wrapping row with 12 point gaps, stretched to equal height per line.

Column count set on the block

Card width

1

Every card takes the full line

2 or 3 (3 when unset)

Each card has a 200 point basis and grows to share the line, so as many 200 point cards as fit sit side by side

On a phone the reading column is about 362 points wide, which fits one 200 point card and not two, so cards stack one per line. In a wider column more fit; the source describes it as "one on a phone, two in the reading column". The source also says the grid is "capped at the block's columnCount", but the built rule only tells a count of 1 from the rest: 2 and 3 behave alike (verified in the contract, not on a wide device). Two invisible zero-height spacers at the end of the grid keep an odd last card at one column's width, not stretched across the line.

The same "Posts" query in Card style on a phone: one card per line, covers at 120 points.
In dark mode the cards lift off a black page on the platform's secondary background.

List style

Any other style draws rows: one DocItemRow per result, directly on the page with no panel, separated by 1 point lines in -exact-separator (none above the first).

Empty and failed

When a query has no results it shows one line in -exact-footnote, -exact-tertiary-label: "No documents yet.", or the loader's message such as "Couldn't load this list." There is no Retry inside the block; pulling down on the document reloads it.

Rules for use

    The presentation follows the document, not the app. Do not force rows where the author chose cards, or the reverse.

    Do not put an embed card inside a panel of the same fill.

    The brand edge is reserved for embeds. Query cards and media rows have no edge, which is how a reader tells a quoted document from a listed one.

Why it looks this way

    Faithful to the author's page. Style, banner and column count are choices the writer made in the Seed editor. The source ties the grid to the React Native app's "QueryBlockView's Card style". Keeping them means a site's home page looks like itself on a phone. See Reading first.

    A wrapping grid, not fixed columns. A 200 point basis lets the same block be one column on a phone and two or three on a wide screen with no breakpoints. This is inferred from the flex values; it follows Exact's "write the web, ship the platform" approach, see How the framework shaped the design.

    One tap to anywhere. Embeds and queries are the links between documents, so each is a large single target. See The five principles.

    Brand as the mark of a link. The edge and the symbol use brand, the colour of things that navigate. See Color and tokens.

    Quiet failure. A list that fails does not take over the page; the document is still readable. See Honest state. It is weaker than elsewhere, since the line has no Retry.

Differences from DESIGN.md: it describes the embed as "a card (-exact-secondary-background, radius 12) with the embedded doc's title and first blocks", and the query as a "list of document rows". The built embed adds the brand edge, cover and authors and shows a summary, not blocks. The built query adds the card grid. DESIGN.md's token table gives brand.subtle the use "embed card edge", but the edge is brand; no contract file uses brand.subtle for it.

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

Connections0
Linked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkDocBlockView: embed and query blocksDocBlockView: embed and qโ€ฆ
Citations 0Children & links 24

Loading child documentsโ€ฆ

Connections show where other documents or comments link to this document.

Related documents

Loading connectionsโ€ฆ