-
Notifications
You must be signed in to change notification settings - Fork 629
Deprecate TextInputWithTokens #6713
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
Conversation
🦋 Changeset detectedLatest commit: c9e6305 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
Co-authored-by: TylerJDev <[email protected]>
TextInputWithTokens
component
👋 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 📦
|
@@ -0,0 +1,6 @@ | |||
--- | |||
'@primer/react': major | |||
'@primer/styled-react': minor |
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.
Can re remove this line, as we only want to bump @primer/react
, @copilot.
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.
Removed the @primer/styled-react
line from the changeset. Now it only bumps @primer/react
as requested. (c92ec20)
Co-authored-by: TylerJDev <[email protected]>
packages/react/src/index.ts
Outdated
export {default as TextInputWithTokens} from './TextInputWithTokens' | ||
export type {TextInputWithTokensProps} from './TextInputWithTokens' |
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.
@copilot can we add this back, and remove it from the deprecated entry point (i.e. packages/react/src/deprecated/index.ts
)? This will make it easier for the upcoming release. We might need to update the snap tests.
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.
Done! I've added TextInputWithTokens
back to the main export in packages/react/src/index.ts
and removed it from the deprecated export point in packages/react/src/deprecated/index.ts
. I also updated the FormControl stories that were importing from the deprecated path to use the main path instead. All tests pass and the build succeeds. (73b1cc8)
Co-authored-by: TylerJDev <[email protected]>
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 reverts the deprecation of the TextInputWithTokens
component by moving it back to the main export bundle while maintaining its deprecated status in documentation and Storybook. This change facilitates the upcoming release process by providing flexibility while keeping deprecation signals visible to users.
Key changes:
- Restored
TextInputWithTokens
to main export path from@primer/react
- Updated Storybook organization to show component in "Deprecated" section
- Maintained deprecation annotations and documentation metadata
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
packages/react/src/TextInputWithTokens/TextInputWithTokens.tsx | Added JSDoc deprecation annotations to component types and exports |
packages/react/src/TextInputWithTokens/TextInputWithTokens.stories.tsx | Updated Storybook title to "Deprecated/Components/TextInputWithTokens" |
packages/react/src/TextInputWithTokens/TextInputWithTokens.features.stories.tsx | Updated Storybook title to "Deprecated/Components/TextInputWithTokens/Features" |
packages/react/src/TextInputWithTokens/TextInputWithTokens.docs.json | Changed status from "alpha" to "deprecated" and updated story IDs |
e2e/components/TextInputWithTokens.test.ts | Updated test story IDs to match new deprecated structure |
.changeset/deprecate-textinputwithtokens.md | Added changeset for major version bump documenting deprecation |
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.
🎉
This PR reverts the deprecation of the
TextInputWithTokens
component to facilitate the upcoming release process. Based on maintainer feedback, the component has been moved back to the main export bundle.Changes Made
Component Export Reversion:
TextInputWithTokens
export back topackages/react/src/index.ts
TextInputWithTokens
export frompackages/react/src/deprecated/index.ts
Storybook and Documentation:
Version Management:
Current State
The component is now available from the main export path:
While still appearing in the "Deprecated" section of Storybook for documentation purposes, the component maintains full functionality and can be imported normally. This approach provides flexibility for the release process while maintaining the deprecation signals for users.
Screenshot
All tests pass and the component builds successfully. The deprecation can be completed in a future release when the timing is more appropriate.
Addresses feedback on #6712.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.