Views
Declare the list and detail views of your objects next to their schema, and ship them to the workspace in the same sync.
Views are the screens your team sees in the Standards app. listView is the
table of records; detailView is the page one record opens into. The ones you
declare here are a starting point: on app.standards.new your users change
them, add tabs and columns, and create views of their own, and sync keeps
theirs while owning yours. Declare them
next to your objects and they ship in the same bundles.sync.

import { content, detailView, group, listView, query } from "@standards/client";
const IDENTITY = content.form(
group("identity", "Identity").fields("firstName", "lastName", "email")
);
export const CONTACT_DETAIL = detailView("contact_detail", "Contact")
.for("contacts")
.default()
.tab("general", "Info", IDENTITY)
.tab("activity", "Activity", content.activity())
.aside("details", "Details", content.form(group("details", "Details").field("status")))
.build();
export const CONTACTS = listView("contacts_list", "Contacts")
.for("contacts")
.default()
.tab("all", "All", content.collection(query("contacts")).table().columns("firstName", "email"))
.build();The view chain
| Method | Effect |
|---|---|
detailView(name, label) / listView(name, label) | Starts a view in record or collection context |
.for(object) | The object the view belongs to; required |
.default() | Opens by default for that object and context; one per pair |
.tab(name, label, content, { after? }) | Places a content in the main area. after names the tab it follows when a bundle adds it to another bundle's view; a missing anchor lands it last |
.aside(name, label, content) | Places a content in the side panel |
.description(text), .icon(name) | View metadata |
.build() | Validates and returns { kind: "view", definition } |
Every call returns a new builder. A content has no name, label or placement of
its own; the view supplies them. A tab labelled with an English default (Details
on a form, Activity on an activity, All on a collection), and a form group
labelled General, reads in the reader's language; any other label shows as
written. A tab stored with no label and named for its kind (form, activity)
reads that kind's word in the reader's language; any other reads its name made
readable (open_deals reads "Open deals"), never the machine name. Content names
are unique within a view, and at
least one main content is required. Contents that need a record (everything
except a collection on an object) are refused on a listView at build time.
The ten content types
content.collection(query) // the records a typed query reads
content.form(...groups) // fields of the current record, laid out in groups
content.activity() // the record's activity feed
content.richtext("body") // one richtext attribute, full width
content.documents() // the record's document packs
content.forms().object("x") // submissions of the form system for an object
content.emails("email") // threads matched on email attributes
content.meetings("email") // the meetings linked to the record
content.custom(extension, o) // a registered content extension
content.page(recordPage) // a record page of the same object, by nameThe block factories (content.metric, content.chart, content.agenda,
content.card, content.text…) and content.page are described in
Pages.
A meetings tab lists the meetings linked to the record, so it needs no
attribute: content.meetings() shows a note's or a task's meetings too. The attributes content.meetings names also
link meetings to records: a synced meeting links every record whose attribute
holds one of its participants' addresses, and follows a later change of that
value, so a contact whose address is filled in or corrected after the meeting
was synced is linked or unlinked without a new sync. Links added by hand are kept.
On a record, the tab strip follows the label of a collection, documents, meetings or emails tab with the number of items it lists: a collection counts the records its query and relation select (not what someone typed into its search or filters), documents count the files and folders at the root of the record's drive (each once, nothing inside a folder), meetings count the calls linked to the record (a call once, however many of its attendees' calendars the viewer sees it from), and emails count the record's conversations, as the open tab's header does in the conversations layout. Each count respects what the viewer may see and is read without opening the tab. A tab with nothing in it, or whose count has not arrived, shows only its label. A documents tab that hides attachments, an emails tab with no email attribute, and tabs without a list behind them carry no count.
The meetings count comes from POST /meetings/records/:recordId with a
countMode in the body (none, estimated or exact, as on records): the
response then carries total, null under none, and totalIsExact, false
when estimated was cut at its cap of 10,000 event groups and total is a
lower bound, which the tab shows with a + (it may read above 10,000, since
meetings with no event id are counted one by one). Without a countMode, the
response has no total.
All of them accept .icon(name). content.custom names an extension already
registered on the platform; the extension registry itself is not part of the
client surface.
The Bubble tab
The native views (meeting, artifact, skill, memory) include a Bubble tab: a custom content on the record_links block that maps the links around the record (see Blocks). Any other record view gains it from the "+" tab menu. A view you declare in code does not get it for free: add it with the helper from @standards/schema, or place the block yourself:
import { RECORD_LINKS_BLOCK, content, detailView, recordLinksTab } from "@standards/schema";
detailView("contact_detail", "Contact")
.for("contacts")
.tab(...recordLinksTab()) // name "bubble", label "Bubble"
// or, with your own name and label:
.tab("links", "Links", content.custom(RECORD_LINKS_BLOCK, {}))
.build();Collections
A collection reads the records of one typed query(...): an object, a relation
the current record declares (query(target).related(attribute)), or the records
whose own relation points back at the current record
(query(object).relatedFrom(attribute)). related needs one concrete target
object; polymorphic and universal relations
are not a collection source. The query carries the filters and sorts, so the
collection has no .object, .related, .relatedFrom, .filter or .sort of
its own.
import { content, detailView, query } from "@standards/client";
export const COMPANY_DETAIL = detailView("company_detail", "Company")
.for("companies")
.tab("contacts", "Contacts", content.collection(
query("contacts").relatedFrom("company").orderBy("lastName"))
.table()
.columns("firstName", "lastName", "email")
.openMode("peek")
.createMode("inline")
.actions("create", "update", "delete"))
.build();query(...) is immutable: every verb returns a new query. It takes an object
builder, which checks attribute names, or an object name. Its verbs are eq,
neq, gt, gte, lt, lte, contains, notContains, startsWith,
endsWith, in, notIn, isEmpty, isNotEmpty, or, orderBy, limit,
offset, search, related and relatedFrom. A rule value can be a dynamic
value that is resolved for whoever reads the view: currentActor(), today()
or now(). A collection stores the query's source, filters, sorts and limit:
content.collection(q) refuses a query with search or offset with a
ValidationError.
import { content, currentActor, query, today } from "@standards/client";
content.collection(
query("tasks").eq("assignee", currentActor()).lt("dueDate", today()).orderBy("dueDate")
).list();where(...rules) appends rules exactly as written, for what the verbs do not
cover: any operator, a qualified relation property, or a quantifier on a qualified property.
query("deals").where({ attribute: "contacts", property: "signedDate", operator: "is_not_empty", value: null });The same query also feeds aggregate().
| Option | Notes |
|---|---|
.table(), .list(), .kanban(groupByAttribute) | One layout; switching clears layout-specific settings. A board groups by a visible status attribute, the only kind its columns are read by: an Architect draft that groups one by anything else is refused, naming the attribute, and so is adding a bundle that ships one. A board already stored with such a grouping (or whose grouping attribute was since hidden or deleted) shows no columns and says why, pointing to Group by in the view settings, which offers only visible statuses, or, when the object has none, to adding a status attribute or switching the layout to a table or a list |
.columns(...attributes) | Columns of a table, fields of a card |
.actions(...) | create, attach, update, delete, detach; .actions() hides every mutation. On a relation collection, attach turns the toolbar's Add button into a single "New" button whose menu offers "Link an existing record" (the relation picker, which links one or several existing records and keeps creation as its last row) and, with create, "Create a new record". Without create the button reads "Link" and opens the picker directly; on a single relation that already holds a record it reads "Change" and replaces the link. With detach, a row's context menu (right-click in a table, the row's ⋯ in a list or board), the selection toolbar and Backspace on checked table rows unlink the record, named after the record being viewed — "Unlink from Acme" — and a table row's name cell shows "Open" on hover with a chevron holding "Unlink from Acme" and, with delete, "Delete record": in a table or a list the rows leave at once (a board card leaves once the board re-reads), the record itself is kept, and the toast ("Link removed between Thomas Leroy and Acme") offers Undo for 8 seconds. An empty relation collection says "No record linked to Acme" and offers Link and Create. Without detach, nothing unlinks a record, the picker included. Omitted, a relation collection draws attach and detach. On a private or workspace tab, update lets people check rows and move them to the other tab; Delete appears only with delete |
.openMode("page" | "peek") | Omitted means page, and no peek history |
.createMode("page" | "peek" | "inline") | Add creates the record at once, with no form: the view's filters, the relation it lists and the attribute defaults fill it, and a required attribute left empty is filled in on the record. page and peek then open it; inline adds it to the collection as a new row and stays there. Omitted follows the resolved open mode |
.visibility("workspace" | "private" | "all") | Who sees the tab |
.displayAttributes(...), .descriptionAttribute(name) | Card rendering. On a list row and on a kanban card, clicking a select, status or multiselect value (or pressing Enter or Space on it) edits it in place, where the tab allows update and the viewer may edit the record; clicking anywhere else opens the record, and a card still drags from anywhere but its values. On a board, changing the grouped-by value moves the card to its new column. From the keyboard, a card's first tab stop is its open control (Enter opens the record, Space picks the card up), followed by its editable values |
.columnSizing(widths) | Table and list only |
.kanbanColumnOrder(...), .kanbanColumnVisibility(map), .kanbanPinnedColumns(...) | Kanban only |
Actions never grant permissions: a user without update on the object does
not gain it from a collection.
Forms inside a view
group(name, label) holds fields: .field(attribute, { label?, span?, readOnly? })
or .fields(...attributes), plus .description(text). Every group folds from
its title and starts open: .collapsible(true) starts it folded, and
.alwaysOpen() (collapsible: false) keeps a plain title that does not fold.
content.form(...groups) accepts .formColumns(1 | 2 | 3) and
.density("comfortable" | "compact" | "spacious").
content.form( is a layout inside a view: it arranges the record's own
attributes. The form system (form(), slots, steps, prefill) and workflows
are not pushable through a bundle, so they are not part of this SDK.
Views in a bundle
Add views next to the objects. Each one is built and validated locally, then
sent with the objects on the next bundles.sync.
import { bundle } from "@standards/client";
export const crm = bundle("crm", "CRM").add(
CONTACT,
COMPANY,
CONTACT_DETAIL,
CONTACTS,
COMPANY_DETAIL,
);On the workspace a bundle-owned view is adopted the first time it is pushed,
updated on every later change, and released when it leaves the bundle: the
row becomes a custom view and workspace overlays survive. Declaring it again
adopts the row back. The Bundles page shows these counters in
the SyncBundleResult.
@standards/schema exports relationProperty(name) to reference a qualified
property in a column list; @standards/client does not re-export it. Column
references from a client-only project stay on plain attributes.
Next steps
- Relations and documents: the sources a collection can read
- Blocks: declare a block and the inputs it takes
- Bundles: sync objects and views in one call
- Objects: the objects your views point at
- Schema ownership: what a workspace keeps when a view is released
- Book a demo