Skip to content

Add forwardRef to all components #1448

Open
@sungik-choi

Description

Description

forwardRef 가 없는 컴포넌트에 모두 forwardRef 를 추가합니다.

Reasons for suggestion

  • Re-implement Tooltip component using Tooltip in Radix UI #979 에서 Tooltip 이 추가되었습니다. radix-ui에선 타겟(children)의 DOM node에 접근하여 상대적 위치를 계산하는 방식으로 Tooltip 의 위치를 결정하고 있습니다.
  • DOM node에 접근하기 위해서는 하위 컴포넌트에서 ref를 노출시켜야합니다.
  • 디자인 시스템 컴포넌트는 모두 같은 디자인 시스템 컴포넌트인 Tooltip 과 함께 사용했을 때, 자연스럽게 동작해야합니다. 자연스럽게 동작할 수 있도록, ref forwarding이 누락된 컴포넌트에 모두 forwardRef를 추가합니다.

Proposed solution

  • Add forwardRef to Icon #1313 은 타입 브레이킹 체인지 등 생각보다 고려할 점이 많으므로 별도의 태스크로 다룹니다.

References

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    enhancementIssues or PR related to making existing features better

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions