Skip to content

refactor: JDS Checkbox, Radio 타입 안정성 개선#502

Merged
itwillbeoptimal merged 3 commits into
devfrom
refactor/501-checkbox-radio-type
Jul 2, 2026
Merged

refactor: JDS Checkbox, Radio 타입 안정성 개선#502
itwillbeoptimal merged 3 commits into
devfrom
refactor/501-checkbox-radio-type

Conversation

@itwillbeoptimal

@itwillbeoptimal itwillbeoptimal commented Jun 30, 2026

Copy link
Copy Markdown
Member

💡 작업 내용

  • Checkbox/Radio의 input type prop 외부 오버라이드 차단
  • *.types.ts 내부 interface/type 혼용을 type으로 통일
  • Checkbox.Label z-index 추가

💡 자세한 설명

외부에서 inputtype을 전달하면 type="checkbox"/type="radio"가 덮어써져 해당 type 셀렉터에 의존하는 스타일까지 깨질 수 있어, type을 prop으로 받지 않도록 막았습니다. 아울러 두 컴포넌트의 타입 정의에서 interfacetype이 혼용되어 있던 부분도 type으로 통일했습니다.

작업 중 Checkbox.Labelz-index가 누락된 부분을 발견해 함께 반영했습니다.

📗 참고 자료 (선택)

📢 리뷰 요구 사항 (선택)

✅ 셀프 체크리스트

  • 머지할 브랜치 확인했나요?
  • 이슈는 close 했나요?
  • Reviewers, Labels, Projects를 등록했나요?
  • 기능이 잘 동작하나요?
  • 불필요한 코드는 제거했나요?

closes #501

Summary by CodeRabbit

  • Bug Fixes
    • 체크박스 라벨의 겹침 문제를 줄여, 일부 화면에서 선택 영역이 더 안정적으로 보이도록 개선했습니다.
  • Refactor
    • 체크박스와 라디오 관련 입력 요소의 타입 정의를 정리해 유지보수성을 높였습니다.
    • 내부적으로 더 이상 노출되지 않아야 하는 속성 구성을 정돈했습니다.

@itwillbeoptimal itwillbeoptimal self-assigned this Jun 30, 2026
@itwillbeoptimal itwillbeoptimal added the ✨feature 구현, 개선 사항 관련 부분 label Jun 30, 2026
@itwillbeoptimal itwillbeoptimal added the ♻refactor 리팩토링 label Jun 30, 2026
@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ject-official-web-site-client-web Ready Ready Preview, Comment Jun 30, 2026 1:33pm

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c195a811-de42-475a-9ec0-6dc9d75db485

📥 Commits

Reviewing files that changed from the base of the PR and between 55cf423 and 7ef1999.

📒 Files selected for processing (3)
  • packages/jds/src/components/Checkbox/checkbox.css.ts
  • packages/jds/src/components/Checkbox/checkbox.types.ts
  • packages/jds/src/components/Radio/radio.types.ts

Walkthrough

Checkbox와 Radio 컴포넌트의 타입 정의를 interface에서 type alias로 통일하고, Omit 대상에 "type"을 추가하여 input/labeltype prop 외부 오버라이드를 차단한다. 또한 checkboxLabel CSS 스타일에 zIndex: 10이 추가된다.

Changes

Checkbox/Radio 타입 안정성 개선 및 스타일 변경

Layer / File(s) Summary
Checkbox/Radio 타입 정의 전환 및 Omit 확장
packages/jds/src/components/Checkbox/checkbox.types.ts, packages/jds/src/components/Radio/radio.types.ts
CheckboxItemProps, CheckboxLabelProps, CheckboxHelperProps, RadioBasicProps, RadioItemProps, RadioLabelProps, RadioHelperPropsinterface에서 type alias로 전환. CheckboxBasicBasePropsRadioBasicPropsOmit 대상에 "type" 추가. // Checkbox.Root 주석 제거.
checkboxLabel zIndex 추가
packages/jds/src/components/Checkbox/checkbox.css.ts
checkboxLabel 스타일 선언에 zIndex: 10 프로퍼티 추가.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • ccconac
  • Zero-1016
  • areumH

Poem

🐰 인터페이스여, 안녕히!
이제는 type으로 깔끔하게~
"type" prop은 Omit으로 숨기고,
zIndex 10으로 라벨은 앞으로!
토끼도 타입 안전을 좋아해 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 제목이 Checkbox/Radio 타입 안정성 개선과 type prop 차단, 타입 통일이라는 핵심 변경을 잘 요약합니다.
Description check ✅ Passed 필수 섹션인 작업 내용, 자세한 설명, 체크리스트, 종료 이슈(closes #501)를 포함해 템플릿을 대부분 충족합니다.
Linked Issues check ✅ Passed Checkbox/Radio의 type prop 오버라이드 차단과 *.types.ts의 type 통일이 반영되어 #501 요구사항을 충족합니다.
Out of Scope Changes check ✅ Passed 추가된 Checkbox.Label z-index는 보조 수정이지만 PR 설명에 명시된 관련 변경으로 보여, 명백한 무관 변경은 없습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/501-checkbox-radio-type

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Zero-1016 Zero-1016 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 👍


export const checkboxLabel = style({
whiteSpace: "nowrap",
zIndex: 10,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📝 overlay()의 절대배치 ::before/::after가 라벨 텍스트를 덮는 걸 방지하기 위한 스태킹 보정

@itwillbeoptimal itwillbeoptimal merged commit a6d1c59 into dev Jul 2, 2026
8 checks passed
@itwillbeoptimal itwillbeoptimal deleted the refactor/501-checkbox-radio-type branch July 2, 2026 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨feature 구현, 개선 사항 관련 부분 ♻refactor 리팩토링

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

refactor: (JDS) Checkbox, Radio 타입 안정성 개선

3 participants