Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ponents/ui Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
…e safety Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
|
@copilot 评估一下还有哪些任务没处理完 |
剩余任务评估✅ 已完成 (3/3)
|
There was a problem hiding this comment.
Pull request overview
Extracts the calendar-view complex UI component out of @object-ui/components into a dedicated plugin package, aligning the core components library with the “Shadcn primitives only” goal.
Changes:
- Added new package
@object-ui/plugin-calendar-view(component implementation + ObjectUI renderer + build config). - Removed
calendar-viewexports/registration and its registration tests from@object-ui/components. - Updated
shadcn-components.jsonmetadata to mark extracted components as moved-to-plugin.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Adds lock entries for the new @object-ui/plugin-calendar-view workspace package. |
| packages/plugin-calendar-view/package.json | Defines the new plugin package metadata, deps, and build scripts. |
| packages/plugin-calendar-view/tsconfig.json | TS config for building type declarations for the plugin. |
| packages/plugin-calendar-view/vite.config.ts | Vite lib build config for the plugin bundle/types output. |
| packages/plugin-calendar-view/src/index.tsx | CalendarView component implementation relocated into the plugin. |
| packages/plugin-calendar-view/src/renderer.tsx | Registers calendar-view in ComponentRegistry for schema rendering. |
| packages/plugin-calendar-view/README.md | Adds basic install/usage docs for the new plugin. |
| packages/components/src/ui/index.ts | Removes calendar-view export from core UI primitives barrel. |
| packages/components/src/renderers/complex/index.ts | Stops registering calendar-view from core complex renderers. |
| packages/components/src/tests/complex-disclosure-renderers.test.tsx | Removes core registration/render smoke tests for calendar-view. |
| packages/components/shadcn-components.json | Annotates calendar-view (and related items) as moved to plugin packages. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (2)
packages/plugin-calendar-view/src/renderer.tsx:114
CalendarViewSchemafrom@object-ui/typesis defined around aneventsarray plusdate/defaultDate,editable, etc. This renderer still appears to buildeventsfromschema.data/titleField/startDateField(earlier in the file) and usescurrentDate/allowCreate/onDateClickwhich aren’t part of the typed schema. That means schema usage providingevents(as in the previous core tests) will silently render an empty calendar. Please align the renderer to theCalendarViewSchemacontract (or update@object-ui/types+ zod schema if the contract intentionally changed).
packages/plugin-calendar-view/src/renderer.tsx:106validViewis narrowed via a type assertion (schema.view as ...), which undermines the stated goal of “no type assertions” and still leaves the value unchecked at the type level. Prefer a small type-guard helper (e.g.,isSupportedView(v): v is 'month'|'week'|'day') so the narrowing is both runtime-validated and compile-time safe without casts.
| }); | ||
| }); | ||
|
|
||
| describe('Calendar View Renderer', () => { | ||
| it('should be properly registered', () => { | ||
| const validation = validateComponentRegistration('calendar-view'); | ||
| expect(validation.isRegistered).toBe(true); | ||
| }); | ||
|
|
||
| it('should render calendar view', () => { | ||
| const { container } = renderComponent({ | ||
| type: 'calendar-view', | ||
| events: [ | ||
| { | ||
| id: '1', | ||
| title: 'Event 1', | ||
| start: '2024-01-01', | ||
| end: '2024-01-01', | ||
| }, | ||
| ], | ||
| }); | ||
|
|
||
| expect(container).toBeDefined(); | ||
| }); | ||
| }); | ||
|
|
||
| describe('Table Renderer', () => { | ||
| it('should be properly registered', () => { | ||
| const validation = validateComponentRegistration('table'); |
There was a problem hiding this comment.
This PR removes the existing registration/render smoke tests for calendar-view, but the extracted plugin package doesn’t appear to add replacement coverage. Since this is a large/complex component+renderer, consider adding at least a minimal test in @object-ui/plugin-calendar-view to assert the ComponentRegistry registration and basic render with a simple schema.
Completes the extraction of complex business UI components from
@object-ui/componentsinto dedicated plugin packages. Thecalendar-viewcomponent (511 LOC, month/week/day views) doesn't belong in the core Shadcn primitives library.Changes
New Plugin Package:
@object-ui/plugin-calendar-view@object-ui/componentsimportsCore Components Cleanup
calendar-view.tsxfrompackages/components/src/ui/packages/components/src/renderers/complex/Type Safety
schema.viewsupports'agenda'but component only handles'month' | 'week' | 'day')Migration Path
Schema-based usage unchanged:
Direct imports need update:
Status
Category A (Complex Business UI) extraction complete:
chatbot→@object-ui/plugin-chatbottimeline→@object-ui/plugin-timelinecalendar-view→@object-ui/plugin-calendar-viewRemaining in core: Category B wrappers (combobox, date-picker, field, filter-builder, input-group, button-group) and Category C helpers (empty, spinner, kbd, item, toaster).
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
fonts.googleapis.com/usr/local/bin/node node /home/REDACTED/work/objectui/objectui/apps/site/node_modules/.bin/../next/dist/bin/next build basename ct/n��(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.