Skip to content

Commit cbaebbd

Browse files
committed
Add implementation plan for ObjectUI component suite and CRM integration
1 parent e0ff533 commit cbaebbd

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
## Plan: ObjectUI Component Implementation & CRM Integration
2+
3+
This plan outlines the roadmap to implement the full ObjectUI component suite following the `@objectstack/spec` protocol and integrate it into `examples/crm-app`. We will prioritize the Core engines (Actions/Expressions) and critical CRM fields before addressing complex plugins.
4+
5+
### Steps
6+
7+
1. **Core Engine Implementation (The "Brain")**
8+
* Implement **Action Engine** in [`packages/core`](packages/core/package.json) to handle events defined in `ActionSchema` (`navigate`, `submit`, `validate`).
9+
* Implement **Expression Evaluator** in [`packages/core`](packages/core/src) to parse string expressions (e.g., `${data.amount > 1000}`) for dynamic visibility/disabled states.
10+
* Create `useActionRunner` and `useExpression` hooks in [`packages/react`](packages/react/src) to expose these engines to components.
11+
12+
2. **Essential CRM Fields (The "Inputs")**
13+
* Implement `LookupField` in [`packages/fields`](packages/fields/src) (critical for CRM relationships) using a modal/combobox pattern.
14+
* Implement `CurrencyField` (money formatting), `TextArea`, and `RichText` (markdown/HTML) editors.
15+
* Register these new fields in the `FieldRegistry` within [`packages/fields`](packages/fields/src).
16+
17+
3. **View & Form Layouts (The "Structure")**
18+
* Enhance `FormView` in [`packages/renderer`](packages/renderer/src) to support `sections`, `tabs`, and `groups` layout schemas.
19+
* Implement `ListView` components for generic collections, ensuring `Grid` and `Kanban` plugins are correctly loaded dynamically.
20+
* Update `SchemaRenderer` to correctly delegate `view:*` types to these new layout components.
21+
22+
4. **Heavy Plugin Implementation (The "Widgets")**
23+
* Implement `plugin-charts` using Recharts for `dashboard` widgets (`bar`, `line`, `pie`).
24+
* Implement `plugin-calendar` using FullCalendar for `view:calendar`.
25+
* Ensure plugins are lazily loaded in `examples/crm-app` to maintain performance.
26+
27+
5. **CRM App Integration & Verification**
28+
* Update [`examples/crm-app`](examples/crm-app/src) to register the new Field and Plugin packages.
29+
* Refactor hardcoded CRM pages to use the new `Action` and `Lookup` components via JSON schema.
30+
* Verify the "Opportunity Deal" flow (edit amount, change stage, link account) works purely via the new components.
31+
32+
### Further Considerations
33+
1. **Component Registry Strategy:** Should we auto-register all components in a bundle, or require the user (CRM app) to explicitly import and register each package to save bundle size? (Recommendation: Explicit registration).
34+
2. **Styling Consistency:** Ensure all new inputs in `@object-ui/fields` strictly follow the Shadcn UI themes defined in `@object-ui/components`.

0 commit comments

Comments
 (0)