Skip to content

Commit d250bee

Browse files
committed
wip(ui-merge): K4 — re-point ui doc gates and their tests to content/docs/frontend
Claude-Session: https://claude.ai/code/session_01L9qibyMpJZ67jrDrno4jY1 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 22ff2ea commit d250bee

46 files changed

Lines changed: 636 additions & 2239 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
'@objectstack/skills': patch
3+
'@object-ui/console': patch
4+
'@object-ui/auth': patch
5+
'@object-ui/cli': patch
6+
'@object-ui/collaboration': patch
7+
'@object-ui/components': patch
8+
'@object-ui/core': patch
9+
'@object-ui/create-plugin': patch
10+
'@object-ui/data-objectstack': patch
11+
'@object-ui/fields': patch
12+
'@object-ui/i18n': patch
13+
'@object-ui/layout': patch
14+
'@object-ui/mobile': patch
15+
'@object-ui/permissions': patch
16+
'@object-ui/plugin-ai': patch
17+
'@object-ui/plugin-calendar': patch
18+
'@object-ui/plugin-charts': patch
19+
'@object-ui/plugin-chatbot': patch
20+
'@object-ui/plugin-dashboard': patch
21+
'@object-ui/plugin-designer': patch
22+
'@object-ui/plugin-detail': patch
23+
'@object-ui/plugin-editor': patch
24+
'@object-ui/plugin-form': patch
25+
'@object-ui/plugin-gantt': patch
26+
'@object-ui/plugin-grid': patch
27+
'@object-ui/plugin-kanban': patch
28+
'@object-ui/plugin-list': patch
29+
'@object-ui/plugin-map': patch
30+
'@object-ui/plugin-markdown': patch
31+
'@object-ui/plugin-report': patch
32+
'@object-ui/plugin-timeline': patch
33+
'@object-ui/plugin-tree': patch
34+
'@object-ui/plugin-view': patch
35+
'@object-ui/providers': patch
36+
'@object-ui/react': patch
37+
'@object-ui/react-runtime': patch
38+
'@object-ui/types': patch
39+
---
40+
41+
docs(ui): package homepages and README links point at objectstack.ai/docs; objectui.org is retired
42+
43+
Clause-②: no
44+
Metadata-protocol: none
45+
46+
The ObjectUI documentation site at objectui.org is retired. Its pages now live in the ObjectStack docs, mostly under [User Interface](https://objectstack.ai/docs/frontend). Every `@object-ui/*` package's `homepage` and README links now go to the matching page there, and the old objectui.org addresses answer with a permanent redirect to the same page. The `description` fields spell the product name "ObjectUI". The `@objectstack/skills` bundle's ObjectUI skill links to the same pages. Nothing else changes in what these packages ship.

‎CONTRIBUTING.md‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ pnpm exec turbo run build --filter='./*/*' # Build every ui package (turbo
223223
pnpm exec turbo run type-check --filter='./*/*' # Run tsc --noEmit across the ui packages (turbo)
224224
pnpm exec turbo run lint --filter='./*/*' # Run eslint across the ui packages (turbo)
225225
pnpm dev # The Console's Vite dev server, on :5180
226-
pnpm docs:check-links # The internal-link check CI runs on the ui READMEs and docs
226+
pnpm docs:check-links # The internal-link check CI runs on the ui docs and READMEs
227227
pnpm test:e2e # End-to-end tests (playwright)
228228
```
229229

@@ -297,18 +297,20 @@ The [package directory](#package-directory) lists every `@object-ui/*` package b
297297

298298
### UI documentation
299299

300-
ObjectUI's guides are pages of the documentation site, under `content/docs/frontend/`
301-
(*Custom front-end*), and follow the `content/docs/` rules above. `ui/docs/` is not part of the site.
300+
ObjectUI's guides are pages of the documentation site, in its *Custom Front-end* section
301+
([content/docs/frontend](./content/docs/frontend)), and follow the documentation rules above.
302+
`ui/docs/` is not part of the site.
302303

303304
- **A code block in an ADR or a dated audit is a specimen, not an example to copy.** Fence it
304-
`plaintext`, never `ts` / `tsx`: a gate compiles the code fences of `content/docs/frontend/`, and
305-
a record edited until it compiles says something it never said. Code a reader may copy
306-
belongs in `content/docs/frontend/` or the skills tree.
305+
`plaintext`, never `ts` / `tsx`: a gate compiles the code fences of the Custom Front-end
306+
pages, and a record edited until it compiles says something it never said. Code a reader may
307+
copy belongs in those pages or the skills tree.
307308
- **A `json` fence must pass a strict `JSON.parse`.** A block annotated with comments or
308309
trailing commas is fenced `jsonc`, and must still be one JSON document once those are
309310
removed; a `${…}` expression stays on one line inside its string.
310311
- **Internal links are checked offline.** `pnpm docs:check-links` resolves every relative
311-
path in the ui READMEs and `ui/docs/` against the checkout, and CI runs it on every change.
312+
path and site route on the Custom Front-end pages, the ui READMEs and `ui/docs/` against the
313+
checkout, and CI runs it on every change.
312314

313315
ObjectUI's [Quick Start](./content/docs/frontend/quick-start.mdx) and
314316
[Component Registry](./content/docs/frontend/component-registry.mdx) guides are the place to

‎content/docs/frontend/architecture-overview.mdx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ Plugins use `React.lazy()` wrapped by `LazyPluginLoader` (`packages/react/src/La
150150

151151
Every plugin follows the same structure (see `packages/plugin-kanban/`, `packages/plugin-grid/`):
152152

153+
{/* doc-snippet: fragment — an excerpt of a plugin package's own index: `./KanbanImpl` is that package's sibling module and `Props` its local prop type, neither of which exists outside the plugin being described */}
153154
```tsx
154155
// 1. Lazy-load the heavy implementation
155156
const LazyKanban = React.lazy(() => import('./KanbanImpl'));
@@ -271,6 +272,7 @@ that dispatch. It owns the protocol (name-based action identity, record-id
271272
resolution, re-entrancy guard, the `/actions` response-envelope rule) and
272273
injects the three things core has no opinion about:
273274

275+
{/* doc-snippet: fragment — the three injected values are the reader's own (`myAuthenticatedFetch`, `currentObject`, `notifyDataChanged`), and the closing line is a bare `<ActionProvider ... />` tag whose remaining props are deliberately elided */}
274276
```typescript
275277
import { createServerActionHandler } from '@object-ui/core';
276278

