Skip to content

refactor: React 일관성 개선 및 baseframe 코드 품질 향상#89

Open
ohprettyhak wants to merge 4 commits intowipfrom
refactor/react-consistency
Open

refactor: React 일관성 개선 및 baseframe 코드 품질 향상#89
ohprettyhak wants to merge 4 commits intowipfrom
refactor/react-consistency

Conversation

@ohprettyhak
Copy link
Contributor

Summary

  • React 컴포넌트 네이밍 일관성 개선 (clsx alias cxcn, helper function prefix 제거)
  • Storybook/Website에 biome 활성화
  • Tabler Icons 기반 아이콘 업데이트
  • Baseframe CLI 코드 품질 개선:
    • createVarName 중복 제거 → 공유 유틸로 추출
    • 미사용 validateValue 래퍼 함수 제거
    • 데드코드 $number.1 spacing 핵 제거
    • generate 스크립트 추가 (ds prefix)로 token.css 자동 생성 자동화
    • semantic color.yaml 토큰 참조 수정 (dot → hyphen 표기)
    • primitive/font-weight.yaml 추가 및 package.json 파일 glob 업데이트

Test plan

  • pnpm build (ecosystem/baseframe) 성공
  • pnpm generate--ds- prefix 포함 token.css 생성 확인
  • pnpm typecheck 통과
  • Website 빌드 (Next.js + Tailwind CSS 4) 성공
  • Storybook 빌드 성공

🤖 Generated with Claude Code

ohprettyhak and others added 4 commits February 13, 2026 03:12
…ebsite

- Export BadgeSize, BadgeVariant, SelectSize types for external consumption
- Rename QuantityStatusProps → StockQuantityStatusProps for naming consistency
- Make internal getColor helper private in StockQuantityStatus
- Simplify Tab.tsx by removing unnecessary forwardRef wrappers
- Standardize clsx import alias (clsx as cx) in Badge
- Replace `as any` casts with `satisfies ButtonVariant[]` in Button stories
- Fix operator precedence bug in Icons.stories.tsx icon filtering
- Use color string as key instead of array index in Icons.stories.tsx
- Remove biome exclusions for storybook/stories files from biome.json
- Fix all biome formatting and import ordering in storybook/website files
- Add justified biome-ignore for fixed-count OTP input array keys

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Standardize the clsx import alias from `cx` to `cn` in all 18 component
files for naming consistency. Resolve naming collision in Button.tsx by
renaming the local className variable to `buttonClassName`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Align Switch.tsx helper naming with codebase convention:
getSwitchWidth → getWidth, getSwitchHeight → getHeight

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Extract shared createVarName to utils/css.ts eliminating duplication
  in css-vars.ts and tailwind.ts
- Remove unused validateValue wrapper in validate.ts (direct parseValue)
- Remove dead $number.1 spacing hack in tailwind builder
- Add generate script with ds prefix for automated token.css output
- Fix semantic color.yaml token refs (dot to hyphen notation)
- Add primitive/font-weight.yaml and update package.json file globs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Feb 13, 2026

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

Project Deployment Actions Updated (UTC)
cocso-ui Ready Ready Preview, Comment Feb 13, 2026 3:09am
cocso-ui-storybook Ready Ready Preview, Comment Feb 13, 2026 3:09am

Request Review

@changeset-bot
Copy link

changeset-bot bot commented Feb 13, 2026

⚠️ No Changeset found

Latest commit: b0061a5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link

coderabbitai bot commented Feb 13, 2026

Important

Review skipped

Too many files!

This PR contains 157 files, which is 7 over the limit of 150.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/react-consistency

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @ohprettyhak, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 Pull Request는 React 컴포넌트의 일관성을 개선하고, 디자인 시스템 CLI인 Baseframe의 코드 품질을 향상하며, Storybook 및 Website 문서화를 대폭 강화하는 것을 목표로 합니다. clsx 유틸리티의 alias 변경, Biome 린터 활성화, 디자인 토큰 관리 개선, 그리고 다양한 컴포넌트에 대한 상세한 문서 추가를 통해 전반적인 개발 경험과 코드 유지보수성을 높였습니다.

