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

[FEAT] Color 추가 #26

Merged
merged 4 commits into from
Oct 25, 2024
Merged

[FEAT] Color 추가 #26

merged 4 commits into from
Oct 25, 2024

Conversation

keemsebin
Copy link
Member

@keemsebin keemsebin commented Oct 25, 2024

관련 이슈

close #24

📑 작업 내용

  • Color 추가하고, 기존 적용된 Color도 변경했습니다!

💬 리뷰 중점 사항/기타 참고 사항

Summary by CodeRabbit

  • 새로운 기능
    • 버튼 및 입력 필드의 스타일이 업데이트되어 시각적 피드백이 향상되었습니다.
  • 버그 수정
    • 마커 컴포넌트의 아이콘 크기 및 위치 로직이 간소화되었습니다.
  • 스타일
    • 버튼의 기본 및 호버 상태 스타일 변경.
    • 입력 필드의 배경색 및 포커스 아웃라인 색상 변경.
    • 색상 테마에서 회색 계열 값 업데이트.

@keemsebin keemsebin added the feat 기능 label Oct 25, 2024
@keemsebin keemsebin self-assigned this Oct 25, 2024
@keemsebin keemsebin requested a review from houony as a code owner October 25, 2024 18:40
Copy link

coderabbitai bot commented Oct 25, 2024

Walkthrough

이 변경 사항은 여러 컴포넌트의 스타일을 수정하는 내용을 포함합니다. Button 컴포넌트의 primarygray 변형의 스타일이 조정되었으며, Input 컴포넌트의 배경색과 포커스 아웃라인 색상이 변경되었습니다. Marker 컴포넌트의 아이콘 크기와 위치 결정 로직이 간소화되었고, 색상 테마의 gray 속성 값이 업데이트되었습니다.

Changes

파일 경로 변경 요약
src/components/common/Button/Button.variants.ts primarygray 변형의 스타일 수정, primary 변형에 호버 상태 추가, gray 변형 배경색 변경
src/components/common/Input/index.tsx 입력 필드의 배경색과 포커스 아웃라인 색상 변경
src/components/common/Marker/index.tsx 아이콘 크기 및 위치 결정 로직 간소화, ICON_SIZE 수정, ICON_POSITIONS 객체 제거
src/styles/theme/colors.ts gray 속성의 값 변경 및 새로운 gray[150] 추가

Assessment against linked issues