‎content/docs/frontend/building-crud-app.mdx‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ pnpm add -D tailwindcss @tailwindcss/vite
3434

3535
Add Tailwind to your `vite.config.ts`:
3636

37+
{/* doc-snippet: fragment — a vite.config.ts for the reader's own project: @vitejs/plugin-react and @tailwindcss/vite are the reader's dependencies, not this repository's, so the imports cannot resolve here */}
3738
```ts
3839
import { defineConfig } from 'vite';
3940
import react from '@vitejs/plugin-react';
@@ -209,6 +210,7 @@ Wire everything together in `src/App.tsx`. `SchemaRendererProvider` injects the
209210
data source once, and every `SchemaRenderer` beneath it renders its schema
210211
against that one adapter:
211212

213+
{/* doc-snippet: fragment — the reader's src/App.tsx; './setup' and './data/rest-data-source' are the project files created in Steps 2 and 4 */}
212214
```tsx
213215
import './setup';
214216
import { SchemaRenderer, SchemaRendererProvider } from '@object-ui/react';
@@ -262,6 +264,7 @@ resolved** panel naming itself and the object it was about to read.
262264

263265
ObjectUI generates forms directly from your schema. Extend `App.tsx` with form state:
264266

267+
{/* doc-snippet: fragment — two lines to paste into the App component of Step 5 — the useState import and the surrounding function body are already there */}
265268
```tsx
266269
const [showForm, setShowForm] = useState(false);
267270
const [editId, setEditId] = useState<string | null>(null);
@@ -272,6 +275,7 @@ Add a "New Task" button and handle row clicks to open the edit form:
272275
Both of these render inside the `SchemaRendererProvider` from Step 5, so neither
273276
carries a data source of its own:
274277

278+
{/* doc-snippet: fragment — JSX to place inside the Step 5 App component; showForm, editId and their setters are the state declared in the block above */}
275279
```tsx
276280
<SchemaRenderer
277281
schema={{ type: 'object-grid', properties: { objectName: 'task' } }}
@@ -320,6 +324,7 @@ it declaratively, with the spec's per-element `dataSource` binding
320324
(fetched through your data source's `getObjectSchema` / `listViews`) and
321325
composes that view's `filter` and `sort` onto the query for you:
322326

327+
{/* doc-snippet: fragment — an excerpt mixing a state declaration with the JSX it drives, to be placed inside the App component; it is not a standalone module */}
323328
```tsx
324329
const [activeView, setActiveView] = useState('all');
325330

@@ -398,6 +403,7 @@ Use this component in your main app with simple routing state, or integrate with
398403

399404
**Environment config** — Keep your API URL configurable:
400405

406+
{/* doc-snippet: fragment — continues Step 4 — RestDataSource is the class defined there, and import.meta.env is Vite's typing in the reader's own app */}
401407
```ts
402408
const dataSource = new RestDataSource(
403409
import.meta.env.VITE_API_URL || 'http://localhost:3000/api'
@@ -410,6 +416,7 @@ const dataSource = new RestDataSource(
410416

411417
**Authentication** — Extend `RestDataSource` to inject auth headers:
412418

419+
{/* doc-snippet: fragment — extends the RestDataSource class defined in Step 4 */}
413420
```ts
414421
class AuthenticatedDataSource extends RestDataSource {
415422
constructor(baseUrl: string, private getToken: () => string) {

‎content/docs/frontend/component-registry.mdx‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ Now you can use it in schemas:
8888

8989
All registered components receive the schema as props:
9090

91+
{/* doc-snippet: fragment — continues the custom-component block above — `BaseSchema` and `MyComponentSchema` are declared there, and re-declaring them here would teach the reader to write the same interface twice (measured: TS2304 x3) */}
9192
```tsx
9293
interface ComponentProps<T extends BaseSchema = BaseSchema> {
9394
// The complete schema object
@@ -119,6 +120,7 @@ function MyRenderer(props: ComponentProps<MyComponentSchema>) {
119120

120121
Register components with additional metadata:
121122

123+
{/* doc-snippet: fragment — continues the custom-component block above — `MyComponent` and the `ComponentRegistry` import come from it (measured: TS2304 x2). The `ComponentMeta` literal this block shows is type-checked on the complete example at the end of the page, which does compile */}
122124
```tsx
123125
ComponentRegistry.register('my-component', MyComponent, {
124126
label: 'My Custom Component',
@@ -144,6 +146,7 @@ of a react page's JSX scope — and does not stand in for the slot.
144146

145147
Register components that load on demand:
146148

149+
{/* doc-snippet: fragment — `./HeavyComponent` is the reader's own module, so the dynamic import cannot resolve here (measured: TS2307 x1, plus TS2304 on the `ComponentRegistry` the block above imports) */}
147150
```tsx
148151
// The loader runs the first time a schema asks for `heavy-component`.
149152
ComponentRegistry.registerLazy('heavy-component', () => import('./HeavyComponent'))
@@ -153,6 +156,7 @@ ComponentRegistry.registerLazy('heavy-component', () => import('./HeavyComponent
153156

154157
Override default components with your own:
155158

159+
{/* doc-snippet: fragment — `MyCustomButton` is the reader's own replacement component; there is nothing in this repo to import it from (measured: TS2304 x1) */}
156160
```tsx
157161
import { ComponentRegistry } from '@object-ui/core'
158162
import { initializeComponents } from '@object-ui/components'
@@ -309,6 +313,7 @@ Use kebab-case for component types:
309313

310314
### 4. Provide Meaningful Metadata
311315

316+
{/* doc-snippet: fragment — `RatingComponent` is the component built in the complete example at the end of this page, and the `ComponentRegistry` import comes with it (measured: TS2304 x2) */}
312317
```tsx
313318
ComponentRegistry.register('rating', RatingComponent, {
314319
label: 'Star Rating',
@@ -320,6 +325,7 @@ ComponentRegistry.register('rating', RatingComponent, {
320325

321326
### 5. Handle Missing Props Gracefully
322327

328+
{/* doc-snippet: fragment — continues the component-interface block above — `ComponentProps` is declared there and `MySchema` stands for whatever schema the reader's component takes (measured: TS2304 x2) */}
323329
```tsx
324330
function MyComponent(props: ComponentProps<MySchema>) {
325331
const { schema } = props
@@ -339,6 +345,7 @@ function MyComponent(props: ComponentProps<MySchema>) {
339345

340346
Group related components into plugin packages:
341347

348+
{/* doc-snippet: fragment — the three chart components are files the reader is being told to write, so `./BarChart` / `./LineChart` / `./PieChart` cannot resolve here (measured: TS2307 x3) */}
342349
```tsx
343350
// @my-org/objectui-plugin-charts
344351
import { ComponentRegistry } from '@object-ui/core'
@@ -355,6 +362,7 @@ export function registerChartComponents() {
355362

356363
Usage:
357364

365+
{/* doc-snippet: fragment — `@my-org/objectui-plugin-charts` is the package the reader has just been shown how to create, not one this repo publishes (measured: TS2307 x1) */}
358366
```tsx
359367
import { initializeComponents } from '@object-ui/components'
360368
import '@object-ui/fields'

‎content/docs/frontend/create-plugin.mdx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ Advice for the plugin you are about to write, beyond whatever the scaffold hands
130130
third-party libraries are allowed to live, which makes it the layer that most needs a
131131
`React.lazy` boundary, so an app that never renders your component never pays for it:
132132

133+
{/* doc-snippet: fragment — the lazy boundary points at `./HeavyImpl`, a module in the READER's own plugin that cannot exist beside this page, and `React` is the UMD global a one-line excerpt does not import (measured: TS2307 x1, TS2686 x1). Adding an import would make the snippet about this repository rather than about the plugin the reader is scaffolding. */}
133134
```tsx
134135
const HeavyImpl = React.lazy(() => import('./HeavyImpl'));
135136
```

‎content/docs/frontend/data-objectstack.mdx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ implements `DataSource` — backed by an ObjectStack backend.
112112

113113
**Config:**
114114

115+
{/* doc-snippet: fragment — a SIGNATURE excerpt of the factory: a `function` declaration with no body and an `ObjectStackAdapter` return type this reference block does not import (measured: TS2391 x1, TS2304 x1). ⚠️ This gate never compiles a DECLARED block, so nothing here re-verifies that this excerpt still agrees with the shipped `packages/data-objectstack/dist/index.d.ts` — and this reason may not claim it does (objectui#7505). Read the shipped declaration when this page matters to you; it has drifted twice, once in the return type (objectui#7503) and once in a config member (objectui#7505) */}
115116
```typescript
116117
function createObjectStackAdapter<T = unknown>(config: {
117118
/** ObjectStack server base URL */
@@ -252,6 +253,7 @@ A schema node's `dataSource` key is the spec's `ElementDataSource` (validated by
252253
`ElementDataSourceSchema` in `@objectstack/spec`) — plain JSON metadata, **not**
253254
the adapter object:
254255

256+
{/* doc-snippet: fragment — a SHAPE excerpt restating `@objectstack/spec`'s own `ElementDataSource` as a bare interface, so its `filter` member names the spec's `ViewFilterRule` without importing it (measured: TS2304 x1); the type is exported from `@objectstack/spec/ui`. ⚠️ This gate never compiles a DECLARED block, so nothing here re-verifies this excerpt against `ElementDataSourceSchema` in the installed `@objectstack/spec` — and this reason may not claim it does (objectui#7505). The schema is the authority on which members are required and whether it is strict; read it there */}
255257
```typescript
256258
interface ElementDataSource {
257259
/** Object to query (required) */
@@ -342,6 +344,7 @@ passed to `createObjectStackAdapter` in code. Sourcing those values from the
342344
environment is your bundler's business (`process.env.*` under Node or webpack,
343345
`import.meta.env.*` under Vite):
344346

347+
{/* doc-snippet: fragment — `process` is a NODE global carried by the reader's own `@types/node`, which this gate's program does not load, and the paragraph above says so in words: sourcing config from the environment is the reader's bundler's business (measured: TS2591 x2) */}
345348
```typescript
346349
import { createObjectStackAdapter } from '@object-ui/data-objectstack';
347350

‎content/docs/frontend/data-source.mdx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ class UserDataSource implements DataSource<User> {
164164

165165
ObjectUI uses OData-style query keys for broad compatibility:
166166

167+
{/* doc-snippet: fragment — continues the adapter block above: dataSource is the adapter created there, and repeating its construction here would bury the query keys this section is about */}
167168
```typescript
168169
await dataSource.find('users', {
169170
$select: ['id', 'name', 'email'],

0 commit comments

Comments
 (0)