Closed sungik-choi closed 5 months ago
Latest commit: 99f517f60dea923e8ec5ccd6252ae6b484ebc483
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
https://github.com/radix-ui/themes/blob/main/packages/radix-ui-themes/src/helpers/props/margin.props.ts 과 같은 식으로 helper function을 가까이에 위치시키자. Form related prop도 함께 적용해볼 수 있을듯.
Attention: 19 lines
in your changes are missing coverage. Please review.
Comparison is base (
3e1ecae
) 87.12% compared to head (99f517f
) 86.64%. Report is 1 commits behind head on alpha.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
기존 컴포넌트들과 다르게 width, height 등 dimension property에 number를 넣으면 px를 붙여주는 로직(e.g. ModalContent)을 제외했습니다. primitive layout 컴포넌트라는 특성상, 애플리케이션에서 굉장히 많이 호출될 수 있습니다. 꼭 필요한 것이 아니라면 number 체크 로직을 제거하고자 했습니다.
React에서도 value === number type && !== 0 && !== unitless number property
일 경우에 암시적으로 px
을 붙여주고 있으므로, React와 동작을 통일하는 편이 React에 익숙한 사용자가 라이브러리를 별도의 학습 비용 없이 쉽게 사용할 수 있을 거 같습니다. 약간의 오버헤드를 고려하더라도 추가하는 게 나을 거 같네요.
기존 컴포넌트들과 다르게 width, height 등 dimension property에 number를 넣으면 px를 붙여주는 로직(e.g. ModalContent)을 제외했습니다. primitive layout 컴포넌트라는 특성상, 애플리케이션에서 굉장히 많이 호출될 수 있습니다. 꼭 필요한 것이 아니라면 number 체크 로직을 제거하고자 했습니다.
React에서도
value === number type && !== 0 && !== unitless number property
일 경우에 암시적으로px
을 붙여주고 있으므로, React와 동작을 통일하는 편이 React에 익숙한 사용자가 라이브러리를 별도의 학습 비용 없이 쉽게 사용할 수 있을 거 같습니다. 약간의 오버헤드를 고려하더라도 추가하는 게 나을 거 같네요.
저도 오버헤드가 그리 크지는 않을 것 같아서 추가해도 될 것 같아요
Self Checklist
Related Issue
Summary
Implement Box layout component
Details
자세한 내용은 이슈를 참고해주세요. 구현하며 아래와 같은 점들을 신경썼습니다.
Box
컴포넌트를 상속받는 형태(e.g. Chakra UI)가 되지 않도록 신경썼습니다. 이렇게 될 경우Box
컴포넌트가 말그대로 CSS superset의 형태가 되어버릴 수 있어 이런 케이스는 피하고자 했습니다(e.g.Text
의 내부 구현은Box
이며,Box
는Text
를 구현할 수 있도록typo
속성을 가지고 있다). 가능한한 컴포넌트의 책임을 명확히 하고자 의도했습니다.color
prop은 제외했습니다. 글자색을 변경하는 속성인데, 이 속성은 왠만하면Text
를 통해서만 컨트롤하도록 강제하고 싶었습니다.as
속성을 통해 변경할 수 있는 컴포넌트는 Shopify polaris의 케이스를 참고했습니다.ModalContent
)을 제외했습니다. primitive layout 컴포넌트라는 특성상, 애플리케이션에서 굉장히 많이 호출될 수 있습니다. 꼭 필요한 것이 아니라면 number 체크 로직을 제거하고자 했습니다.Breaking change? (Yes/No)
No
References
1792
1818