Objective Addressed Explanation
color 추가 (#24)

Possibly related PRs

Suggested reviewers

  • houony

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 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 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.

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

Update: 2024년 10월 26일 03시 41분 26초
Storybook 미리보기: https://6709628f8a6eec04b29d4f39-rcamlsgerd.chromatic.com/

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: 1

🧹 Outside diff range and nitpick comments (2)
src/styles/theme/colors.ts (1)

8-10: 색상 사용에 대한 문서화를 추가하는 것이 좋겠습니다.

각 그레이 스케일 값의 용도와 적용 가이드라인을 주석으로 추가하면 다른 개발자들이 더 쉽게 이해하고 활용할 수 있을 것 같습니다.

다음과 같이 주석을 추가하는 것을 제안합니다:

 gray: {
+    // 배경색, 비활성 상태의 엘리먼트에 사용
+    // 입력 필드, 경계선에 사용
+    // 버튼, 구분선에 사용
src/components/common/Button/Button.variants.ts (1)

Line range hint 3-3: TODO 주석에 대한 작업이 필요합니다.

hover와 disabled 상태의 색상 추가에 대한 TODO 주석이 있습니다. 현재 구현에서는 이미 hover와 disabled 상태가 추가되어 있으므로, 이 주석을 제거하거나 추가로 필요한 작업이 있다면 명확히 기술해주세요.

추가 작업이 필요하시다면 도움을 드릴 수 있습니다. GitHub 이슈를 생성해드릴까요?

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between baa6362 and 97b284a.

⛔ Files ignored due to path filters (1)
  • src/assets/icons/marker.svg is excluded by !**/*.svg
📒 Files selected for processing (4)
  • src/components/common/Button/Button.variants.ts (1 hunks)
  • src/components/common/Input/index.tsx (1 hunks)
  • src/components/common/Marker/index.tsx (1 hunks)
  • src/styles/theme/colors.ts (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • src/components/common/Input/index.tsx
🔇 Additional comments (5)
src/styles/theme/colors.ts (1)

8-10: 그레이 스케일 값의 변경이 적절해 보입니다.

그레이 스케일의 단계가 더 세분화되어 디자인 시스템의 유연성이 향상되었습니다. 기존 색상값들의 논리적인 진행이 잘 유지되었습니다.

src/components/common/Marker/index.tsx (3)

11-12: 상대적 위치 지정으로 인한 레이아웃 안정성 향상

relative 클래스를 추가하여 마커의 위치 지정 방식을 개선한 것은 좋은 변경입니다. 이는 레이아웃의 안정성을 향상시킬 것으로 예상됩니다.


13-16: 아이콘 위치 하드코딩에 대한 유연성 검토 필요

이전의 동적 위치 결정 로직을 제거하고 하드코딩된 위치값을 사용하는 것이 유연성을 저해할 수 있습니다. 다양한 카테고리에 따라 다른 위치가 필요한 경우를 고려해야 할 수 있습니다.

#!/bin/bash
# 카테고리별 특별한 위치 지정이 필요한지 확인
rg "categoryName" src/

또한, 반응형 디자인 관점에서 하드코딩된 45% 값이 모든 화면 크기에서 적절한지 검토가 필요합니다.


7-7: 아이콘 크기 변경이 디자인 일관성에 미치는 영향 검토 필요

아이콘 크기를 35에서 30으로 줄이는 것이 전체적인 디자인 시스템의 일관성과 사용자 경험에 영향을 미칠 수 있습니다. 이 변경이 디자인 가이드라인과 일치하는지 확인해주세요.

✅ Verification successful

아이콘 크기 변경은 디자인 시스템과 일치합니다

검증 결과, Icon 컴포넌트의 기본 크기가 30px로 설정되어 있어 Marker 컴포넌트의 ICON_SIZE를 30px로 변경한 것은 디자인 시스템의 일관성을 개선하는 변경입니다. 이는 다음과 같은 이유로 적절합니다:

  • Icon 컴포넌트의 기본 크기(size = 30)와 일치하여 디자인 일관성 확보
  • 다른 컴포넌트들의 아이콘 사용 패턴과 조화를 이룸
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# 다른 컴포넌트에서 사용되는 아이콘 크기 확인
rg -l "size=" src/components/

Length of output: 797


Script:

#!/bin/bash
# 아이콘 크기 관련 상수 및 속성 검색
rg -g "*.{tsx,ts,js,jsx}" "size.*=.*\d+" src/components/

# MarkerIcon 컴포넌트 사용 검색
rg -g "*.{tsx,ts,js,jsx}" "MarkerIcon" src/components/

# 디자인 시스템 관련 상수 검색
rg -g "*.{tsx,ts,js,jsx}" "(ICON|icon).*SIZE" src/

Length of output: 867

src/components/common/Button/Button.variants.ts (1)

11-11: gray 변형의 스타일 변경이 적절해 보입니다.

gray-150 클래스를 사용하여 배경색을 변경하고, hover 상태를 추가한 것이 디자인 시스템과 잘 어울립니다.

Comment on lines +9 to +10
primary:
'bg-primary text-white hover:bg-[#FF3131] disabled:opacity-50 disabled:cursor-not-allowed',
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

하드코딩된 색상값을 테마 토큰으로 변경해주세요.

hover 상태의 색상값이 직접 하드코딩되어 있습니다. 테마 시스템의 일관성을 위해 색상 토큰을 사용하는 것이 좋습니다.

다음과 같이 수정해주세요:

-'bg-primary text-white hover:bg-[#FF3131] disabled:opacity-50 disabled:cursor-not-allowed',
+'bg-primary text-white hover:bg-primary-dark disabled:opacity-50 disabled:cursor-not-allowed',
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
primary:
'bg-primary text-white hover:bg-[#FF3131] disabled:opacity-50 disabled:cursor-not-allowed',
primary:
'bg-primary text-white hover:bg-primary-dark disabled:opacity-50 disabled:cursor-not-allowed',

@keemsebin keemsebin merged commit 1687b88 into main Oct 25, 2024
5 checks passed
@keemsebin keemsebin deleted the feat/#24-color branch October 25, 2024 18:52
@coderabbitai coderabbitai bot mentioned this pull request Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat 기능
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] color 추가
2 participants