Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 3, 2025

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:

  • Added TextInputWithTokens export back to packages/react/src/index.ts
  • Removed TextInputWithTokens export from packages/react/src/deprecated/index.ts
  • Updated FormControl stories to import from main path instead of deprecated path

Storybook and Documentation:

  • Component stories still show the deprecated status in Storybook navigation
  • Documentation metadata still marks the component as "deprecated"
  • E2E test story IDs remain updated to match deprecated structure

Version Management:

  • Changeset remains for major version bump indicating the deprecation intent

Current State

The component is now available from the main export path:

import { TextInputWithTokens } from '@primer/react'

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

TextInputWithTokens appears in the Deprecated section of Storybook

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.

Copy link

changeset-bot bot commented Sep 3, 2025

🦋 Changeset detected

Latest commit: c9e6305

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

This PR includes changesets to release 2 packages
Name Type
@primer/react Major
@primer/styled-react Major

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

@Copilot Copilot AI changed the title [WIP] Deprecate TextInputWithTokens component Deprecate TextInputWithTokens component Sep 3, 2025
@Copilot Copilot AI requested a review from TylerJDev September 3, 2025 16:39
Copilot finished work on behalf of TylerJDev September 3, 2025 16:39
Copy link
Contributor

github-actions bot commented Sep 3, 2025

👋 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-actions github-actions bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Sep 3, 2025
Copy link
Contributor

github-actions bot commented Sep 3, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 87.95 KB (0%)
packages/react/dist/browser.umd.js 88.11 KB (0%)

@@ -0,0 +1,6 @@
---
'@primer/react': major
'@primer/styled-react': minor
Copy link
Member

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.

Copy link
Contributor Author

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)

Copilot finished work on behalf of TylerJDev September 4, 2025 14:00
@Copilot Copilot AI requested a review from TylerJDev September 4, 2025 14:00
@github-actions github-actions bot requested a deployment to storybook-preview-6713 September 4, 2025 14:15 Abandoned
Comment on lines 156 to 157
export {default as TextInputWithTokens} from './TextInputWithTokens'
export type {TextInputWithTokensProps} from './TextInputWithTokens'
Copy link
Member

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.

Copy link
Contributor Author

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)

@Copilot Copilot AI changed the title Deprecate TextInputWithTokens component Revert TextInputWithTokens deprecation for upcoming release Sep 4, 2025
@Copilot Copilot AI requested a review from TylerJDev September 4, 2025 15:06
Copilot finished work on behalf of TylerJDev September 4, 2025 15:06
@github-actions github-actions bot temporarily deployed to storybook-preview-6713 September 4, 2025 15:24 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-6713 September 4, 2025 19:42 Inactive
@TylerJDev TylerJDev changed the title Revert TextInputWithTokens deprecation for upcoming release Deprecate TextInputWithTokens Sep 4, 2025
@TylerJDev TylerJDev marked this pull request as ready for review September 4, 2025 21:24
@Copilot Copilot AI review requested due to automatic review settings September 4, 2025 21:24
@TylerJDev TylerJDev requested a review from a team as a code owner September 4, 2025 21:24
Copy link
Contributor

@Copilot Copilot AI left a 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

@TylerJDev TylerJDev requested a review from liuliu-dev September 4, 2025 21:33
Copy link
Contributor

@liuliu-dev liuliu-dev left a comment

Choose a reason for hiding this comment

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

🎉

@TylerJDev TylerJDev added this pull request to the merge queue Sep 5, 2025
Merged via the queue into main with commit 7d7b797 Sep 5, 2025
44 checks passed
@TylerJDev TylerJDev deleted the copilot/fix-6712 branch September 5, 2025 13:43
@primer primer bot mentioned this pull request Sep 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration-tests: recommended This 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.

3 participants