Skip to content

Modernize shadcn/ui components (data-slot + ref-as-prop) & improve example sidebar - #125

Merged
0plan merged 1 commit into
mainfrom
claude/keen-euler-uhuaho
Jun 19, 2026
Merged

0plan merged 1 commit into
mainfrom
claude/keen-euler-uhuaho

Conversation

@0plan

@0plan 0plan commented Jun 19, 2026

Copy link
Copy Markdown
Owner

개요 / Summary

shadcn/ui 컴포넌트를 최신 컨벤션으로 현행화하고, 예제 페이지의 sidebar를 개선했습니다.

⚠️ 이 환경의 egress 정책이 ui.shadcn.com을 차단(HTTP 403)하여 shadcn CLI 자동 업데이트가 불가합니다. 그래서 최신 레지스트리 컨벤션에 맞춰 직접 현행화했습니다.

1) 컴포넌트 현행화 (40개)

  • forwardRef → 함수 컴포넌트(React 19 ref-as-prop) 전환 + data-slot 속성 추가. React.ElementRef/ComponentPropsWithoutRef/displayName 보일러플레이트 제거.
  • 동작/스타일 100% 보존: 모든 className·cva variant·export·로직 유지 (커스텀 Sheet size variant, recharts v3 chart 타입, carousel embla ref, form useFormField, sidebar 키보드 단축키 등 포함).
  • 6개 병렬 에이전트 + sidebar 전담 에이전트로 작업, 정밀 스펙(dialog before→after 예시) 제공.
  • 버그 수정: ButtonProps export 제거에 맞춰 pagination을 React.ComponentProps<typeof Button> 사용으로 수정.

2) 예제 Sidebar 개선

  • 단일 데모 그룹 → 평면 링크, 멀티 데모 그룹(Input/Toast/Typography 등 9개) → 접이식 섹션(활성 경로/검색 시 자동 펼침).
  • 검색 빈 상태("결과가 없습니다") 추가.
  • 푸터에 테마·언어·GitHub 액션 추가 (헤더와 일관).
  • sidebar chrome + breadcrumb "Home"을 i18n(en/ko, parity 유지).

검증

Check Result
잔여 forwardRef ✅ 0
data-slot 적용 컴포넌트 ✅ 40
pnpm tsc ✅ 0 errors
pnpm lint ✅ 0 errors
pnpm test ✅ 7 passed
pnpm build
i18n en/ko parity ✅ 일치
dev 예제 라우트 렌더 ✅ HTTP 200 (dialog/sheet/select/chart/carousel/sidebar 등)

현행화는 구조(data-slot + ref-as-prop) 중심입니다. 클래스/스타일은 그대로 보존했고(의존성은 이미 최신), 헤드리스 브라우저가 없어 시각 스크린샷은 첨부하지 못했습니다.

🤖 Generated with Claude Code

https://claude.ai/code/session_017oJ9xs9iSZN3ahQ6hKsh3u


Generated by Claude Code

The shadcn registry/CLI is unreachable from this environment, so the
components were brought up to the latest shadcn conventions by hand.

- Convert all 40 forwardRef UI components to plain function components
  using React 19's ref-as-prop, and add data-slot attributes throughout
  (drops React.ElementRef/ComponentPropsWithoutRef + displayName
  boilerplate). Classes, cva variants, exports and behavior are preserved
  (incl. the custom Sheet size variant and the recharts-v3 chart types).
- Fix pagination to use React.ComponentProps<typeof Button> now that
  button.tsx no longer exports ButtonProps.
- Rework the example AppSidebar: single-demo groups render as flat links,
  multi-demo groups become collapsible sections that auto-open when active
  or while searching; add a search empty-state and a footer with
  theme/language/GitHub actions.
- i18n the sidebar chrome + the example breadcrumb "Home" (en + ko, parity
  preserved).

Verified: 0 forwardRef remain, 40 data-slot, tsc 0 errors, lint 0 errors,
tests 7/7, build + dev OK, i18n parity intact.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017oJ9xs9iSZN3ahQ6hKsh3u
@vercel

vercel Bot commented Jun 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
vite-react-typescript-i18n-template Ready Ready Preview, Comment Jun 19, 2026 2:35am

@0plan
0plan merged commit 497216d into main Jun 19, 2026
7 checks passed

This branch was successfully deployed

1 active deployment
Preview 7fd997ed Deployed Jun 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants