Skip to content

fix: properly define types of polymorphic components#1055

Merged
ariser merged 3 commits into
mainfrom
fix-polymorphic-types
Jun 1, 2026
Merged

fix: properly define types of polymorphic components#1055
ariser merged 3 commits into
mainfrom
fix-polymorphic-types

Conversation

@ariser
Copy link
Copy Markdown
Collaborator

@ariser ariser commented Jun 1, 2026

Why?

Types for polymorphic components were broken since forever.

How?

Define types properly.


Note

Low Risk
Type-only fixes with no runtime logic changes; risk is limited to possible stricter or corrected compile-time errors for consumers.

Overview
Fixes polymorphic public typings for Container, EllipsisContent, GridContainer, Link, and Text by omitting conflicts against each component’s own props interface (ContainerProps, TextProps, etc.) instead of keyof T on the element type.

Consumers get correct merging of the component prop with native/HTML props for a chosen T, without changing runtime behavior. A patch changeset is included for @clickhouse/click-ui.

Reviewed by Cursor Bugbot for commit acb5c72. Bugbot is set up for automated code reviews on this repo. Configure here.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 1, 2026

🦋 Changeset detected

Latest commit: acb5c72

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@clickhouse/click-ui Patch

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

@workflow-authentication-public
Copy link
Copy Markdown
Contributor

Storybook Preview Deployed

✅ Preview URL: https://click-kkuhxr0ec-clickhouse.vercel.app

Built from commit: a2c7cd5f95e66e97f33bc990a574e5918de8e5e3

@ariser ariser merged commit d16594b into main Jun 1, 2026
10 checks passed
@ariser ariser deleted the fix-polymorphic-types branch June 1, 2026 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants