From 895b526c272eb14942cd5c09b007a60d005384a2 Mon Sep 17 00:00:00 2001 From: tay1orjones <3360588+tay1orjones@users.noreply.github.com> Date: Fri, 20 Nov 2026 17:30:20 +0000 Subject: [PATCH 1/2] Deprecate IssueLabelToken in favor of experimental IssueLabel Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> --- .changeset/deprecate-issue-label-token.md | 5 +++++ packages/react/src/Token/IssueLabelToken.tsx | 10 ++++++++++ packages/react/src/Token/Token.docs.json | 1 + 3 files changed, 16 insertions(+) create mode 100644 .changeset/deprecate-issue-label-token.md diff --git a/.changeset/deprecate-issue-label-token.md b/.changeset/deprecate-issue-label-token.md new file mode 100644 index 00000000000..e7c01bd34dd --- /dev/null +++ b/.changeset/deprecate-issue-label-token.md @@ -0,0 +1,5 @@ +--- +'@primer/react': patch +--- + +Deprecate `IssueLabelToken` in favor of `IssueLabel` from `@primer/react/experimental`. diff --git a/packages/react/src/Token/IssueLabelToken.tsx b/packages/react/src/Token/IssueLabelToken.tsx index 0ab2131e147..0351add428f 100644 --- a/packages/react/src/Token/IssueLabelToken.tsx +++ b/packages/react/src/Token/IssueLabelToken.tsx @@ -11,6 +11,9 @@ import type {ForwardRefComponent as PolymorphicForwardRefComponent} from '../uti import classes from './IssueLabelToken.module.css' import {clsx} from 'clsx' +/** + * @deprecated Use `IssueLabel` from `@primer/react/experimental` instead. + */ export interface IssueLabelTokenProps extends TokenBaseProps { /** * The color that corresponds to the label @@ -18,6 +21,13 @@ export interface IssueLabelTokenProps extends TokenBaseProps { fillColor?: string } +/** + * @deprecated Use `IssueLabel` from `@primer/react/experimental` instead. + * `fillColor` carries over (as a `#hex` value). `IssueLabel` also accepts a `variant` for preset colors and + * renders a `span`, `a` (with `href`) or `button` (with `onClick`) based on the props provided. + * It has no `text`, `size`, `isSelected`, `id`, `onRemove` or `hideRemoveButton` props: pass the label text as `children` + * and render your own remove control if one is needed. + */ const IssueLabelToken = forwardRef((props, forwardedRef) => { const { as, diff --git a/packages/react/src/Token/Token.docs.json b/packages/react/src/Token/Token.docs.json index ba6a2bdc11a..65a36ee7585 100644 --- a/packages/react/src/Token/Token.docs.json +++ b/packages/react/src/Token/Token.docs.json @@ -85,6 +85,7 @@ "subcomponents": [ { "name": "IssueLabelToken", + "deprecated": true, "props": [ { "name": "fillColor", From 5638efcd8508460626eafd9373fc9f9f26fe2d8f Mon Sep 17 00:00:00 2001 From: tay1orjones <3360588+tay1orjones@users.noreply.github.com> Date: Fri, 20 Nov 2026 17:45:58 +0000 Subject: [PATCH 2/2] Address review: minor changeset, IssueLabel supports id Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> --- .changeset/deprecate-issue-label-token.md | 2 +- packages/react/src/Token/IssueLabelToken.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.changeset/deprecate-issue-label-token.md b/.changeset/deprecate-issue-label-token.md index e7c01bd34dd..1343e7741bd 100644 --- a/.changeset/deprecate-issue-label-token.md +++ b/.changeset/deprecate-issue-label-token.md @@ -1,5 +1,5 @@ --- -'@primer/react': patch +'@primer/react': minor --- Deprecate `IssueLabelToken` in favor of `IssueLabel` from `@primer/react/experimental`. diff --git a/packages/react/src/Token/IssueLabelToken.tsx b/packages/react/src/Token/IssueLabelToken.tsx index 0351add428f..3e4cc52e903 100644 --- a/packages/react/src/Token/IssueLabelToken.tsx +++ b/packages/react/src/Token/IssueLabelToken.tsx @@ -25,8 +25,8 @@ export interface IssueLabelTokenProps extends TokenBaseProps { * @deprecated Use `IssueLabel` from `@primer/react/experimental` instead. * `fillColor` carries over (as a `#hex` value). `IssueLabel` also accepts a `variant` for preset colors and * renders a `span`, `a` (with `href`) or `button` (with `onClick`) based on the props provided. - * It has no `text`, `size`, `isSelected`, `id`, `onRemove` or `hideRemoveButton` props: pass the label text as `children` - * and render your own remove control if one is needed. + * It has no `text`, `size`, `isSelected`, `onRemove` or `hideRemoveButton` props: pass the label text as `children` + * and render your own remove control if one is needed. `id` is forwarded to the root element, so convert numeric ids to strings. */ const IssueLabelToken = forwardRef((props, forwardedRef) => { const {