feat(ui): add animation, notification, dnd protocols + extend ARIA coverage#613
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
…mization Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds three new UI protocol schema modules to @objectstack/spec (animation, notifications, drag-and-drop) and expands ARIA support into app/view schemas, while updating the optimization report and adding tests to validate the new contracts.
Changes:
- Added
animation,notification, anddndUI Zod schemas (+ corresponding Vitest coverage) and exported them fromui/index.ts. - Extended ARIA coverage by adding optional
aria: AriaPropsSchematoListViewSchema,FormViewSchema, andAppSchema. - Updated
PROTOCOL_OPTIMIZATION_REPORT.mdto reflect the new UI protocol files, counts, and Sprint O completion.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/spec/src/ui/view.zod.ts | Adds optional aria attributes to List/Form view schemas. |
| packages/spec/src/ui/app.zod.ts | Adds optional aria attributes to the app schema. |
| packages/spec/src/ui/animation.zod.ts | Introduces motion/transition schemas and a top-level MotionConfig schema. |
| packages/spec/src/ui/animation.test.ts | Adds Vitest coverage for animation/motion schemas and defaults. |
| packages/spec/src/ui/notification.zod.ts | Introduces notification instance + global notification config schemas. |
| packages/spec/src/ui/notification.test.ts | Adds Vitest coverage for notification schemas and defaults. |
| packages/spec/src/ui/dnd.zod.ts | Introduces drag/drop handle, constraints, drag item, drop zone, and DnD config schemas. |
| packages/spec/src/ui/dnd.test.ts | Adds Vitest coverage for DnD schemas and defaults. |
| packages/spec/src/ui/index.ts | Exports the newly added UI protocol modules. |
| PROTOCOL_OPTIMIZATION_REPORT.md | Updates report counts/sections to include Sprint O and new UI protocols. |
| ## 🔎 第四次协议扫描验证评估 (4th Verification Assessment) | ||
|
|
||
| > **评估日期**: 2026年2月11日 (第三次) | ||
| > **验证范围**: 159个Zod协议文件 + 178个测试文件 | ||
| > **评估日期**: 2026年2月11日 (第四次) | ||
| > **验证范围**: 162个Zod协议文件 + 181个测试文件 | ||
| > **评估方式**: 逐项对照源码验证 | ||
| > **上次评估**: 2026年2月11日 (第二次, 139个文件) | ||
| > **上次评估**: 2026年2月11日 (第三次, 159个文件) |
There was a problem hiding this comment.
The report labels this section as the 4th verification assessment, but later the footer lists this run as the 5th verification. Please make the verification numbering consistent throughout the document (header, executive summary label, and footer).
| | 测试文件 | 178 | **181** | +3 | | ||
| | 总测试用例 | 4,656 | **4,714** | +58 | | ||
| | `.describe()` 注解 | 6,100+ | **6,200+** | +2% | | ||
| | UI文件 i18n覆盖 | 14/14 | **14/14** | ✅ 维持 | |
There was a problem hiding this comment.
The metrics table says UI i18n coverage is 14/14, but the report elsewhere updates UI file count to 17 and references i18n coverage as 14/17. Please update this table row so it matches the rest of the document (and the current UI file count).
| | UI文件 i18n覆盖 | 14/14 | **14/14** | ✅ 维持 | | |
| | UI文件 i18n覆盖 | 14/14 | **14/17** | ⚠️ 待补齐 (新增3个UI文件未接入) | |
| | 项目 | 当前状态 | 优先级 (重新评估) | | ||
| |------|---------|-----------------| | ||
| | ✅ **UI i18n全覆盖** | 14/14 UI文件全部集成 I18nLabelSchema | ✅ **完成** | | ||
| | ✅ **UI i18n覆盖** | 14/17 UI文件已集成 I18nLabelSchema (新增3文件待集成) | ✅ **完成** | |
There was a problem hiding this comment.
This line marks “UI i18n coverage” as complete while also stating the 3 new UI files are still pending i18n integration. If animation/dnd intentionally have no user-facing labels, consider rewording to indicate i18n is not applicable there; otherwise, update the new files to use I18nLabelSchema where appropriate.
| | ✅ **UI i18n覆盖** | 14/17 UI文件已集成 I18nLabelSchema (新增3文件待集成) | ✅ **完成** | | |
| | ✅ **UI i18n覆盖** | 14/14 适用的UI文件已集成 I18nLabelSchema(动画/通知/拖拽协议无用户可见标签,i18n不适用) | ✅ **完成** | |
| - ✅ 集成健康检查: HealthCheckConfig + CircuitBreakerConfig (熔断器/半开/回退) (12项测试) - connector.zod.ts | ||
|
|
||
| #### Sprint O: UI动画/通知/拖拽+ARIA扩展 ✅ 完成 | ||
| - ✅ `ui/animation.zod.ts` - 7种预设 + 6种缓动 + 7种触发器 + 运动配置 (18项测试) |
There was a problem hiding this comment.
Sprint O summary says animation has “7 presets”, but animation.zod.ts defines 9 transition presets (including rotate/flip/none). Please correct the preset count here to avoid conflicting documentation.
| - ✅ `ui/animation.zod.ts` - 7种预设 + 6种缓动 + 7种触发器 + 运动配置 (18项测试) | |
| - ✅ `ui/animation.zod.ts` - 9种预设 + 6种缓动 + 7种触发器 + 运动配置 (18项测试) |
| > Sprint 1-6 + Sprint A-N = **共20个Sprint全部完成** | ||
| > Sprint 1-6 + Sprint A-O = **共21个Sprint全部完成** | ||
|
|
||
| 1. ✅ **UI I18n全覆盖** - 14/14 UI文件已集成 I18nLabelSchema |
There was a problem hiding this comment.
In the conclusion list, item 1 still claims “UI I18n全覆盖 - 14/14 UI文件”, but the report now states there are 17 UI files and later marks i18n coverage as 14/17. Please reconcile these counts/wording so the conclusion matches the updated UI file totals.
| 1. ✅ **UI I18n全覆盖** - 14/14 UI文件已集成 I18nLabelSchema | |
| 1. ✅ **UI I18n集成完成度** - 14/17 UI文件已集成 I18nLabelSchema |
Continues UI protocol optimization per PROTOCOL_OPTIMIZATION_REPORT.md. Closes gaps in the industry comparison (animation/motion, notifications, drag-and-drop) and extends ARIA accessibility coverage.
New protocol files
animation.zod.ts— Motion design system: 9 transition presets, 6 easing functions, 7 animation triggers, component/page transition configs,prefers-reduced-motionsupportnotification.zod.ts— Toast/snackbar/banner/alert/inline notifications with severity, positioning, auto-dismiss, action buttonsdnd.zod.ts— Drag-and-drop: drag handles, drop effects, axis/bounds constraints, grid snapping, sortable lists, touch delayARIA accessibility extensions
view.zod.ts—AriaPropsSchemaadded toListViewSchemaandFormViewSchemaapp.zod.ts—AriaPropsSchemaadded toAppSchemaTests
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.