Primitive elements
The 19 Contract tags Seed Exact writes, what iOS draws for each, how often each is used, and the three tags it never writes.

Primitive elements are the tags of the Contract language. They look like HTML and they mean what HTML means, and on iOS each one becomes a UIKit control or a plain laid-out box. Every screen and every named component in Seed Exact is made of these 19 tags. This section documents each one as the app uses it: the attributes it actually carries, how many times it is written, and the rules that keep the screens consistent.

The elements

Counts are the number of times the tag is written in the nine Contract files at the documented commit.

Element

Meaning in Contract

What iOS draws

Uses

Page

main

The app root and navigation root

The window: navigation stacks, sheets, tint

1

main

header

A route's bar, or a section's title

Navigation bar; grouped list section header

52

bars

footer

A section's note

Grouped list section footer

15

bars

list

A scroller of rows

UICollectionView list, or a plain scroller of your own rows

22

list and section

section

A group of rows in a list

One inset card with separators

64

list and section

scroll

A scroller of anything

A scroll view

2

scroll

text

A run of words, plain or Markdown

A label in a system text style

369

text

image

A picture or a symbol

An image view or an SF Symbol

61

image and symbols

button

Something pressed to act

UIButton, a list cell, a bar item, a tab or an alert action

117

button

link

Something pressed to go to a URL

A pushing list cell, or a pressable box

19

link

input

A one line field, or a switch

UITextField, UISwitch

15

input

textarea

A multi line field

A text view

6

input

select, option

One choice from a menu

A pop-up button with its menu

1 each

input

dialog

A question over the screen

UIAlertController alert

5

dialog

progress

Work in progress

UIActivityIndicatorView

6

progress

row, column, view

Layout boxes

Plain views laid out by flexbox

49, 104, 3

layout

Tags the app never writes

Tag

What the app does instead

label

Every field is named by aria-label and a placeholder, or by a text written above or beside it. See input.

nav

There is no nav element. nav in the source is the name of the routes table (routes nav) and of the router value. The tab bar is a row role="tablist". See bars and main.

summary

Not an element in this app. The word appears only as data: a document's summary, a profile's "Summary" field. Exact's SummaryCard part is not used either (Platform parts).

Other tags Contract offers and the app does not use: table, time, hr, article, aside, box. Tables inside documents are rendered as Markdown by text (DocBlockView).

The idea behind them

Exact's rule is "Say what a thing is and leave how it looks unsaid". A button with no styling is the platform's button; a list of sections is the Settings list; a header with a heading is the navigation bar. The moment an element is given a background, a border or a radius it becomes the app's own painted box and the platform look is gone. So the screens fall into two kinds of writing:

    Chrome is unsaid. Bars, grouped lists, alerts, fields and switches carry almost no style attributes. Of 52 headers, none sets a colour or a size.

    Content is painted. Reading typography, bubbles, cards and avatars use row and column with roles and tokens, never hex colours.

This is the first principle of DESIGN.md (Leave it unsaid) and it is enforced by the framework's lint rules (How the framework shaped the design). Which attributes are tokens and roles is covered in Color and tokens, Typography and Spacing, radii and sizes.

Attributes every element shares

    testId: the handle tests use. On Read and Discuss screens it is only set on the visible screen. It is not shown to people.

    aria-label, aria-hidden, role: what assistive technology reads (Accessibility).

    CSS style attributes by their CSS names (padding, gap, border-radius, color, font).

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

In this section

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime

Comments