orbcafe-stdreport-workflow
v1.0.1Build ORBCAFE standard report/list pages with CStandardPage, CTable, CSmartFilter, useStandardReport, persistence, and quickCreate/quickEdit/quickDelete using official examples-proven patterns. Use for filters, pagination, variants/layout, or report orchestration, especially when prior implementatio...
Installation
Please help me install the skill `orbcafe-stdreport-workflow` from SkillHub official store.
npx skills add SHENRUIYANG/orbcafe-stdreport-workflow
ORBCAFE StdReport Workflow
Workflow
- 执行安装与运行前置。
- 先对照
skills/orbcafe-ui-component-usage/references/module-contracts.md,确认这是Hook-first模块。 - 用
references/component-selection.md选择integrated或 table-only。 - 基于
references/recipes.md生成最小可运行代码。 - 用
references/guardrails.md强制检查 identity、分页、持久化、i18n。 - 按官方 examples 补齐验收与排障步骤。
Installation and Bootstrapping (Mandatory)
npm install orbcafe-ui @mui/material @mui/icons-material @mui/x-date-pickers @emotion/react @emotion/styled dayjs
本仓库联调时,严格按官方顺序:
# repo root
npm run build
cd examples
npm install
npm run dev
参考实现:
- examples/app/_components/StdReportExampleClient.tsx
- examples/app/std-report/page.tsx
Mandatory rules
- 始终设置 identity:
metadata.idforuseStandardReportidforCStandardPageappIdfor standaloneCTable/CSmartFilter- 默认优先
useStandardReport + CStandardPage mode="integrated"。 - 始终从
orbcafe-ui包入口导入,不导入私有src/components/*。 - 需要 locale 时优先用
CAppPageLayout.locale或OrbcafeI18nProvider。 quickCreate/quickEdit/quickDelete开启时,始终给出 async 回调并写清 payload 结构。- 后端不支持
limit=-1时,在fetchData层显式转换,不要把 ALL 模式直接透传。
Examples-Based Experience Summary
- 先用
useStandardReport产出pageProps,再注入tableProps.quick*扩展,稳定且可维护。 - 通过
metadata.variants提供默认视图,再让用户落地保存,能减少首次空白配置。 - 列渲染尽量只做展示转换,筛选值保持机器稳定值(例如
active/pending/inactive)。 - 表格放在固定高度容器(例如
calc(100vh - 120px))可避免页面整体滚动抖动。
Output Contract
Mode:Hook-first.Pattern: integrated page or table-only.Code: paste-ready, imports fromorbcafe-uionly.Data contract: columns/filters/rows/fetchData shape.Verify: 启动页面、筛选生效、分页切换、quick 操作触发、刷新后配置保留。Troubleshooting: 至少包含以下排查项:- 忘记
metadata.id/id/appId导致变体/布局“没效果” - 没有先
npm run build(本地file:..依赖场景) - 错误导入路径或 Next 客户端边界导致组件不渲染