Skip to content

Commit f94905d

Browse files
os-zhuangclaude
andauthored
remove(react): #2545 drop unused FormRenderer/FieldFactory duplicate form path (#2560)
Phase 4 of #2545. FormRenderer (and its captive FieldFactory) was an exported-but-dead second form render path with zero runtime consumers — the only import in the whole repo was its own test file. It duplicated plugin-form's ObjectForm (the path every app actually uses via the component registry) as a degraded variant: raw-HTML/Tailwind instead of shared UI primitives, a hard-coded Submit button, no submitBehavior/aria/groups support. - delete packages/react/src/components/form/ entirely (FormRenderer, FieldFactory, their test, README, index) and the now-empty re-export `export * from './components/form'` in packages/react/src/index.ts - remove the public exports FormRenderer/FormRendererProps/FieldFactory/ FieldFactoryProps/ExtendedFormField from @object-ui/react (changeset: minor) - docs: delete content/docs/core/form-renderer.mdx, drop it from core meta.json nav, repoint the schema-renderer and enhanced-actions cross-links (the latter to the live /docs/components/form page), delete the stale example packages/types/examples/form-renderer-example.ts - fix stale guidance that listed FormRenderer as an app-shell export (app-shell never exported it): app-shell/README.md, three skills guides; the plugin-development guide's registration example now shows the real ObjectFormRenderer symbol Verified: pnpm react build clean; vitest react 23 files / 295 tests pass; no FormRenderer/FieldFactory/ExtendedFormField references remain outside CHANGELOGs. Refs #2545. Claude-Session: https://claude.ai/code/session_01Ln4gqtxXuymoQmyy4iRM2z Co-authored-by: Claude <noreply@anthropic.com>
1 parent fba6875 commit f94905d

17 files changed

Lines changed: 26 additions & 2401 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
"@object-ui/react": minor
3+
---
4+
5+
remove(react): drop the unused `FormRenderer` / `FieldFactory` duplicate render path (#2545)
6+
7+
`FormRenderer` (and its captive `FieldFactory`) was an exported-but-dead second
8+
form render path: zero runtime consumers anywhere in the repo — the only import
9+
was its own test file. It duplicated `@object-ui/plugin-form`'s `ObjectForm`
10+
(the path every app actually uses via the component registry) but had drifted
11+
into a degraded variant: raw-HTML/Tailwind instead of the shared UI primitives,
12+
a hard-coded Submit button, and no support for `submitBehavior` / `aria` /
13+
`groups`.
14+
15+
**Breaking (ships as minor per the pre-1.0 launch-window convention):** the
16+
public exports `FormRenderer`, `FormRendererProps`, `FieldFactory`,
17+
`FieldFactoryProps`, and `ExtendedFormField` are removed from
18+
`@object-ui/react`. Render forms through the `object-form` schema node
19+
(`@object-ui/plugin-form` `ObjectForm`, reachable from a `FormViewSchema` via
20+
`SchemaRenderer` / the spec bridge) instead. Closes Phase 4 of #2545.

content/docs/core/enhanced-actions.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,5 +443,5 @@ Enhanced Actions are ideal for:
443443
## Related
444444

445445
- [Building a CRUD App](/docs/guide/building-crud-app) - CRUD operations with actions
446-
- [Form Schema](/docs/core/form-renderer) - Form submission actions
446+
- [Form](/docs/components/form) - Form submission actions
447447
- [Data Source](/docs/guide/data-source) - API integration

content/docs/core/form-renderer.mdx

Lines changed: 0 additions & 287 deletions
This file was deleted.

content/docs/core/meta.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"title": "Core",
33
"pages": [
44
"schema-renderer",
5-
"form-renderer",
65
"app-schema",
76
"theme-schema",
87
"enhanced-actions",

content/docs/core/schema-renderer.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,4 +162,3 @@ Null or undefined schemas render nothing:
162162

163163
- [Component Registry](/docs/guide/component-registry) - Register custom components
164164
- [Schema Rendering Guide](/docs/guide/schema-rendering) - Deep dive into schema rendering
165-
- [FormRenderer](/docs/core/form-renderer) - Specialized renderer for forms

packages/app-shell/README.md

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -52,22 +52,6 @@ function MyDashboard() {
5252
}
5353
```
5454

55-
### With Custom Form
56-
57-
```tsx
58-
import { FormRenderer } from '@object-ui/app-shell';
59-
60-
function MyForm() {
61-
return (
62-
<FormRenderer
63-
schema={formSchema}
64-
dataSource={myDataSource}
65-
onSuccess={() => console.log('Saved!')}
66-
/>
67-
);
68-
}
69-
```
70-
7155
## Key Features
7256

7357
- **Zero Dependencies on Console**: No routing, no auth, no app management
@@ -130,21 +114,6 @@ Renders custom page schemas.
130114
/>
131115
```
132116

133-
### FormRenderer
134-
135-
Renders forms (modal or inline).
136-
137-
```tsx
138-
<FormRenderer
139-
schema={formSchema}
140-
dataSource={dataSource}
141-
mode="create" // or "edit"
142-
recordId={recordId}
143-
onSuccess={handleSuccess}
144-
onCancel={handleCancel}
145-
/>
146-
```
147-
148117
## Metadata designers
149118

150119
The metadata-admin engine (`src/views/metadata-admin`) renders an in-app editor

0 commit comments

Comments
 (0)