Closed yangwooseong closed 8 months ago
Latest commit: f32961b2b1b7f8737053467a8e5a637469c2af58
The changes in this PR will be included in the next version bump.
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
Patch coverage: 78.12%
and project coverage change: -0.18%
:warning:
Comparison is base (
0d54036
) 87.18% compared to head (f32961b
) 87.00%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
또한 Button 다음으로 Banner 에서 use case 가 많은데 @channel.io/bezier-codemod 에서는 Button 만 지원하고 있습니다. 그래서 살짝 번거롭긴 하지만 icon-name-to-bezier-icons.ts 에서 meta 를 Banner 로 변경, 빌드 한 후에 데스크에서 아래 커맨드로 패키지를 로컬로 실행하면 마이그레이션이 가능합니다.
Button, Banner 모두 지원하도록 마이그레이션 스크립트도 변경되면 좋을 거 같습니다
iconName을 사용할 경우, 런타임에
console.warn
등으로 에러를 띄워주는 것도 좋을 거 같아요. (참고)console.warn(' Deprecation: `IconName` as a value for the `leftContent` property of a `Button` has been deprecated. Use the Icon of bezier-icons instead. ')
좋네요! 여기 보니 메이저 버전 바뀔 때마다 가이드 해주고 있는데 저희도 나중에 해보면 좋겠네요!
iconName을 사용할 경우, 런타임에
console.warn
등으로 에러를 띄워주는 것도 좋을 거 같아요. (참고)console.warn(' Deprecation: `IconName` as a value for the `leftContent` property of a `Button` has been deprecated. Use the Icon of bezier-icons instead. ')
이거 개발 환경에서만 콘솔을 띄우는 게 좋을 것 같은데 어떻게 생각하시나요? process.env.NODE_ENV
로 검사하는게 맞을지 의문이네요
iconName을 사용할 경우, 런타임에
console.warn
등으로 에러를 띄워주는 것도 좋을 거 같아요. (참고)console.warn(' Deprecation: `IconName` as a value for the `leftContent` property of a `Button` has been deprecated. Use the Icon of bezier-icons instead. ')
이거 개발 환경에서만 콘솔을 띄우는 게 좋을 것 같은데 어떻게 생각하시나요?
process.env.NODE_ENV
로 검사하는게 맞을지 의문이네요
좋은 거 같아요. process.env.NODE_ENV === 'development
로 검사하면 거의 모든 상황에서 괜찮지 않을까? 싶네요
정확히는 모르겠지만, 대부분 케이스에서 예약어처럼 사용되는 거 같아서요.
이거 빠르게 별도 PR로 작업해서 올려볼게요
Self Checklist
[Component] I wrote a unit test about the implementation.[Component] I wrote a storybook document about the implementation.[New Component] I added my username to the correct directory in theCODEOWNERS
file.Related Issue
Partial Fix of #762
Summary
Button
,Banner
,SectionLabel
컴포넌트들의icon
prop 에 대해BezierIcon
타입을 넘길 수 있도록 변경합니다.iconName
을 사용하고 있는 곳을BezierIcon
type 으로 변경합니다.Details
1.x.x
)에서는 backward compatibility 를 위해iconName
타입 지원을 남겨놓은 후에2.x.x
버전부터iconName
지원을 제거할 예정입니다.@channel.io/bezier-codemod
를 사용하여iconName
->BezierIcon
으로 마이그레이션을 완료한 상태입니다. 이 때 베지어에서icon
type 이string
을 허용하지 않도록 하고 로컬 빌드 한 후 데스크에서 이걸 설치해서 타입 에러를 확인하면서 마이그레이션 하였습니다. 따라서 ts 가 아닌 곳에서 사용하고 있다면 체크가 누락되지만.. 이거는 어차피 ts-morph 를 사용하고 있어서 피할 수 없는 문제인 것 같습니다.Button
다음으로Banner
에서 use case 가 많은데@channel.io/bezier-codemod
에서는Button
만 지원하고 있습니다. 그래서 살짝 번거롭긴 하지만icon-name-to-bezier-icons.ts
에서meta
를Banner
로 변경, 빌드 한 후에 데스크에서 아래 커맨드로 패키지를 로컬로 실행하면 마이그레이션이 가능합니다.iconName
지원을 제거하면LegacyIcon
도 지워지고 #762 이슈도 resolve 될 것이라 기대하고 있습니다.Breaking change or not (Yes/No)
References
762