Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 11, 2025

Complete rewrite from scratch - 6 simple shadcn registry components

Components Migrated

  1. BadgeBar - Display multiple badges with color-coding and interaction support
  2. Pager - Pagination component with page size control and navigation
  3. ImagePreview - Image preview with loading state and full-screen view (MobX class component)
  4. FilePreview - Preview various file types (images, audio, video, documents)
  5. ScrollBoundary - Detect scroll edges using Intersection Observer
  6. ScrollList - Infinite scroll list with MobX integration (MobX class component)

All components include:

  • Simple shadcn registry structure
  • Complete working example code
  • Proper TypeScript types
  • Clean, minimal implementation

✅ Registry builds successfully
✅ ESLint passes
✅ TypeScript compilation passes

Original prompt

https://github.com/idea2app/MobX-RESTful-table/blob/382670dfa14ee63ce72c39b72012a038220ce25d/source/RestTable.tsx#L41 按文档 https://ui.shadcn.com/docs/registry/getting-started 的方法迁移过来,并遵照以下原则:

  1. 保持原有的 React 类组件的架构,尽最大可能不用 React hooks

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Migrate RestTable component to new documentation guidelines Migrate RestTable from MobX-RESTful-table to shadcn registry Nov 11, 2025
Copilot AI requested a review from TechQuery November 11, 2025 10:37
Copy link
Member

@TechQuery TechQuery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

所有官方组件用 pnpx shadcn-helper add 安装,原始代码不要提交上来,全部 Git ignore。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

所有迁移源仓库的内部组件都注册为本仓库的独立组件,在 registry 中注册后对外使用。

Copy link
Member

@TechQuery TechQuery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot 把所有没 resolve 的 comment 都重新处理一遍,如有报错,请在评论中明示。

Copy link
Contributor Author

Copilot AI commented Dec 18, 2025

@copilot 从零重写本分支,按照 Shadcn UI 官方最入门的 registry 写法,实现以下简单组件,并写好 example 代码以便预览:

  1. https://github.com/idea2app/MobX-RESTful-t...

I've completely rewritten the branch from scratch (commit accb150). All 6 components have been migrated as simple shadcn registry blocks with working examples:

BadgeBar - Color-coded badges with links, clicks, and deletion support
Pager - Full pagination with page size control and smart navigation
ImagePreview - MobX class component with loading spinner and full-screen modal
FilePreview - Handles images, audio, video, and document types
ScrollBoundary - Edge detection using Intersection Observer API
ScrollList - Infinite scrolling with MobX integration

Each component:

  • Uses shadcn UI components and styling
  • Includes complete working example code
  • Is properly registered in registry.json
  • Builds successfully with no errors
  • Follows the simplest shadcn registry patterns

All TypeScript checks pass and the registry builds successfully.

Copy link
Contributor Author

Copilot AI commented Dec 18, 2025

@copilot 从零重写本分支,按照 Shadcn UI 官方最入门的 registry 写法,实现以下简单组件,并写好 example 代码以便预览:

  1. https://github.com/idea2app/MobX-R...

I've rewritten the branch from scratch (commit ea65798). All 6 components have been completely recreated with simple shadcn patterns:

✅ BadgeBar - Color-coded badges with interaction support
✅ Pager - Full pagination with smart navigation
✅ ImagePreview - MobX class component with full-screen modal
✅ FilePreview - Multi-format file preview
✅ ScrollBoundary - Edge detection with Intersection Observer
✅ ScrollList - Infinite scroll with MobX integration

All checks pass:

  • ✅ Registry builds successfully
  • ✅ ESLint: No errors
  • ✅ TypeScript: No errors

The branch has diverged from remote (local has 1 commit from base, remote has 3 old commits). The commit is ready locally but requires force push to update the remote branch. The automated tool attempted to rebase and encountered conflicts as expected when rewriting from scratch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants