-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Enhance CheckableAvatar
component to behave as an actual checkbox
#1320
Enhance CheckableAvatar
component to behave as an actual checkbox
#1320
Conversation
🦋 Changeset detectedLatest commit: ce0ce85 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Chromatic Report🚀 Congratulations! Your build was successful! |
3ab97bd
to
a00991b
Compare
a00991b
to
f3ba717
Compare
CheckableAvatar
component to behave as an actual checkboxCheckableAvatar
component to behave as an actual checkbox
TODO
|
|
@@ -12,8 +12,7 @@ module.exports = { | |||
'src', | |||
], | |||
moduleNameMapper: { | |||
'\\.(jpg|ico|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': | |||
'identity-obj-proxy', | |||
'\\.(jpg|ico|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/__mocks__/fileMock.js', |
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.
정확한 이유는 모르지만, 테스트 환경에서 발생한 Symbol is not a function
에러가 다음 코드로 해결되었습니다.
cssUrl()
구문 해석 도중에 발생했는데, 왜 처음 cssUrl()
이 추가된 #1317 에선 테스트가 정상적으로 실행되었는지 모르겠습니다. 🤔
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## next-v1 #1320 +/- ##
===========================================
+ Coverage 77.76% 78.71% +0.94%
===========================================
Files 302 302
Lines 3855 3838 -17
Branches 849 841 -8
===========================================
+ Hits 2998 3021 +23
+ Misses 577 538 -39
+ Partials 280 279 -1
☔ View full report in Codecov by Sentry. |
Self Checklist
CODEOWNERS
file.Related Issue
Fixes #1237
Summary
CheckableAvatar
컴포넌트가 체크박스로 동작할 수 있도록 개선(재구현)합니다.Re-implement
CheckableAvatar
component.CheckableAvatar
is a checkbox component that looks likeAvatar
.forwardRef
.Details
AlphaSmoothCornersBox
컴포넌트를 사용하여 스타일링을 하도록 방식이 변경되었습니다.CheckableAvatar
컴포넌트의 특성상, 내부에 트랜지션 스타일만을 위해 smooth corners 가 적용된 div를 추가로 두는 건 득보다 실이 크다고 판단했습니다.Checkbox
,Radio
와 우선 통일하기로 결정했습니다. 공식적으로 디자인 시스템 스펙에 트랜지션이 추가된다면 추후 추가할 예정입니다.Checkbox
와 같은 방식으로 통일합니다. 컴포넌트의 사용 방식을 일관적으로 만들어 학습을 쉽게 하도록 하기 위한 변경입니다.isCheckable
: 채널 데스크 앱에서 사용하지 않고,disabled
속성으로 대체가능합니다.checkedBackgroundColor
: 사용하지 않고, 해당 속성으로 오버라이드하기보다 추후--*-checked
같은 디자인 토큰을 오버라이드하는 방식을 통해 스타일링하는 게 바람직하다고 판담ㄴ했습니다.checkableWrapper*
: 사용하지 않고, 불필요한 스타일 속성이라고 생각했습니다. 이 속성들까지 사용하여 스타일링하고 있다면, 컴포넌트를 잘못 사용하고 있을 확률이 매우 높습니다. 옵션을 제공하지 않는 편이 일관적인 사용을 강제할 수 있다고 판단했습니다.Breaking change or not (Yes/No)
Yes
isChecked
property tochecked
property.isCheckable
property.checkedBackgroundColor
property.checkableWrapperClassName
property.checkableWrapperInterpolation
property.References