Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix]: Icon 컴포넌트 수정 #51

Merged
merged 3 commits into from
Jan 10, 2025
Merged

[Fix]: Icon 컴포넌트 수정 #51

merged 3 commits into from
Jan 10, 2025

Conversation

minseong0324
Copy link
Contributor

@minseong0324 minseong0324 commented Jan 10, 2025

관련 이슈

Icon 컴포넌트의 prop 타입을 export 하지 않고 있었고, 불필요한 직렬화/역직렬화 과정을 개선했어요. 그리고 조금 더 사용성이 좋도록 api를 개선했어요.

React.FC 유틸 타입을 사용하면 children이 암묵적으로 optional하게 적용될 수 있어서 변경했어요.

변경 사항

image image

레퍼런스

Summary by CodeRabbit

  • 새로운 기능

    • 아이콘 컴포넌트의 유연성 향상
    • 테마 토큰을 사용한 아이콘 색상 관리 개선
  • 개선 사항

    • 아이콘 렌더링을 위한 새로운 속성 추가 (size, type, color)
    • 접근성 향상을 위한 아리아 레이블 및 역할 속성 추가
  • 기술적 변경

    • 컴포넌트 내보내기 방식 최적화
    • TypeScript 컴파일러 설정 업데이트

Copy link

coderabbitai bot commented Jan 10, 2025

Warning

There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure.

🔧 eslint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

packages/ui/src/components/Icon/Icon.tsx

