Skip to content

Fix LinkButton types - #5655

Merged
hectahertz merged 9 commits into
mainfrom
hectahertz/fix-linkbutton-types
Feb 14, 2025
Merged

Fix LinkButton types#5655
hectahertz merged 9 commits into
mainfrom
hectahertz/fix-linkbutton-types

Conversation

@hectahertz

Copy link
Copy Markdown
Contributor

Closeshttps://github.com/github/primer/issues/4743

Changelog

The old ButtonBaseProps included the the ref. This was overriding the PolymorphicForwardRefComponent<'a', MyProps> on LinkButton

TLDR; Properly type LinkButton. The props were not properly inherited the type checking didn't actually work properly.

Changed

Fixes issues with the LinkButton props.

Changes the LinkButton stories to actually use the LinkButton component.

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

Merge checklist

@hectahertz
hectahertz requested a review from a team as a code ownerFebruary 4, 2025 17:58
@changeset-bot

changeset-botBot commented Feb 4, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 58a2334

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

This PR includes changesets to release 1 package
NameType
@primer/reactPatch

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

@github-actions

Copy link
Copy Markdown
Contributor

👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks!

@github-actionsgithub-actionsBot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Feb 4, 2025
@github-actions
github-actionsBottemporarily deployed to storybook-preview-5655 February 4, 2025 18:11 Inactive

@TylerJDevTylerJDev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! ✨

@hectahertz
hectahertzforce-pushed the hectahertz/fix-linkbutton-types branch from 3fd995f to 43998beCompareFebruary 7, 2025 18:38
@github-actions
github-actionsBottemporarily deployed to storybook-preview-5655 February 7, 2025 18:41 Inactive
@github-actions

github-actionsBot commented Feb 7, 2025

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
packages/react/dist/browser.esm.js105.57 KB (0%)
packages/react/dist/browser.umd.js106.04 KB (0%)

@github-actions
github-actionsBot requested a deployment to storybook-preview-5655 February 7, 2025 18:45 Abandoned
@github-actions
github-actionsBottemporarily deployed to storybook-preview-5655 February 7, 2025 19:03 Inactive
@github-actions
github-actionsBottemporarily deployed to storybook-preview-5655 February 12, 2025 16:26 Inactive
@hectahertz
hectahertz added this pull request to the merge queueFeb 14, 2025
Merged via the queue into main with commit 56baa0aFeb 14, 2025
@hectahertz
hectahertz deleted the hectahertz/fix-linkbutton-types branch February 14, 2025 13:49
@primerprimerBot mentioned this pull request Feb 13, 2025
hectahertz added a commit that referenced this pull request Mar 20, 2025
* Fix LinkButton and ButtonBase Typescript types
* Use LinkButton in LinkButton stories
* Add changeset
* Remove export
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: recommendedThis change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@hectahertz@TylerJDev