-
Notifications
You must be signed in to change notification settings - Fork 620
refactor(IssueLabel): update types, tests, and stories for usage #6265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: ee0180b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
👋 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! |
size-limit report 📦
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the IssueLabel
component to prepare it for documentation publication by updating its TypeScript types, adding comprehensive tests, and modernizing its API. The main changes include replacing the text
prop with children
, adding polymorphic as
prop support, and implementing proper type discrimination based on props.
- Add comprehensive test coverage with Vitest unit tests and enhanced e2e VRT tests
- Update TypeScript types to support polymorphic
as
prop with proper type discrimination - Replace
text
prop withchildren
for more flexible content support
Reviewed Changes
Copilot reviewed 11 out of 254 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
packages/react/src/experimental/IssueLabel/IssueLabel.tsx |
Core component refactor with new polymorphic types and implementation |
packages/react/src/experimental/IssueLabel/IssueLabel.test.tsx |
New comprehensive unit tests for all component variants and behaviors |
packages/react/src/experimental/IssueLabel/IssueLabel.types.test.tsx |
New TypeScript type tests to verify polymorphic behavior |
packages/react/src/experimental/IssueLabel/IssueLabel.stories.tsx |
Updated Storybook stories to use new children API |
packages/react/src/experimental/IssueLabel/IssueLabel.features.stories.tsx |
Updated feature stories with new API and added interaction handling |
packages/react/src/experimental/IssueLabel/IssueLabel.module.css |
Added CSS layer and removed :where() selectors for better specificity |
packages/react/src/experimental/IssueLabel/IssueLabel.docs.json |
Updated documentation metadata and prop definitions |
packages/react/vitest.config.browser.mts |
Added IssueLabel tests to browser test configuration |
packages/react/jest.config.js |
Added IssueLabel to Jest test configuration |
e2e/components/IssueLabel.test.ts |
Enhanced e2e tests with interaction testing for button and link variants |
.changeset/dry-chairs-start.md |
Added changeset for minor release |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Update our
IssueLabel
component to prepare for its documentation to be published on our site. These updates include:as
along with defaulting to specific element types (likebutton
,a
,span
) based on certain propsChangelog
New
Changed
as
andchildren
for contentRemoved
Rollout strategy