Oops! Something went wrong! :(

ESLint: 9.17.0

Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@repo/eslint-config' imported from /eslint.config.mjs
at packageResolve (node:internal/modules/esm/resolve:839:9)
at moduleResolve (node:internal/modules/esm/resolve:908:18)
at defaultResolve (node:internal/modules/esm/resolve:1038:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:557:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:525:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:246:38)
at ModuleJob._link (node:internal/modules/esm/module_job:126:49)

개요

Walkthrough

이 풀 리퀘스트는 Icon 컴포넌트의 구현 및 사용 방식을 크게 변경합니다. packages/ui/src/components/Icon/Icon.tsx 파일에서 아이콘 컴포넌트의 타입과 프로퍼티를 리팩토링하고, apps/web/src/app/page.tsx에서 새로운 아이콘 사용 패턴을 도입했습니다. 또한 tsconfig.json에 컴파일러 옵션을 추가하고 내보내기 방식을 조정했습니다.

Changes

파일 변경 요약
apps/web/src/app/page.tsx - @repo/theme에서 tokens 가져오기 추가
- Icon 컴포넌트 프로퍼티 변경 (width, heightsize)
- type 프로퍼티 도입
packages/ui/src/components/Icon/Icon.tsx - FC 타입 제거
- IconName, IconProps 타입 내보내기
- 아이콘 렌더링 로직 재작성
packages/ui/src/components/index.ts - 내보내기 방식 변경 (와일드카드 → 명시적 내보내기)
packages/ui/tsconfig.json - "rootDir": "src" 컴파일러 옵션 추가

Possibly related PRs

Suggested labels

enhancement

Suggested reviewers

  • kongnayeon

Poem

🐰 아이콘의 춤, 새로운 스타일로
크기와 타입, 토큰의 노래
코드는 춤추고 기능은 빛나네
리팩토링의 토끼, 기쁨을 노래해! 🎨


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
apps/web/src/app/page.tsx (1)

2-2: Icon 컴포넌트의 새로운 API 적용이 잘 되었습니다!

기존의 width/height 속성 대신 size prop을 사용하고, type prop을 통해 fill/stroke를 구분하는 방식으로 잘 개선되었습니다. 또한 theme token을 활용하여 color를 지정한 것도 좋은 방향입니다.

다만, 접근성 향상을 위해 aria-label 속성 추가를 고려해보시면 좋을 것 같습니다.

-      <Icon size={24} name="stack" type="stroke" />
+      <Icon size={24} name="stack" type="stroke" aria-label="스택 아이콘" />

Also applies to: 7-14

packages/ui/src/components/Icon/Icon.tsx (1)

31-42: 스타일 로직이 깔끔하게 정리되었습니다!

style 객체 구성이 명확하고, assignInlineVars를 통한 CSS 변수 할당이 잘 되어있습니다. role과 aria-label 속성도 적절히 추가되었습니다.

다만, size prop의 타입이 number | string으로 되어있는데, 단위 검증을 위해 아래와 같은 타입 가드 추가를 고려해보시면 좋을 것 같습니다:

function getSizeWithUnit(size: number | string): string {
  if (typeof size === 'number') {
    return `${size}px`;
  }
  return size;
}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2333920 and 3c44a26.

📒 Files selected for processing (4)
  • apps/web/src/app/page.tsx (1 hunks)
  • packages/ui/src/components/Icon/Icon.tsx (1 hunks)
  • packages/ui/src/components/index.ts (1 hunks)
  • packages/ui/tsconfig.json (1 hunks)
🔇 Additional comments (4)
packages/ui/src/components/index.ts (1)

2-3: 명시적인 export 구문으로의 변경이 잘 이루어졌습니다!

와일드카드 export 대신 명시적인 named export를 사용함으로써 더 명확한 public API를 제공하게 되었습니다. Icon 컴포넌트와 관련 타입들을 개별적으로 export하여 타입 안정성도 향상되었습니다.

packages/ui/src/components/Icon/Icon.tsx (2)

7-15: 타입 정의가 명확하게 개선되었습니다!

IconName과 IconProps를 export 타입으로 변경하고, 프로퍼티 구조를 단순화한 것이 좋습니다. 특히 theme token 타입과 연동하여 color 속성의 타입 안정성을 확보한 점이 인상적입니다.


17-25: 컴포넌트 구현이 더욱 견고해졌습니다!

기본값 설정과 props 구조분해할당이 잘 되어있습니다. 특히 aria-label을 지원하여 접근성을 고려한 점이 좋습니다.

packages/ui/tsconfig.json (1)

9-9: TypeScript 설정이 적절히 개선되었습니다!

rootDir를 src로 지정하여 소스 파일 구조를 명확히 한 것이 좋습니다. 이는 빌드 출력물의 구조를 더 예측 가능하게 만들어줄 것입니다.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/ui/src/components/Icon/Icon.tsx (1)

28-31: 타입 안전성을 개선할 수 있습니다.

스타일 로직이 깔끔하지만, 타입 안전성을 더 강화할 수 있습니다.

다음과 같이 개선해보세요:

  const colorStyle = {
-    ...(type !== 'stroke' && { [styles.fillColor]: color }),
-    ...(type !== 'fill' && { [styles.strokeColor]: color }),
+    ...(type === 'fill' && { [styles.fillColor]: color }),
+    ...(type === 'stroke' && { [styles.strokeColor]: color }),
  };
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3c44a26 and fcaed50.

📒 Files selected for processing (1)
  • packages/ui/src/components/Icon/Icon.tsx (1 hunks)
🔇 Additional comments (3)
packages/ui/src/components/Icon/Icon.tsx (3)

7-15: 타입 정의가 개선되었습니다!

타입 정의가 더 명확하고 재사용 가능하도록 개선되었습니다. 특히 다음 사항들이 긍정적입니다:

  • 타입 내보내기를 통한 재사용성 향상
  • typecolor 속성을 통한 유연한 스타일링
  • aria-label 추가로 접근성 개선

17-25: 기본값 설정이 적절합니다.

컴포넌트 시그니처가 개선되었습니다:

  • type, color, size에 대한 기본값 설정이 적절합니다
  • 일반 함수 선언으로 변경한 것이 코드 가독성을 높입니다

33-46: 렌더링 로직이 잘 구현되었습니다.

접근성과 스타일링이 적절히 구현되었습니다. 다만, size 속성의 타입 검증을 추가하면 좋을 것 같습니다.

size 속성의 유효성을 검증하는 로직을 추가하는 것을 고려해보세요:

const validateSize = (size: number | string) => {
  const numSize = typeof size === 'string' ? parseInt(size, 10) : size;
  return Number.isFinite(numSize) && numSize > 0 ? size : 24;
};


interface IconProps extends SVGProps<SVGSVGElement> {
export type IconProps = SVGProps<SVGSVGElement> & {
Copy link
Member

@kongnayeon kongnayeon Jan 10, 2025

Choose a reason for hiding this comment

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

interface가 아니라 type으로 쓰시는 이유가 있을까요??

Copy link
Contributor Author

Choose a reason for hiding this comment

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

IDE에서 마우스 호버 했을 때 타입이 떠요!

Copy link
Member

Choose a reason for hiding this comment

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

오잉 인터페이스도 뜨지 않나요?? 확장성 고려하면 interface로 쓰는 것이 좋다고 생각해서요...!!!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image image 요거 말씀드린거였어요!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

그리고 type 또한 & 사용하면 확장이 되지 않나요?

Copy link
Member

@kongnayeon kongnayeon Jan 10, 2025

Choose a reason for hiding this comment

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

아 저 부분 말씀하신 거군요!!!
이 글 참고해 보시면 좋을 것 같아요! 앞으로 DTO도 인터페이스를 사용해야 할 것 같아서요...!
컴포넌트 props, API request, response 관련 타입은 interface를 사용하는 게 좋지 않을까 싶어요! 미리보기 관련은 위 글에 나와 있는 Peek Type Definition을 설정해서 사용해도 좋지 않을까요??

packages/ui/src/components/Icon/Icon.tsx Show resolved Hide resolved
packages/ui/src/components/Icon/Icon.tsx Show resolved Hide resolved
size={24}
name="stack"
type="stroke"
color={tokens.colors.warning300}
Copy link
Member

Choose a reason for hiding this comment

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

요렇게 내려 주는 것보다 warning300이라는 유니온 타입으로 내려 주는 게 더 편하다고 생각하는데 이렇게 바꾸신 이유가 있을까요??

Copy link
Contributor Author

@minseong0324 minseong0324 Jan 10, 2025

Choose a reason for hiding this comment

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

의존성 관점에서 생각하면 apps/web에서도 이미 @repo/theme을 갖고 있기 때문에 문제가 되지 않고, 하나의 source에서 색상 값을 내려준다고 생각하니 오히려 더 편하다고 생각했어요.

Icon 컴포넌트 내부에서 어떻게 색상이 유니온으로 처리되는지 생각하지 않고 명시적으로 색상 주입이 가능해요!

Copy link
Member

Choose a reason for hiding this comment

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

기존 방식도 색상은 명시적으로 주입할 수 있다고 생성되어서요!! 이미 ui 패키지가 theme 패키지에 의존성을 가진 이상 매번 theme을 import 할 필요는 없다고 생각이 되긴 하는데,,, 요건 기존 방식대로 가는 건 어떨까요?

Copy link
Contributor Author

@minseong0324 minseong0324 Jan 10, 2025

Choose a reason for hiding this comment

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

제가 생각을 아예 잘못했네요..
colors의 타입을 @repo/theme tokens의 타입으로 고정시키는 것 자체가 문제였어요. string으로 열어두고 @repo/theme에서 Import해서 주입하여 자유도를 열어주는 것이 좋다고 생각이 들어요!

c1722db

Copy link
Member

Choose a reason for hiding this comment

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

기존 방식대로면 아이콘 컴포넌트 사용 시 color=''라고만 명시해도 코드 값에 대한 자동완성이 떠서 사용하기 편한데, 제시해 주신 방식에서는 Icon 컴포넌트를 사용할 때마다 theme 패키지를 임포트해서 컬러 값을 직접 넣어 주게 되어야 하는 것 같아서요!
저희는 한 서비스 내부에서 사용되는 컴포넌트를 만드는 거니까 theme에 의존해서 토큰 값만 넣도록 하는 게 개발할 때도 편하지 않을까요?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

그 점이 저는 유연하지 않다고 생각했어요..! Icon 컴포넌트 내에서 처리하게 되면 @packages/theme 이외의 색상을 넣지 못하게 되는데.. 예외적인 상황을 고려해야하지 않을까요?

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/ui/src/components/Icon/Icon.tsx (1)

36-44: size prop의 타입 검증이 필요할 수 있습니다.

현재 size prop이 number | string 타입을 허용하고 있는데, 유효한 CSS 크기 값인지 검증하는 것이 좋을 것 같습니다.

다음과 같은 유틸리티 함수를 추가하는 것을 고려해보세요:

const isValidSize = (size: number | string): boolean => {
  if (typeof size === 'number') return size > 0;
  return /^(\d+(\.\d+)?)(px|rem|em|%)?$/.test(size);
};

그리고 컴포넌트에서 다음과 같이 사용:

if (!isValidSize(size)) {
  console.warn(`Invalid size value: ${size}. Using default size: 24`);
  size = 24;
}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fcaed50 and c1722db.

📒 Files selected for processing (1)
  • packages/ui/src/components/Icon/Icon.tsx (1 hunks)
🔇 Additional comments (3)
packages/ui/src/components/Icon/Icon.tsx (3)

7-15: 타입 정의가 잘 되어있습니다!

타입과 인터페이스 선택에 대한 이전 논의를 고려했을 때, IDE 호버 기능성을 위해 type을 사용한 것이 타당해 보입니다. 또한 접근성을 위한 aria-label 속성도 잘 포함되어 있습니다.


17-25: 컴포넌트 구조가 개선되었습니다!

  • FC 타입을 제거하고 일반 함수로 변경한 것이 좋습니다
  • 기본값 설정이 잘 되어있어 사용성이 향상되었습니다
  • Props 분해가 깔끔하게 되어있습니다

28-31: 색상 처리 로직이 효율적으로 개선되었습니다!

type prop에 따라 fill과 stroke 색상을 동적으로 적용하는 로직이 매우 깔끔합니다.

@minseong0324 minseong0324 merged commit 9bf0484 into develop Jan 10, 2025
5 of 7 checks passed
kongnayeon added a commit that referenced this pull request Feb 5, 2025
* [Feat] 프로젝트 스캐폴딩 (#2)

* docs: 이슈, PR 템플릿 추가

* docs: codeoners 추가

* feat: web 앱 Next.js, React 버전 다운그레이드

* feat: eslint, tsconfig 종속성, prettier 추가

* feat: husky, lint-staged 설치

* feat: husky, lint-staged 테스트

* chore: husky, lint-staged 테스트

* chore: husky, lint-staged 테스트 2

* fix: eslint config 수정

* chore: husky, lint-staged 테스트 3

* chore: husky, lint-staged 테스트 4

* chore: husky, lint-staged 테스트 5

* feat: .nvmrc 추가

* feat: vanilla extract 설치, config 수정

* chore: web 앱 type: module 설정 제거

* chore: vanilla extract 설치, next.config.js 수정

* [Chore]: 리뷰어 선정 시 슬랙 알림 workflow 적용 (#33)

* [Chore]: ui 패키지 초기 셋팅 (#34)

* feat(packages/theme): theme 패키지를 생성해요. (#36)

* [Chore]: build ci 추가 (#38)

* feat: pnpm workspace 추가 (#42)

* [Fix]: theme, ui 패키지의 vanilla-extract 빌드 설정 수정 (#45)

* fix(apps/web, packages/theme, packages/ui): theme, ui 패키지의 vanilla-extract 빌드 설정, css 관련 수정

* chore(packages/theme, packages/ui): build 스크립트 수정

* chore(packages/theme, packages/ui): exports 수정

* chore(packages/theme, packages/ui): exports 수정

* wip

* chore(packages/theme, packages/ui): 불필요 dependency 제거

* chore(packages/theme, packages/ui): 불필요 필드 제거

* fix: 공통 패키지 루트로 끌어올리기, 패키지 버전 의존성 적용

* fix: 테스트 컴포넌트 제거

* fix: 테스트 컴포넌트 제거

* chore(apps/web): 주석처리

* chore: 빌드 테스트

* chore: 테스트용 컴포넌트 제거

---------

Co-authored-by: kangnayeon <[email protected]>

* [Feat]: theme 적용을 위한 Provider 추가 (#47)

* [Feat] Spacing 컴포넌트 추가 (#49)

* [Feat] Icon 컴포넌트 추가 (#48)

* feat(packages/ui): Icon 컴포넌트 추가

* fix(packages/ui): 아이콘 속성 camelCase로 수정

* feat(packages/ui): svg 파일 import 스크립트, svgr 플러그인 설정 추가

* feat(packages/ui): Icon 컴포넌트

* fix(packages/theme): color 뎁스 낮추기

* [Feat] Spacing 컴포넌트 추가 (#49)

* fix: resolve conflicts

* fix(packages/theme): 컬러 토큰 변경에 따른 dark, theme 토큰 변경

* fix: resolve conflicts

* chore: 주석 제거

---------

Co-authored-by: minseong <[email protected]>

* [Fix] Icon 컴포넌트 수정 (#51)

* fix(packages/ui): Icon 컴포넌트 수정

* chore(packages/ui): 색상 스타일 로직 개선

* fix(packages/ui): IconProps의 color 타입을 string으로 수정해요

* [Fix] 컬러 시스템 내의 색상만 사용할 수 있도록 Icon 컴포넌트 수정 (#53)

* fix(packages/ui): Icon 컴포넌트 수정

* chore(packages/ui): 색상 스타일 로직 개선

* fix(packages/ui): IconProps의 color 타입을 string으로 수정해요

* fix(packages/ui, apps/web): 컬러 시스템 내의 색상만 사용할 수 있도록 Icon 컴포넌트 수정

* [Fix] Spacing 컴포넌트 수정 (#54)

* fix(packages/ui): Spacing 컴포넌트 수정

* chore: name import 하도록 수정

* chore: 배럴 파일 수정

* chore: empty file 삭제

* chore(packages/theme): 색상 추가 (#56)

* [Feat] Text 컴포넌트 추가 (#57)

* feat(packages/ui): Text 컴포넌트

* feat(packages/ui): 컴파운드 객체 추가

* chore(packages/ui): TypographyType theme에서 가져오도록 수정

* fix(packages/ui): TextCompoundType 선언 시 중복되는 구문 수정

* fix(packages/ui): Compound Text 컴포넌트 선언 시 중복되는 로직 수정

* feat(packages/ui): Text 컴포넌트 사용 시 대문자 사용하도록 수정

* [Feat] Toast 컴포넌트 추가 (#52)

* chore(packages/ui): ovarlay-kit 의존성 추가

* feat(packages/ui): Toast 컴포넌트 구현

* test(apps/web): Toast 컴포넌트 사용 예시 추가

* fix(packages/ui): 접근성 개선

* chore(packages/ui): lock 파일 업데이트

* chore(packages/themes): violet 색상 추가

* chore(packages/ui): success일 경우의 색상 변경

* fix(apps/web): Providers 컴포넌트 분리, OverlayProvider 이동

* [Feat] Badge 컴포넌트 구현 (#58)

* feat(packages/ui, apps/web): Badge 컴포넌트 구현

* fix(packages/ui, apps/web): Badge 컴포넌트 수정

* chore(packages/ui): named import 변경

* [Feat] Checkbox 컴포넌트 추가 (#60)

* feat(packages/ui): 누름 상태 관리를 위한 usePress 추가

* chore(packages/ui): 체크박스 아이콘 추가

* feat(packages/ui): 체크박스 컴포넌트 추가

* chore(apps/web): 사용 예시 추가

* fix(packages/ui): 키보드 접근성 수정

* [Feat] Label 컴포넌트 구현 (#61)

* feat(packages/ui): Label 컴포넌트 구현

* chore(packages/ui): Label 컴포넌트 예시

* [Feat] Button 컴포넌트 추가 (#59)

* feat(packages/ui): Button 컴포넌트

* fix(packages/ui): Icon color 속성 없을 시 currentColor 적용되도록 수정

* chore(packages/ui): Button 컴포넌트 export

* fix(packages/ui): Button 컴포넌트 스타일

* fix(packages/ui): Icon default size 100%로 변경

* fix(packages/ui): Button 컴포넌트의 leftIcon, rightIcon prop을 leftAddon, rightAddon으로 수정

* feat(packages/ui): twincle icon 추가

* fix(packages/ui): 기존 태그의 prop을 상속 받는 경우 ComponentPropsWithoutRef 사용하도록 수정

* [Feat] Breadcrumb 컴포넌트 추가 (#62)

* chore(packages/ui): @radix-ui/react-slot 설치

* feat(packages/ui): Breadcrumb 컴포넌트 구현

* test(apps/web): 사용 예시 추가

* [Feat] px -> rem 변환 (#64)

* fix: px 단위 rem으로 변환

* fix: body font-size 1.6rem으로 지정

* [Chore] Checkbox 컴포넌트의 label fontSize 변환 (#66)

* chore(packages/ui):  Checkbox 컴포넌트의 label fontSize 변환

* chore(packages/ui): className 빈 값 string 기본값 지정

* [Feat] LottieAnimation 컴포넌트 추가 (#63)

* feat(packages/ui): 로티 파일, 생성 스크립트 추가

* feat(packages/ui): LottieAnimation 컴포넌트 추가

* fix(packages/ui): LottieAnimation 따로 export 하도록 수정, 에셋 상대경로로 수정

* fix(packages/ui): 스크립트 오타 수정

* feat(packages/ui): 코드리뷰 반영

* fix: 빌드 에러 수정

* [Feat] TextField 컴포넌트 구현 (#65)

* chore(apps/web): react-hook-form 설치

* feat(packages/ui): isNill 함수 추가

* chore(packages/ui): isNill export

* feat(packages/ui): TextField 컴포넌트 구현

* test(apps/web): 예시 추가

* fix(packages/ui): 디자인 요구사항 수정

* [Feat] 아이콘, 색상 변경 사항 반영 (#72)

* feat(packages/theme): 아이콘 변경 사항 반영

* fix(packages/ui): 누락된 아이콘 추가

* [Feat] IconButton 컴포넌트 (#68)

* [Feat] Spinner 컴포넌트 추가 (#69)

* feat(packages/ui): Spinner 컴포넌트

* feat(packages/ui): Spinner span 태그로 감싸기

* fix(packages/ui): SpinnerColorType 추가

* [�Fix]: ThemeProvider 패키지 이동, 불필요 배럴 파일 정리 (#74)

* wip

* chore(apps/web): 파일 구조 변경

* chore(packages/theme, apps/web): 배럴파일 정리 및 provider 별도 export

* chore(packages/theme): provider 별도 export

* fix(packages/theme, packages/ui): ThemeProvider 이동

* remove(apps/web): 퍼블리싱 삭제 (별도 PR 예정)

* [Feat] RadioCards 컴포넌트 추가 (#73)

* feat(packages/ui): RadioCards 관리를 위한 context 추가

* feat(packages/ui): RadioCards 컴포넌트 구현 및 JSDoc 추가

* feat(packages/ui): RadioCards 사용 예시 추가

* fix(packages/ui): RadioCards 구조 변경

* test(packages/ui): RadioCards 예시 변경

* docs(packages/ui): JSDoc 업데이트

* fix(packages/ui): 키보드 접근성 개선

* [Feat] Modal 컴포넌트 추가 (#83)

* feat(packages/ui): PortalConsumer 컴포넌트

* feat(packages/ui): PortalConsumer 컴포넌트

* feat(packages/ui): Modal로의 포커스를 위한 FocusTrap 구현

* feat(packages/ui): Modal 컴포넌트 구현 및 JSDoc 작성

* test(apps/web): Modal 컴포넌트 사용 예시 추가

* fix(packages/ui): overlay-kit에서 이미 제공하고 있으므로 PortalConsumer 제거

* [Feat] 스켈레톤 컴포넌트 (#84)

* feat(packages/ui): 스켈레톤 컴포넌트

* feat: displayName 속성 추가

* feat: 리뷰 반영

* [Fix] ui 패키지 컴포넌트 사용 시 모든 컴포넌트가 암묵적으로 import 되는 현상 (#79)

* fix(packages/ui): 아이콘 생성 스크립트 확장자 변경

* feat(packages/ui) 컴포넌트 별 배럴 파일 생성

* fix: 공통 로직 임포트 경로 수정

* fix(packages/ui): esm 방식만 지원하도록 수정

* chore: 사용되지 않는 컴포넌트 제거

* chore: 사용되지 않는 아이콘 제거

* fix(packages/ui): 사용되지 않는 플러그인 제거

* fix: 빌드 에러

* fix: 빌드 에러

* fix: 빌드 에러 수정

* feat: svgr 라이브러리 제거, 아이콘 컴포넌트 생성 스크립트 추가

* fix: build error

* fix: icon 매핑 스크립트 수정

* feat(packages/ui): 컴포넌트 전체 export 추가

* [Feat] Chip 컴포넌트 추가 (#70)

* feat(packages/ui): chip 컴포넌트

* [Feat] TextField 컴포넌트 구현 (#65)

* chore(apps/web): react-hook-form 설치

* feat(packages/ui): isNill 함수 추가

* chore(packages/ui): isNill export

* feat(packages/ui): TextField 컴포넌트 구현

* test(apps/web): 예시 추가

* fix(packages/ui): 디자인 요구사항 수정

* [Feat] 아이콘, 색상 변경 사항 반영 (#72)

* feat(packages/theme): 아이콘 변경 사항 반영

* fix(packages/ui): 누락된 아이콘 추가

* feat(packages/ui): chip 컴포넌트

* feat(packages/ui): Chip에 사용되는 아이콘 추가

* fix(packages/ui): Text 컴포넌트 color prop 없을 때 inherit으로 지정, 기본 line height 값 지정

* fix(packages/ui): Icon 컴포넌트 color 상속 시 path 태그 외의 다른 태그들도 상속 받을 수 있도록 수정

* fix(packages/ui): Chip 컴포넌트 스타일 수정

* feat: x 아이콘 color 수정

* feat: onClose 추가

* fix: x 아이콘 호버링 시 cursor pointer로 지정

* feat: 리뷰 반영

* fix(packages/ui):  closable 버튼 보이지 않는 문제

* fix: 리뷰 반영

---------

Co-authored-by: MINSEONG KIM <[email protected]>

* [Refactor] Spinner 컴포넌트 css 방식으로 변경 (#92)

* fix:(packages/ui): Spinner 컴포넌트 css 방식으로 구현

* fix(packages/ui): Button 컴포넌트 스타일 수정, isLoading 상태 스피너 추가

* [Feat] useToast 추가, DynamicLottie 컴포넌트 추가 (#89)

* [Feat]: useModal 추가 (#91)

* chore(packages/ui): overlay-kit 설치

* feat(packages/ui): useModal 추가

* test(apps/web): useModal 사용 예시 추가

* fix(packages/ui): 옵셔널로 치환

* fix(packages/ui): 자잘한 수정

* fix(packages/ui): 자잘한 수정

* docs(packages/ui): JSDoc 추가

* test(apps/web): 사용 예시 추가

* chore(packages/ui): 코드 간소화

* fix(packages/ui): 프로미스를 반환할 수 있도록 수정

* fix(packages/ui): isNil수정, isNotNill 추가, export 수정

* fix(package/ui): nullish 체크

* fix(packages/ui): 모달 doubleCTA의 각각 버튼 공간이 절반 차지하도록 수정

* test(packages/ui): 예시 수정

* chore: lock 파일 업데이트

* [Feat] ImageManager TypeA 컴포넌트 추가 (#94)

* chore(apps/web): Provider -> provider로 변경 (네이밍 컨벤션 통일)

* feat(apps/web): ImageManager TypeA 컴포넌트 구현

* chore(apps/web): 대소문자 git 이슈 해결

* chore(apps/web): baseUrl 설정

* fix(apps/web): 자잘한 수정, 접근성 개선

* chore(apps/web): 키 상수화

* fix(apps/web): 유효성 검사 수정

* chore(apps/web): 경로 수정

* [Feat] 주제 설정 페이지 퍼블리싱 및 폼 연동 (#95)

* chore(apps/web): motion 추가

* chore(packages/ui): styles export 변경

* feat(packages/theme): 색상 추가

* feat(packages/theme): spacing 추가

* feat(apps/web): KeywordChip 컴포넌트 추가

* feat(apps/web): ImageManager 컴포넌트 추가

* feat(apps/web): 주제 설정 페이지 퍼블리싱

* refactor(apps/web): 컴포넌트 분리 및 자잘한 수정

* fix(apps/web): react-hook-form watch를 통한 조건부 렌더링

* feat(apps/web): react-hook-form을 통한 폼 관리

* fix(apps/web): ImageManager 컴포넌트 packages/ui로 이동 예정

* fix(apps/web): ImageManager TypeA css 수정

* fix(apps/web): GradientAnimatedTitle로 수정

* fix(apps/web): GradientAnimatedTitle로 수정

* feat(apps/web): isEmptyStringOrNil 유틸 추가

* fix(apps/web): ImageManager TypeA 제어형으로 사용 가능하도록 변경

* refactor(apps/web): 컴포넌트 분리

* chore(apps/web): px->rem 변경

* fix(app/web): defaultValues 수정

* fix(apps/web): css 수정

* fix(apps/web): placeholder 수정

* [Feat] ky, tanstack-query 설정, presigned-url 모듈, 뉴스 카테고리 api 연동 (#97)

* fix(packages/ui): onClick 누락 수정

* fix(packages/ui): onClick 누락 수정

* feat(apps/web): 필수 항목 입력 후 홈 BreadCrumb 클릭 시 모달

* feat(apps/web): tanstack-query 셋팅

* fix(apps/web): tanstack-query 셋팅 수정

* feat(apps/web): ky 셋팅

* fix(apps/web): KeywordChipGroup 컴포넌트 수정

* feat(apps/web): 뉴스 카테고리 api 연듕

* feat(apps/web): put, patch, delete 추가

* feat(apps/web): put, patch, delete 추가

* fix(apps/web): nullish 검증

* chore(.github/workflows): env 추가

* fix(apps/web): staleTime, gcTime 수정

* fix(apps/web): 자잘한 수정

* fix(apps/web): 토큰 string으로 관리

* chore(apps/web): shared로 폴더명 변경

* feat(apps/web): presigned-url 모듈 구현 및 연동

* [Feat] 주제 설정 페이지 api 연동, 디자인 추가 반영 (#100)

* fix(apps/web): MainBreadcrumbItem 이미지 수정

* fix(apps/web): suspense 래핑

* remove(apps/web): 불필요 코드 제거

* feat(apps/web): 스크롤 감지 훅 추가

* feat(apps/web): 반투명 NavBar 추가

* fix(apps/web): 스타일링 수정

* fix(apps/web): 스타일링 수정

* fix(apps/web): ImageManager TypeA가 File이 아닌 이미지의 url로 받도록 수정

* feat(apps/web): 공통 타입 분리

* feat(apps/web): 게시물 그룹 및 게시물 생성 API 연동

* feat(apps/web): ImageManager TypeA 최적화 및 UI만 그리도록 관심사 분리

* fix: Images 폴더명을 images로 수정

* fix(apps/web): 자잘한 수정

* fix(apps/web): 자잘한 수정

* fix(apps/web): 타입 개선

* fix(apps/web): ImageManager 단일로 관리

* [Feat] Accordion 컴포넌트 (#99)

* fix(packages/ui): Chip 컴포넌트 개별 export

* feat(packages/ui): Accordion 컴포넌트

* chore: Accordion 컴포넌트 예시 추가

* chore(packages/ui): displayName 추가

* fix: 코드리뷰 반영

* fix: resolve conflicts

* [Fix] 컴포넌트 스타일 수정 (#102)

* fix: 폴더명 Images를 images로 변경

* fix(apps/web): 간단한 레이아웃 수정

* fix(apps/web): NavBar 레이아웃 수정

* fix(packages/ui, apps/web): TextField 레이아웃 깨짐 수정

* fix(packages/ui): Checkbox width 수정

* docs(packages/ui): TextField JSDoc 수정

* [Feat]  결과 수정 - 상세 페이지 퍼블리싱 (#86)

* feat(apps/web): ContentItem 컴포넌트

* feat(apps/web): getMinutesAgo 유틸 함수 추가

* feat(apps/web): ContentItem 컴포넌트

* fix(packages/ui): Chip 컴포넌트 개별 export

* feat(packages/ui): Accordion 컴포넌트

* chore: Accordion 컴포넌트 예시 추가

* feat(apps/web): EditSidebar 추가

* feat(packages/ui): 아이콘 에셋  추가

* fix(apps/web): getMinutesAgo 함수 getTimesAgo 함수로 수정

* fix(packages/ui): IconButton 컴포넌트 props에서 type도 받도록 수정

* fix(apps/web): ContentItem 컴포넌트 디자인 수정 반영

* feat(apps/web): PostEditor 추가

* feat(apps/web): EditPromptField 추가

* feat(apps/web) EditPost 영역 추가

* feat(apps/web): ContentItem 컴포넌트

* chore: Accordion 컴포넌트 예시 추가

* fix: resolve conflicts

* fix: resolve conflicts

* fix: 빌드 에러

* fix: 빌드 에러

* fix(apps/web): TextField 수정 반영

* fix(packages/ui): Accordion 컴포넌트 스타일 수정

* [Feat] vercel 자동 배포 빌드 스크립트 (#105)

---------

Co-authored-by: MINSEONG KIM <[email protected]>
Co-authored-by: minseong <[email protected]>
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