-
Notifications
You must be signed in to change notification settings - Fork 4
chore(script): remove unstable_ts_config flag from script #114
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
Conversation
|
Caution Review failedThe pull request is closed. 워크스루이 풀 리퀘스트는 여러 패키지의 변경 사항
제안된 리뷰어
관련될 수 있는 PR
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAttention: Patch coverage is
|
There was a problem hiding this 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
🧹 Nitpick comments (1)
packages/tooltip/src/Tooltip.tsx (1)
70-72
: 이벤트 핸들러 구현이 개선되었습니다.마우스와 클릭 이벤트 핸들러가 더 읽기 쉽게 정리되었습니다. 각 트리거 타입에 따른 조건부 처리가 명확합니다.
다만, 접근성 관점에서 한 가지 제안드립니다:
<Component ref={wrapperRef} role="tooltip" onMouseEnter={trigger === 'hover' ? () => toggleTooltip(true) : undefined} onMouseLeave={trigger === 'hover' ? () => toggleTooltip(false) : undefined} onClick={trigger === 'click' ? () => toggleTooltip(!isVisible) : undefined} onKeyDown={handleKeyDown} tabIndex={trigger === 'click' ? 0 : undefined} + aria-expanded={isVisible} className={clsx(styles.trigger, { [styles.asChild]: asChild })} >
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
packages/avatar/src/Avatar.tsx
(6 hunks)packages/tooltip/src/Tooltip.tsx
(2 hunks)
🧰 Additional context used
🪛 GitHub Check: codecov/patch
packages/avatar/src/Avatar.tsx
[warning] 78-78: packages/avatar/src/Avatar.tsx#L78
Added line #L78 was not covered by tests
🔇 Additional comments (7)
packages/tooltip/src/Tooltip.tsx (3)
51-55
: 코드 구조가 개선되었습니다!useTooltip 훅의 반환값을 한 줄로 구조 분해하여 코드가 더 간결해졌습니다.
57-57
: ref 처리가 적절합니다.useImperativeHandle을 사용하여 외부에서 wrapper 요소에 접근할 수 있도록 올바르게 구현되었습니다.
83-84
: 스타일 적용 방식이 개선되었습니다.className과 style 속성이 더 명확하게 구성되었습니다. 조건부 클래스 적용과 스타일 오버라이드가 잘 구현되어 있습니다.
packages/avatar/src/Avatar.tsx (4)
Line range hint
1-14
: 문서화가 잘 개선되었습니다!컴포넌트의 크기 옵션에 대한 상세한 설명이 추가되어 가독성이 향상되었습니다.
Line range hint
15-23
: 타입 정의와 문서화가 명확합니다.
AvatarShape
타입에 대한 문서화가 잘 되어있으며, 각 옵션의 의미가 명확하게 설명되어 있습니다.
Line range hint
25-32
: 인터페이스 정의가 적절합니다.모든 필요한 프로퍼티가 포함되어 있으며, 선택적 프로퍼티들이 올바르게 정의되어 있습니다.
Line range hint
34-61
: 테스트 커버리지 개선이 필요합니다.컴포넌트 구현은 잘 되어 있지만, 에러 처리와 폴백 로직에 대한 테스트 케이스를 추가하면 좋을 것 같습니다.
테스트 파일을 확인하고 필요한 테스트 케이스를 추가해주시겠어요?
switch (size) { | ||
case "xs": | ||
return "24px"; | ||
case "sm": | ||
return "32px"; | ||
case "md": | ||
return "40px"; | ||
case "lg": | ||
return "70px"; | ||
case "xl": | ||
return "96px"; | ||
case 'xs': | ||
return '24px'; | ||
case 'sm': | ||
return '32px'; | ||
case 'md': | ||
return '40px'; | ||
case 'lg': | ||
return '70px'; | ||
case 'xl': | ||
return '96px'; | ||
default: | ||
return "40px"; | ||
return '40px'; | ||
} | ||
} | ||
|
||
function getAvatarShape(shape: AvatarShape) { | ||
switch (shape) { | ||
case "rounded": | ||
return "4px"; | ||
case "square": | ||
return "0px"; | ||
case 'rounded': | ||
return '4px'; | ||
case 'square': | ||
return '0px'; | ||
default: | ||
return "50%"; | ||
return '50%'; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
기본값 케이스에 대한 테스트가 누락되었습니다.
getAvatarSize
함수의 기본값 케이스(line 78)에 대한 테스트 커버리지가 누락되어 있습니다.
다음과 같은 테스트 케이스를 추가해주세요:
test('getAvatarSize returns default size for invalid input', () => {
// @ts-expect-error - Testing invalid input
expect(getAvatarSize('invalid')).toBe('40px');
});
🧰 Tools
🪛 GitHub Check: codecov/patch
[warning] 78-78: packages/avatar/src/Avatar.tsx#L78
Added line #L78 was not covered by tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오예~ 👍
Changes
기존에는 unstable_ts_config라는 flag를 통해서
eslint.config.ts
사용이 가능했지만 이번 업데이트부터 stable로 변경되었습니다.Visuals
Checklist
Additional Discussion Points
Summary by CodeRabbit
Summary by CodeRabbit
개발 도구 및 설정
패키지 구성
files
배열 포맷 단일 라인으로 변경Avatar
컴포넌트의 문자열 리터럴 포맷 통일 및 문서화 개선Tooltip
컴포넌트 코드 가독성 향상 및 불필요한 코드 제거