You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 773055d
Browse filesBrowse the repository at this point in the historyBrowse files
docs(frontend): a Custom front-end entry for the Object UI SDK, trimmed to what only SDK readers need
The moved SDK pages leave content/docs/sdk for a new entry, content/docs/frontend
(Custom front-end), placed after API & SDK. Its landing page routes three needs: a
custom page inside the Console (React pages), data access from your own front-end
(Client SDK), and rendering ObjectStack metadata in your own React app (the Object
UI SDK).
Pages that duplicated the site are cut or merged:
- schema-overview and api/schema-reference are removed; the generated component
reference and references/ui cover them.
- core/schema-renderer is merged into schema-rendering; plugins/index into the UI
plugins overview (plugins/index); plugin-report into ui/reports.
- The 57 renderer-type pages become one renderer types page; none of the types
is in sdui.manifest.json.
- Plugin pages keep installation and React usage; their Schema API, catalog
example galleries and metadata sections are removed, with a link to each
type's generated entry.
- Metadata behaviour the site lacked moves to the metadata pages: field drawing
(referenceVia, registry pickers, heading faces) into data-modeling/field-types,
element data-source keys per block into ui/pages, edit-save semantics into
ui/forms, and three report sections into ui/reports.
Claude-Session: https://claude.ai/code/session_01L9qibzngYyRjmvNxjkfVyd
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: content/docs/data-modeling/field-types.mdx
+77Lines changed: 77 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1058,6 +1058,83 @@ what the box accepts, and only one of the two outcomes is announced:
1058
1058
1059
1059
"No warning" therefore does not mean "the value is right".
1060
1060
1061
+
### Polymorphic pointer pairs (`referenceVia`)
1062
+
1063
+
A `text` field that declares `referenceVia` holds a record id of the object its
1064
+
sibling column names, row by row: `sys_approval_request.record_id` points at the
1065
+
record `object_name` names, and `sys_activity.source_id` at the one
1066
+
`source_object` names. The record details grid resolves the pair from the row
1067
+
with `resolveRecordPointer(field, row)` and draws it with the renderer
1068
+
registered under `RECORD_POINTER_CARD_TYPE`. The fields package's default draws
1069
+
the record id as text; the console registers a record preview card there, so a
1070
+
pointer field on a record page shows the record it points at. When the card
1071
+
could read that record, its title links to the record's page in the current
1072
+
app, built by the same record-link builder the page's lookup values use; a
1073
+
record the reader cannot read is drawn with no link, and the card never says
1074
+
why. Nothing is authored for this: the `referenceVia` declaration on the field
1075
+
is the whole contract. List cells are not a call site yet.
1076
+
1077
+
When the platform deletes the record a pointer names, it can say so on the row.
1078
+
A pointer field that also declares `referenceDeletedWhen: { field, value }`
1079
+
names a sibling `select` field and the option the platform writes there, as
1080
+
`sys_approval_request.record_id` declares
1081
+
`{ field: 'cancel_reason', value: 'record_deleted' }`. On a row holding that
1082
+
option the details grid draws a tombstone in the option's own label (localized
1083
+
when the console's bundle localizes it), reads nothing and links nothing. A
1084
+
record the card cannot read on any other row still gets the cause-free text:
1085
+
only the declaration means deleted.
1086
+
1087
+
### Naming a registry item by name (`position-ref`, `permission-ref`)
1088
+
1089
+
A `text` field that stores the **machine name** of one item of a metadata
1090
+
registry — a position, a permission set — declares the matching widget, and the
1091
+
record form lists that registry instead of asking for a typed name:
1092
+
1093
+
```json
1094
+
{
1095
+
"position": {
1096
+
"type": "text",
1097
+
"label": "Position",
1098
+
"required": true,
1099
+
"maxLength": 100,
1100
+
"widget": "position-ref"
1101
+
}
1102
+
}
1103
+
```
1104
+
1105
+
| Widget | Lists | Stores |
1106
+
|---|---|---|
1107
+
| `position-ref` | the `position` registry (`GET/api/v1/meta/position`) | the position's `name` |
1108
+
| `permission-ref` | the `permission` registry (`GET/api/v1/meta/permission`) | the permission set's `name` |
1109
+
1110
+
Like every `widget` value, the name is looked up as `field:<widget>`. Each item
1111
+
reads as its label beside its name, and the value written is the name alone: no
1112
+
label, no id. A stored name the registry does not list stays on screen, flagged
1113
+
*not found*, so a renamed or removed item is visible rather than dropped.
1114
+
`position-ref` leaves out the audience anchors, the spec's
1115
+
`AUDIENCE_ANCHOR_POSITIONS` (`everyone`, `guest`), because the server refuses an
1116
+
anchor as a grant target; a stored anchor still shows as its own option. The
1117
+
list comes from the data source's `listMetadataItems(type)`. When the adapter
1118
+
has none, the list is empty, or the load fails, the field is a text box that
1119
+
takes the typed name; a failure is shown with its cause, and the box stays
1120
+
editable.
1121
+
1122
+
### A widget's face on the record heading
1123
+
1124
+
A `text` field that declares `widget: 'recipient-picker'` or `widget: 'object-ref'` is drawn
1125
+
in a list column through the read cell registered under that widget's key, which names what
1126
+
the stored value references. When that field is also the object's `nameField`, the record
1127
+
page heading draws the value through the same cell: a record share heads its page with the
1128
+
recipient's name, not the user id it stores. Nothing is authored for this; the `widget`
1129
+
declaration on the field is the whole contract.
1130
+
1131
+
The heading lives in `@object-ui/components`, which this package depends on and so cannot be
1132
+
imported from here the other way round. `@object-ui/components` therefore owns a slot,
1133
+
`setFieldReadFaceResolver` / `resolveFieldReadFace`, and this package fills it when it loads with the
1134
+
lookup the list cells make. The widget's key draws the stored text until a host registers a
1135
+
face under it (the console registers its own), and while it does, the heading prints the
1136
+
stored value as before. So does a host that does not load `@object-ui/fields`.
1137
+
1061
1138
## Choosing a Field Type
1062
1139
1063
1140
Not sure which type fits your data? Follow the [Field Type Decision Tree](/docs/data-modeling/field-type-decision-tree) — a flowchart, quick-reference tables, and a use-case mapping for every type in this gallery.
Copy file name to clipboardExpand all lines: content/docs/frontend/architecture-overview.mdx
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,8 @@ description: Deep dive into the ObjectUI 3-layer architecture, data flow, plugin
5
5
6
6
ObjectUI is a **Server-Driven UI (SDUI) engine** that transforms JSON schemas into fully interactive React interfaces built on Shadcn/Tailwind. This document covers the internal architecture, data flow, and extension points.
7
7
8
+
It is the architecture of the SDK's own packages. Where ObjectUI sits among ObjectStack's protocol layers (data, kernel, view) is covered in [Protocol architecture](/docs/concepts/architecture).
9
+
8
10
## The 3-Layer Architecture
9
11
10
12
ObjectUI enforces a strict separation across three layers. Each layer has clear constraints on what it may import and what it may contain.
Copy file name to clipboardExpand all lines: content/docs/frontend/building-crud-app.mdx
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -201,7 +201,7 @@ export class RestDataSource implements DataSource {
201
201
}
202
202
```
203
203
204
-
> **Tip:** For the ObjectStack backend, use the official `@object-ui/data-objectstack` adapter instead of writing your own. See the [Data Connectivity](/docs/sdk/guide/data-source) guide for details.
204
+
> **Tip:** For the ObjectStack backend, use the official `@object-ui/data-objectstack` adapter instead of writing your own. See the [Data Connectivity](/docs/frontend/data-source) guide for details.
205
205
206
206
## Step 5: Render a CRUD Grid View
207
207
@@ -421,7 +421,7 @@ class AuthenticatedDataSource extends RestDataSource {
421
421
422
422
## Next Steps
423
423
424
-
- Explore the [Schema Overview](/docs/sdk/guide/schema-overview) for advanced schema features
425
-
- Add a Kanban board view using `@object-ui/plugin-kanban` (see the [Kanban Plugin](/docs/sdk/plugins/plugin-kanban) reference for runnable board schemas)
426
-
- Connect to a production backend with the [Data Connectivity](/docs/sdk/guide/data-source) guide
424
+
- Explore the [Schema Overview](/docs/frontend) for advanced schema features
425
+
- Add a Kanban board view using `@object-ui/plugin-kanban` (see the [Kanban Plugin](/docs/frontend/plugins/plugin-kanban) reference for runnable board schemas)
426
+
- Connect to a production backend with the [Data Connectivity](/docs/frontend/data-source) guide
427
427
- Build multi-object apps with relationships using `lookup` / `master_detail` fields (see the [Lookup Field](/docs/data-modeling/field-types) reference)
0 commit comments