Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions content/docs/protocol/objectui/concept.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,15 @@ name: customer_edit
object: customer
layout:
sections:
- label: Contact Information
- name: contact_information
label: Contact Information
columns: 2
fields:
- name
- email
- phone
- label: Address
- name: address
label: Address
columns: 1
fields:
- street
Expand Down Expand Up @@ -568,15 +570,18 @@ Show complexity only when needed:
# Simple form for most users
layout:
sections:
- label: Basic Info
- name: basic_info
label: Basic Info
fields: [name, email, phone]

# Advanced section (collapsed by default)
layout:
sections:
- label: Basic Info
- name: basic_info
label: Basic Info
fields: [name, email, phone]
- label: Advanced Settings
- name: advanced_settings
label: Advanced Settings
collapsed: true
fields: [api_key, webhook_url, rate_limit]
```
Expand Down
9 changes: 6 additions & 3 deletions content/docs/protocol/objectui/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ object: customer
mode: edit
layout:
sections:
- label: Basic Information
- name: basic_information
label: Basic Information
columns: 2
fields:
- name
Expand Down Expand Up @@ -369,7 +370,8 @@ All layouts use a 12-column grid that adapts automatically:

```yaml
sections:
- label: Contact Info
- name: contact_info
label: Contact Info
columns: 2 # Desktop: 2 columns, Tablet: 1 column, Mobile: 1 column
fields:
- email
Expand Down Expand Up @@ -429,7 +431,8 @@ name: customer_edit
object: customer # ← References ObjectQL schema
layout:
sections:
- fields: [name, email, status] # ← Fields auto-validated
- name: basic_information
fields: [name, email, status] # ← Fields auto-validated
```

**What ObjectUI Inherits from ObjectQL:**
Expand Down
15 changes: 10 additions & 5 deletions content/docs/protocol/objectui/layout-dsl.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,8 @@ Sections are collapsible containers for related fields.
{/* os:check-yaml FormSectionSchema[] key=sections */}
```yaml
sections:
- label: Contact Information
- name: contact_information
label: Contact Information
collapsible: true
collapsed: false # Expanded by default
fields:
Expand Down Expand Up @@ -370,10 +371,12 @@ Show sections based on field values. The key is **`visibleWhen`** and its value
{/* os:check-yaml FormSectionSchema[] key=sections */}
```yaml
sections:
- label: Basic Info
- name: basic_info
label: Basic Info
fields: [name, email]

- label: Billing Information
- name: billing_information
label: Billing Information
visibleWhen: "record.account_type == 'premium'" # Only show for premium accounts
fields: [payment_method, billing_address]
```
Expand Down Expand Up @@ -434,15 +437,17 @@ a field widens itself with `span: full`:
{/* os:check-yaml FormSectionSchema[] key=sections */}
```yaml
sections:
- label: Name
- name: full_name
label: Name
columns: 2 # first_name and last_name share a row
fields:
- field: first_name
placeholder: First
- field: last_name
placeholder: Last

- label: Address
- name: address
label: Address
columns: 3
fields:
- field: street
Expand Down
Loading
Loading