Skip to content

Commit 4f9a7a8

Browse files
committed
Add Page Components section with contracts and standard components library details
1 parent f4e383f commit 4f9a7a8

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

content/prompts/development/component.prompt.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,30 @@ Responsible for rendering records. The specific `type` determines the Props cont
6565
```
6666
* **Required Types (Ref: `src/ui/view.zod.ts`):** `simple`, `tabbed`, `wizard`, `split`, `drawer`, `modal`.
6767
68-
### C. Dashboard Widgets (`widget.*`)
68+
### D. Page Components (`page.*`)
69+
Reusable UI blocks for the Drag-and-Drop Page Builder.
70+
* **Contract:** Must implement `PageComponentProps`.
71+
```typescript
72+
type PageComponentProps = {
73+
id: string; // Instance ID
74+
type: string; // Component Type Name
75+
properties: Record<string, any>; // User Config
76+
context?: { // Runtime Context
77+
objectName?: string;
78+
recordId?: string;
79+
};
80+
}
81+
```
82+
* **Standard Components Library:**
83+
* **Structure:** `page.header`, `page.footer`, `page.sidebar`, `page.tabs`, `page.accordion`, `page.card`.
84+
* **Record Context:**
85+
* `record.details` (The form), `record.highlights` (Key fields header).
86+
* `record.related_list` (Sub-grid), `record.activity` (Timeline).
87+
* `record.chatter` (Feed), `record.path` (Status Steps).
88+
* **Navigation:** `app.launcher`, `nav.menu`, `nav.breadcrumb`.
89+
* **Utility:** `global.search`, `global.notifications`, `user.profile`.
90+
91+
### E. Dashboard Widgets (`widget.*`)
6992
Standalone cards placed on a dashboard grid.
7093
* **Contract:** Must implement `DashboardWidgetProps` (Ref: `src/ui/dashboard.zod.ts`).
7194
```typescript

0 commit comments

Comments
 (0)