Highlights

  • React 컴포넌트 일관성 개선: React 컴포넌트 전반에 걸쳐 clsx 유틸리티의 alias를 cx에서 cn으로 변경하고, 헬퍼 함수 접두사를 제거하여 네이밍 일관성을 확보했습니다.
  • Biome 린터 활성화: Storybook 및 Website 프로젝트에 Biome 린터를 활성화하여 코드 스타일 및 품질을 일관되게 관리하도록 설정했습니다.
  • 디자인 토큰 시스템 개선: Baseframe CLI의 코드 품질을 향상시키기 위해 createVarName 유틸리티의 중복을 제거하고, 미사용 validateValue 함수 및 $number.1 spacing 데드 코드를 삭제했습니다. 또한, generate 스크립트를 추가하여 ds 접두사를 사용하는 token.css 파일의 자동 생성을 자동화했습니다.
  • 시맨틱 컬러 토큰 참조 방식 변경 및 폰트 토큰 추가: semantic/color.yaml 파일에서 토큰 참조 방식을 dot 표기법에서 hyphen 표기법으로 변경하여 일관성을 높였으며, primitive/font-weight.yaml 파일을 새로 추가하여 폰트 굵기 관련 디자인 토큰을 정의했습니다.
  • Website 문서화 대폭 강화: Accordion, Badge, Checkbox, Day Picker 등 다수의 새로운 컴포넌트 문서를 추가하고 기존 문서를 상세화하여 사용자 가이드를 풍부하게 만들었습니다.
  • 종속성 관리 및 개발 환경 업데이트: pnpm-workspace.yamlcatalogs를 도입하여 종속성 관리를 중앙화하고, Biome, Changeset, Turbo, TypeScript 등 주요 개발 종속성을 최신 버전으로 업데이트했습니다.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • 디자인 토큰 시스템 개선
    • generate 스크립트를 추가하여 ds 접두사를 사용하는 token.css 파일의 자동 생성을 자동화했습니다.
    • semantic/color.yaml 파일에서 토큰 참조 방식을 dot 표기법에서 hyphen 표기법으로 변경하여 일관성을 높였습니다.
    • primitive/font-weight.yaml 파일을 새로 추가하여 폰트 굵기 관련 디자인 토큰을 정의했습니다.
  • 문서화 및 개발 환경 강화
    • Website에 Accordion, Badge, Checkbox, Day Picker, Dropdown, Link, Modal, Month Picker, One Time Password Field, Pagination, Popover, Radio Group, Select, Spinner, Stock Quantity Status, Switch, Tab, Toast, Typography 등 다수의 새로운 컴포넌트 문서를 추가하고 기존 문서를 상세화했습니다.
    • Website의 전반적인 레이아웃 및 스타일링을 개선하고, 새로운 폰트(GeistMono, Pretendard)를 통합했습니다.
    • pnpm-workspace.yamlcatalogs를 도입하여 종속성 관리를 중앙화하고, 주요 개발 종속성(Biome, Changeset, Turbo, TypeScript 등)을 최신 버전으로 업데이트했습니다.
    • check-typestypecheck 스크립트를 추가하여 타입 검증 프로세스를 강화했습니다.
  • 전반적인 코드 품질 및 일관성 개선
    • clsx alias를 cx에서 cn으로 변경하여 React 컴포넌트 전반의 네이밍 일관성을 확보했습니다.
    • Baseframe CLI에서 createVarName 유틸리티의 중복을 제거하고, 미사용 validateValue 래퍼 함수 및 $number.1 spacing 데드 코드를 삭제하여 코드 베이스를 간소화했습니다.
    • Storybook 및 Website 프로젝트에 Biome 린터를 활성화하여 코드 스타일 및 품질을 일관되게 관리합니다.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/ci.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

이 PR은 모노레포 전반에 걸쳐 코드 품질, 일관성, 문서를 크게 향상시키는 훌륭하고 광범위한 리팩터링입니다. 주요 개선 사항은 다음과 같습니다:

  • 일관된 코드 스타일과 품질 검사를 위해 biome을 도입했습니다.
  • 더 나은 의존성 관리를 위해 pnpm catalogs를 활용했습니다.
  • 중복과 데드 코드를 제거하여 baseframe CLI를 더 견고하고 유지보수하기 쉽게 리팩터링했습니다.
  • Tailwind CSS 4를 사용한 새로운 컴포넌트 페이지와 현대적인 디자인 시스템으로 문서 웹사이트를 대대적으로 개편했습니다.
  • clsxcn을 사용하는 것을 표준화하고 Tab 컴포넌트를 리팩터링하는 등 React 컴포넌트의 일관성과 가독성을 개선했습니다.

변경 사항은 구조가 잘 잡혀 있으며 설명에 명시된 목표와 명확하게 일치합니다. 몇 가지 사소한 개선 제안이 있습니다. 훌륭한 작업입니다!

Comment on lines +30 to 32
<Typography className="mt-1" color={colors.textSecondary} weight="medium">
{page.data.description}
</Typography>
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

부모 컴포넌트인 <Section>이 자식 요소들의 간격을 gap-4로 관리하도록 변경되었습니다. 따라서 이 Typography 컴포넌트의 mt-1 클래스는 더 이상 필요하지 않으며, 일관된 간격 유지를 위해 제거하는 것이 좋습니다.

Suggested change
<Typography className="mt-1" color={colors.textSecondary} weight="medium">
{page.data.description}
</Typography>
<Typography color={colors.textSecondary} weight="medium">
{page.data.description}
</Typography>

Comment on lines +15 to +18
export const PageNavigation = () => {
const pathname = usePathname();
const pages = Object.values(sidebar).flatMap((section): readonly Page[] => section.items);
const currentIndex = pages.findIndex(page => page.url === pathname);
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

pages 배열은 sidebar 상수를 기반으로 계산됩니다. 이 계산은 PageNavigation 컴포넌트가 렌더링될 때마다 수행됩니다. sidebar는 변경되지 않는 상수이므로, 이 계산을 컴포넌트 외부로 이동하여 렌더링 시마다 불필요한 재계산을 피하고 성능을 개선할 수 있습니다.

Suggested change
export const PageNavigation = () => {
const pathname = usePathname();
const pages = Object.values(sidebar).flatMap((section): readonly Page[] => section.items);
const currentIndex = pages.findIndex(page => page.url === pathname);
const pages = Object.values(sidebar).flatMap((section): readonly Page[] => section.items);
export const PageNavigation = () => {
const pathname = usePathname();
const currentIndex = pages.findIndex(page => page.url === pathname);

@ohprettyhak ohprettyhak changed the base branch from main to wip February 13, 2026 06:58
@ohprettyhak
Copy link
Contributor Author

@sisyphus-dev-ai review

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.

1 participant