[🎨 Design System] Setup design-system package with Storybook#1885
[🎨 Design System] Setup design-system package with Storybook#1885
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 37895c2673
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
| uses: actions/deploy-pages@v4 |
There was a problem hiding this comment.
Skip Pages deployment for fork pull requests
This workflow is triggered by pull_request events but always runs actions/deploy-pages@v4; for PRs from forks, GitHub provides a read-only token, so pages: write is not actually available and this deployment step fails. That makes design-system changes from external contributors reliably produce a failing check even when code is fine. Add a fork guard (for example, only deploy when github.event.pull_request.head.repo.full_name == github.repository) and skip deploy/comment steps for forked PRs.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
We don't accept external contributions at the moment. Will add a fork guard if/when we do.
1a1145b to
c840169
Compare
c840169 to
c8dfa04
Compare
c8dfa04 to
56ee2e3
Compare
56ee2e3 to
8544df1
Compare
163249c to
0531ae0
Compare
|
@Thunnini 클로드가 포스푸시하면서,, 엔트리 ts로 바꿔주신 커밋이 덮어졌습니다..🙏🙏 |
사용처가 apps/extension뿐이므로 build 산출물 없이 src/index.ts를 직접 참조하도록 변경. jsx를 react로 맞춰 extension과 타입체크 호환. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- figma-extract-vars.mjs: Figma Plugin API로 Primitive + Semantic 변수 추출 - sync-typography.mjs: Figma REST API로 텍스트 스타일 추출 - generate-color-ts.mjs: DSColor 통합 객체 (primitive + semantic CSS vars + theme values) 생성 - generate-typography-ts.mjs: dsTypographyTokens 생성 - sync-icons.mjs: Figma에서 아이콘 다운로드 → React 컴포넌트 직접 생성 (SVG 중간 파일 없음) - sync-all.mjs: 4-phase 트랜잭셔널 오케스트레이터 + 생성 후 prettier 자동 실행 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- DSColor: primitive + semantic CSS variable refs 통합 객체 - darkThemeValues / lightThemeValues: 테마별 CSS variable 실제 값 - Figma "Supernova Design System"에서 자동 생성된 34 solid + 25 alpha + 56 semantic 토큰 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- dsTypographyTokens: Figma에서 자동 생성된 12 size × 3 weight 토큰 - DSTypography: React 컴포넌트 (size, weight, color, as props) - styled-components 기반, DSColor와 함께 사용 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Figma Icons 페이지에서 SVG 다운로드 → React 컴포넌트 직접 변환 - DSIconProps: size, color props (currentColor 기본값) - stroke/fill의 하드코딩된 색상을 color prop으로 자동 교체 - tree-shakeable barrel export Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- DSThemeProvider: data-ds-theme 속성 + CSS variable 주입 - inject-vars: darkThemeValues/lightThemeValues → CSS stylesheet 생성 - useTheme: 현재 테마 모드 접근 hook - externalMode prop으로 기존 AppThemeProvider와 연동 가능 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- package.json: sync:tokens 스크립트, styled-components devDep 추가 - tsconfig.json: jsx, module, moduleResolution 설정 (stories 포함) - tsconfig.build.json: 빌드용 (stories 제외) - .eslintrc.json: react-in-jsx-scope off, SVG/MDX ignore - src/index.ts: color + typography + icon + theme barrel export Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove styled-components dependency from DSTypography. Use inline style object instead of transient props ($fontSize, etc). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
[🎨 Design System] DS Foundation — tokens, theme, sync scripts
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b9a33ab081
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
| uses: actions/deploy-pages@v4 |
There was a problem hiding this comment.
Avoid deploying PR builds as production Pages deployments
This job runs on pull_request and calls actions/deploy-pages@v4 without enabling preview deployment, which means the PR artifact is treated as a normal Pages deployment rather than an isolated preview. The github-pages-preview environment name alone does not switch deploy mode, so PR updates can overwrite the live Pages site URL that the repo uses for production docs/storybook. Restrict deployment to non-PR events or wire a true preview flow before posting “preview” links.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
현재는 의도적으로 PR마다 같은 Pages 사이트에 최신 Storybook을 덮어쓰는 구조입니다. 별도 production 버전은 없습니다. preview 배포 분리는 향후 개선 예정이고 티켓이 있습니다.
| { | ||
| "name": "@keplr-wallet/design-system", | ||
| "version": "0.13.17", | ||
| "main": "src/index.ts", |
There was a problem hiding this comment.
Publish compiled entrypoints for the new package
The package is configured for public publishing, but main points at src/index.ts and the build script is a no-op, so release publishing will ship raw TypeScript/TSX sources instead of a compiled JS entrypoint. In this repo’s publish flow (lerna publish from-package), that produces an npm package that breaks consumers which do not transpile TS from node_modules. Either mark the package private until it is buildable or emit build artifacts and point main (and types) to them.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
내부 전용 패키지이고 빌드 없이 소스를 직접 참조하는 구조는 의도된 설계입니다. 현재 publish 대상이 아니라 실질적 문제는 없지만 인지하고 있습니다.
Not published to npm — internal monorepo package only. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This reverts commit 59fde5e.
배경
모바일(Flutter)과 웹(React)은 개발 언어, 컴포넌트, 스타일링 방식이 모두 다릅니다. 디자인 시스템을 분리 운영하는 게 낫다고 판단하여, 익스텐션 전용으로 디자인 시스템 패키지를 별도 구성합니다.
packages/design-system/에 두면 extension에 바로 반영할 수 있고, 필요시 다른 웹 프로젝트에서도 사용할 수 있습니다.이 PR은 패키지 스캐폴딩 + Storybook 설정 + CI만 포함합니다. 컴포넌트/토큰 이동은 후속 작업입니다.
구성
packages/design-system/— Storybook 10 + Vite 기반 워크스페이스 패키지.github/workflows/deploy-storybook.yml—packages/design-system/**변경 시 GitHub Pages 자동배포 + PR 댓글GitHub Pages 활성화 필요
CI 배포(
actions/deploy-pages)가 동작하려면 레포에서 GitHub Pages를 활성화해야 합니다. @piatoss3612 @Thunnini로컬 확인
yarn workspace @keplr-wallet/design-system storybook # localhost:6007🤖 Generated with Claude Code