디자인 시스템 피그마 코멘트 반영, HACK 주석 해소#62
Conversation
radius 변경
📝 관련 이슈 |
|
Warning Review limit reached
More reviews will be available in 35 minutes and 32 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 Walkthrough전체 요약이 PR은 설계 시스템의 변경 사항Chip 컴포넌트 도입 및 마이그레이션
Input 컴포넌트 헬프 텍스트 기능
설계 토큰 일관성 업데이트
관련 PR
시
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/shared/design-system/ui/Chip/Chip.stories.tsx (1)
61-83:⚠️ Potential issue | 🟠 Major | ⚡ Quick winAsButton 스토리에서
variant="disabled"+onClick조합을 제거해주세요.
AsButton스토리가 모든 variant(disabled 포함)에 대해onClick핸들러를 추가하고 있습니다(line 76).variant="disabled"인 칩이 클릭 가능한 것은 접근성 안티패턴입니다. 사용자는 시각적으로 비활성화된 요소가 상호작용할 수 없다고 기대하기 때문입니다.Storybook 스토리는 개발자들이 참고하는 문서 역할을 하므로, 올바른 사용 패턴만 보여주는 것이 중요합니다.
[accessibility]
🛡️ 수정 제안: disabled variant를 AsButton 스토리에서 제외
export const AsButton: Story = { render: () => ( <div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}> {SIZES.map((size) => ( <div key={size} style={{ display: 'flex', gap: 8, alignItems: 'center' }} > <span style={{ width: 16, fontSize: 12 }}>{size}</span> - {VARIANTS.map((variant) => ( + {VARIANTS.filter(v => v !== 'disabled').map((variant) => ( <Chip key={variant} variant={variant} size={size} label="김모또" onClick={() => alert(`${variant} 클릭`)} /> ))} </div> ))} </div> ), };🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/shared/design-system/ui/Chip/Chip.stories.tsx` around lines 61 - 83, The AsButton story is assigning onClick to every variant including variant="disabled", which is an accessibility anti-pattern; update the AsButton render so when mapping VARIANTS for clickable Chips you skip or filter out the "disabled" variant (or conditionally omit the onClick prop for Chip when variant === "disabled"), ensuring Chip instances with variant="disabled" are rendered non-interactive; refer to AsButton, VARIANTS, SIZES, Chip, and the onClick prop to locate and change the mapping logic.
🧹 Nitpick comments (1)
src/shared/design-system/ui/Input/Input.tsx (1)
73-82: ⚡ Quick win접근성 향상을 위해
aria-describedby연결을 고려하세요.helpText를 input과
aria-describedby속성으로 연결하면 스크린 리더 사용자가 입력 필드와 관련된 도움말 메시지를 더 잘 인식할 수 있습니다.♿ 제안하는 개선 방안
const Input = forwardRef<HTMLInputElement, InputProps>(function Input( { id: idProp, label, required = false, placeholder, state = 'default', variant = 'default', trailingIcon, helpText, value, onChange, onClick, ...rest }, ref ) { const generatedId = useId(); + const helpTextId = useId(); const inputId = idProp ?? generatedId; const isDisabled = state === 'disabled'; const isPrice = variant === 'price'; return ( <S.Container> {label && ( <S.LabelRow> <S.LabelText htmlFor={inputId}>{label}</S.LabelText> {required && <S.Required>*</S.Required>} </S.LabelRow> )} <S.InputWrapper $state={state} $variant={variant}> <S.StyledInput ref={ref} id={inputId} $variant={variant} placeholder={placeholder} required={required} {...rest} value={value} onChange={onChange} onClick={onClick} disabled={isDisabled} + aria-describedby={helpText && variant === 'default' ? helpTextId : undefined} /> {isPrice && <S.PriceUnit>원</S.PriceUnit>} {!isPrice && trailingIcon && ( <S.IconWrapper $disabled={isDisabled} onClick={!isDisabled ? onClick : undefined} > {trailingIcon} </S.IconWrapper> )} </S.InputWrapper> {helpText && variant === 'default' && ( - <S.HelpTextContainer> + <S.HelpTextContainer id={helpTextId}> {state === 'error' && ( <S.HelpTextIconWrapper> <SvgSystemDanger width={18} height={18} /> </S.HelpTextIconWrapper> )} <S.HelpText $state={state}>{helpText}</S.HelpText> </S.HelpTextContainer> )} </S.Container> ); });🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/shared/design-system/ui/Input/Input.tsx` around lines 73 - 82, Add an accessible connection between the input and its help text by giving the rendered help text element (S.HelpText inside S.HelpTextContainer) a stable id (e.g., `${id}-help` or derive from the Input component's id) and wiring that id into the input element's aria-describedby when helpText is present and variant === 'default'; update the Input component render/props where the input element is created (and any relevant prop like id on the component) to include aria-describedby={helpText ? helpId : undefined} so screen readers will associate the help text with the input.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@src/shared/design-system/ui/Chip/Chip.stories.tsx`:
- Around line 61-83: The AsButton story is assigning onClick to every variant
including variant="disabled", which is an accessibility anti-pattern; update the
AsButton render so when mapping VARIANTS for clickable Chips you skip or filter
out the "disabled" variant (or conditionally omit the onClick prop for Chip when
variant === "disabled"), ensuring Chip instances with variant="disabled" are
rendered non-interactive; refer to AsButton, VARIANTS, SIZES, Chip, and the
onClick prop to locate and change the mapping logic.
---
Nitpick comments:
In `@src/shared/design-system/ui/Input/Input.tsx`:
- Around line 73-82: Add an accessible connection between the input and its help
text by giving the rendered help text element (S.HelpText inside
S.HelpTextContainer) a stable id (e.g., `${id}-help` or derive from the Input
component's id) and wiring that id into the input element's aria-describedby
when helpText is present and variant === 'default'; update the Input component
render/props where the input element is created (and any relevant prop like id
on the component) to include aria-describedby={helpText ? helpId : undefined} so
screen readers will associate the help text with the input.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 3ea7f4ee-ea9b-4651-bf92-d2b1b5fe3493
📒 Files selected for processing (17)
src/features/character-management/ui/CharacterItem/index.styles.tssrc/features/character-management/ui/CharacterItem/index.tsxsrc/features/character-management/ui/StarChip/StarChip.styles.tssrc/features/expense-management/ui/ExpenseAmountInput/ExpenseAmountInput.tsxsrc/pages/confirmStep/ui/SettlementSummary/SettlementSummary.tsxsrc/pages/expenseDetail/ui/ExpenseMemberItem/index.style.tssrc/pages/expenseDetail/ui/ExpenseTimelineContent/index.tsxsrc/shared/design-system/ui/Chip/Chip.stories.tsxsrc/shared/design-system/ui/Chip/Chip.styles.tssrc/shared/design-system/ui/Chip/Chip.tsxsrc/shared/design-system/ui/Chip/index.tssrc/shared/design-system/ui/Input/Input.stories.tsxsrc/shared/design-system/ui/Input/Input.styles.tssrc/shared/design-system/ui/Input/Input.tsxsrc/shared/design-system/ui/NameChip/NameChip.tsxsrc/shared/design-system/ui/NameChip/index.tssrc/shared/design-system/ui/index.ts
💤 Files with no reviewable changes (2)
- src/shared/design-system/ui/NameChip/NameChip.tsx
- src/shared/design-system/ui/NameChip/index.ts
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Deploying moddo-frontend with
|
| Latest commit: |
09b0c5a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a4a52869.moddo-frontend.pages.dev |
| Branch Preview URL: | https://design-md-46.moddo-frontend.pages.dev |
💻 작업 내용
피그마 코멘트를 바탕으로 디자인 시스템 관련 수정 가능한 항목들을 적용했습니다.
StarChip
Chip (구 NameChip)
CharacterItem (잠긴 캐릭터 카드)
ExpenseMemberItem
Input
Button
👻 리뷰 요구사항
아직 HACK으로 남겨둔 주석이 있습니다..! 수진님 코멘트 받으면 또 이어서 작업해서 올리겠습니다
Summary by CodeRabbit
릴리스 노트
새로운 기능
개선사항