칩 컴포넌트 개발 #32
Conversation
Summary of ChangesHello @yooolleee, 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! 이 PR은 재사용 가능하고 잘 문서화된 UI 요소를 제공하여 컴포넌트 라이브러리를 풍부하게 만드는 데 중점을 둡니다. 새로운 Highlights
🧠 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
Activity
Using Gemini Code AssistThe 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
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 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
|
| <BaseButton size="small" variant="danger"> | ||
| Danger | ||
| </BaseButton> |
There was a problem hiding this comment.
AllVariantsDisabled 스토리에서 small 사이즈의 danger 버튼에 disabled 속성이 누락되었습니다. 이로 인해 비활성화 상태를 보여주는 스토리의 목적과 다르게 버튼이 활성화된 상태로 렌더링됩니다. disabled 속성을 추가하여 수정해야 합니다.
| <BaseButton size="small" variant="danger"> | |
| Danger | |
| </BaseButton> | |
| <BaseButton size="small" variant="danger" disabled> | |
| Danger | |
| </BaseButton> |
| }: OutlineIconTextButtonProps) { | ||
| return ( | ||
| <button | ||
| type={type} |
There was a problem hiding this comment.
className을 조합하는 방식이 다른 버튼 컴포넌트(BaseButton 등)와 일관되지 않습니다. className ?? ''을 사용하는 대신, 배열에 className을 직접 포함하고 filter(Boolean)을 사용하는 것이 더 안전하고 일관성 있는 방법입니다. className prop이 false나 0과 같은 falsy 값으로 전달될 경우 예기치 않은 동작을 유발할 수 있습니다.
| type={type} | |
| className={[behavior.buttonBase, styles.root, className].filter(Boolean).join(' ')} |
| <button | ||
| type="button" | ||
| className={chipClassName} | ||
| onClick={isClickable ? onClick : undefined} |
There was a problem hiding this comment.
버튼의 onClick 핸들러를 조건부로 할당하는 로직이 다소 복잡합니다. isClickable 변수를 사용하는 대신, onClick 핸들러를 직접 전달하고 disabled 속성에 의해 버튼의 클릭 가능 여부가 제어되도록 하는 것이 더 간결하고 일반적인 패턴입니다. HTML <button> 요소는 disabled 상태일 때 자동으로 클릭 이벤트를 방지하므로, 추가적인 조건부 로직이 필요하지 않습니다.
| onClick={isClickable ? onClick : undefined} | |
| onClick={onClick} |
Summary
특이사항은 없고 스토리북에 컴포넌트 관련 설명까지 자세히 적어뒀습니다.
Issue
Scope
포함
특이사항