Skip to content

Commit 23c9a05

Browse files
Copilothotlong
andcommitted
Improve documentation clarity for vector, grid, and object fields
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 372a293 commit 23c9a05

3 files changed

Lines changed: 37 additions & 9 deletions

File tree

content/docs/fields/grid.mdx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,26 +192,28 @@ import { GridCellRenderer } from '@object-ui/fields';
192192

193193
## Full Grid Functionality
194194

195-
For advanced grid features, use the grid plugin:
195+
For advanced grid features, use the grid plugin (`@object-ui/plugin-grid`):
196196

197197
```typescript
198198
// Basic inline grid (simple display)
199199
{ type: 'grid', name: 'items', columns: [...] }
200200

201-
// Advanced grid (full CRUD)
201+
// Advanced grid with full features (requires plugin)
202202
{
203203
type: 'plugin:grid',
204204
bind: 'items',
205205
props: {
206206
columns: [...],
207-
editable: true,
208-
sortable: true,
209-
filterable: true,
210-
pagination: { pageSize: 20 }
207+
editable: true, // Plugin feature: inline editing
208+
sortable: true, // Plugin feature: column sorting
209+
filterable: true, // Plugin feature: filtering
210+
pagination: { pageSize: 20 } // Plugin feature: pagination
211211
}
212212
}
213213
```
214214

215+
**Note**: Features like `editable`, `sortable`, `filterable`, and advanced `pagination` are provided by the `@object-ui/plugin-grid` package, not the basic grid field.
216+
215217
## Use Cases
216218

217219
- **Invoice/Order Line Items**: Product lines, services

content/docs/fields/object.mdx

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,9 @@ import { ObjectCellRenderer } from '@object-ui/fields';
183183

184184
## Schema Validation
185185

186-
For typed object fields, define a schema:
186+
For typed object fields, you can define a schema in two formats:
187187

188+
**Simplified Format** (for documentation):
188189
```typescript
189190
{
190191
type: 'object',
@@ -202,6 +203,30 @@ For typed object fields, define a schema:
202203
}
203204
```
204205

206+
**JSON Schema Format** (for validation):
207+
```typescript
208+
{
209+
type: 'object',
210+
name: 'product_specs',
211+
label: 'Product Specifications',
212+
schema: {
213+
type: 'object',
214+
properties: {
215+
weight: { type: 'number' },
216+
dimensions: {
217+
type: 'object',
218+
properties: {
219+
width: { type: 'number' },
220+
height: { type: 'number' },
221+
depth: { type: 'number' }
222+
}
223+
},
224+
materials: { type: 'array' }
225+
}
226+
}
227+
}
228+
```
229+
205230
## Use Cases
206231

207232
- **Configuration**: Application settings, API configurations

content/docs/fields/vector.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,9 @@ Shows:
6767

6868
Different AI models use different embedding sizes:
6969

70-
- **OpenAI text-embedding-3-small**: 1536 dimensions
71-
- **OpenAI text-embedding-ada-002**: 1536 dimensions
70+
- **OpenAI text-embedding-3-small**: 512, 1536, or 3072 dimensions (configurable)
71+
- **OpenAI text-embedding-3-large**: 256, 1024, or 3072 dimensions (configurable)
72+
- **OpenAI text-embedding-ada-002**: 1536 dimensions (fixed)
7273
- **Sentence Transformers (BERT)**: 768 dimensions
7374
- **OpenAI CLIP**: 512 dimensions
7475
- **Word2Vec**: 100-300 dimensions

0 commit comments

Comments
 (0)