From e5943837d57c0d120ec25656b7cc92bc95f19341 Mon Sep 17 00:00:00 2001 From: "manuel.carrera" Date: Mon, 18 Sep 2023 10:49:31 -0600 Subject: [PATCH 01/17] docs: Add info to maintaining doc about deprecations --- modules/docs/mdx/MAINTAINING.mdx | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/modules/docs/mdx/MAINTAINING.mdx b/modules/docs/mdx/MAINTAINING.mdx index f76767f206..d30784aec1 100644 --- a/modules/docs/mdx/MAINTAINING.mdx +++ b/modules/docs/mdx/MAINTAINING.mdx @@ -20,6 +20,8 @@ Kit! - [Forward Merge Workflow](#forward-merge-workflow) - [Release Minor Workflow](#release-minor-workflow) - [Release Workflow](#release-workflow) +- [Deprecations](#deprecations) + - [How To Deprecate](#how-to-deprecate) - [Releases](#releases) - [Patch Releases](#patch-releases) - [Minor Releases](#minor-releases) @@ -123,6 +125,28 @@ are initiated automatically when a commit is merged to `prerelease/minor` or `pr a more in-depth review of the workflow, [view the source code](https://github.com/Workday/canvas-kit/blob/master/.github/workflows/release-minor.yml). +## Deprecations + +We add the [@deprecated](https://jsdoc.app/tags-deprecated.html) from JSDoc to code that we plan to +remove in the near future. Al though you can still consume this code, we want consumers to move to a +utility or component that is more stable. + +### How To Deprecate + +When deprecating a component or utility use the following pattern: + +```tsx +/** + * ### ⚠️ ${ComponentName/Utility} has been deprecated. Optionally give a reason as to why. ⚠️ + * - Please consider using [`${OtherComponent/Utility}`](insert link to documentation) in ${packageName}. + * @deprecated + */ +``` + +Attach this block of JSDoc directly above to all exported members that relate to the deprecation. + +Be sure to add any additional information to an upgrade guide if necessary. + ## Releases ### Patch Releases @@ -270,12 +294,13 @@ last release tag. So for example, a V8 canary would look something like this: ## Codemods We use codemods to reduce friction for consumers as they make changes and do upgrades. Codemods are -accompany major version releases since v5, and can also be released in minor releases if users want to apply some changes sooner. +accompany major version releases since v5, and can also be released in minor releases if users want +to apply some changes sooner. ### Add a New Codemod -Adding a new codemod is pretty straightforward, but this guide will make sure you don't miss any steps -along the way. +Adding a new codemod is pretty straightforward, but this guide will make sure you don't miss any +steps along the way. First, you need to add a new command to the root CLI. For this example, we'll pretend you're adding a new v10 codemod. From cd53cbcb56f2acc08ec8eeae35a3a00e8df44770 Mon Sep 17 00:00:00 2001 From: "manuel.carrera" Date: Fri, 22 Sep 2023 11:08:45 -0600 Subject: [PATCH 02/17] fix: Move deprecation --- modules/docs/mdx/MAINTAINING.mdx | 47 ++++++++++++++++---------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/modules/docs/mdx/MAINTAINING.mdx b/modules/docs/mdx/MAINTAINING.mdx index d30784aec1..ca6b67903d 100644 --- a/modules/docs/mdx/MAINTAINING.mdx +++ b/modules/docs/mdx/MAINTAINING.mdx @@ -20,8 +20,6 @@ Kit! - [Forward Merge Workflow](#forward-merge-workflow) - [Release Minor Workflow](#release-minor-workflow) - [Release Workflow](#release-workflow) -- [Deprecations](#deprecations) - - [How To Deprecate](#how-to-deprecate) - [Releases](#releases) - [Patch Releases](#patch-releases) - [Minor Releases](#minor-releases) @@ -29,6 +27,8 @@ Kit! - [Canary Releases](#canary-releases) - [Codemods](#codemods) - [Add a New Codemod](#add-a-new-codemod) +- [Deprecations](#deprecations) + - [How To Deprecate](#how-to-deprecate) ## Branches @@ -125,27 +125,6 @@ are initiated automatically when a commit is merged to `prerelease/minor` or `pr a more in-depth review of the workflow, [view the source code](https://github.com/Workday/canvas-kit/blob/master/.github/workflows/release-minor.yml). -## Deprecations - -We add the [@deprecated](https://jsdoc.app/tags-deprecated.html) from JSDoc to code that we plan to -remove in the near future. Al though you can still consume this code, we want consumers to move to a -utility or component that is more stable. - -### How To Deprecate - -When deprecating a component or utility use the following pattern: - -```tsx -/** - * ### ⚠️ ${ComponentName/Utility} has been deprecated. Optionally give a reason as to why. ⚠️ - * - Please consider using [`${OtherComponent/Utility}`](insert link to documentation) in ${packageName}. - * @deprecated - */ -``` - -Attach this block of JSDoc directly above to all exported members that relate to the deprecation. - -Be sure to add any additional information to an upgrade guide if necessary. ## Releases @@ -405,3 +384,25 @@ describe('Example Codemod', () => { ``` And that's it! You're done. Stage your changes, commit, and push up a PR. + +## Deprecations + +We add the [@deprecated](https://jsdoc.app/tags-deprecated.html) from JSDoc to code that we plan to +remove in the near future. Al though you can still consume this code, we want consumers to move to a +utility or component that is more stable. + +### How To Deprecate + +When deprecating a component or utility use the following pattern: + +```tsx +/** + * ### ⚠️ ${ComponentName/Utility} has been deprecated. Optionally give a reason as to why. ⚠️ + * - Please consider using [`${OtherComponent/Utility}`](insert link to documentation) in ${packageName}. + * @deprecated + */ +``` + +Attach this block of JSDoc directly above to all exported members that relate to the deprecation. + +Be sure to add any additional information to an upgrade guide if necessary. From ef19cfac9266808634265a9bdae78c9eea0272f8 Mon Sep 17 00:00:00 2001 From: "manuel.carrera" Date: Mon, 25 Sep 2023 10:03:08 -0600 Subject: [PATCH 03/17] fix: Update doc --- modules/docs/mdx/MAINTAINING.mdx | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/modules/docs/mdx/MAINTAINING.mdx b/modules/docs/mdx/MAINTAINING.mdx index ca6b67903d..ec792d422c 100644 --- a/modules/docs/mdx/MAINTAINING.mdx +++ b/modules/docs/mdx/MAINTAINING.mdx @@ -29,6 +29,8 @@ Kit! - [Add a New Codemod](#add-a-new-codemod) - [Deprecations](#deprecations) - [How To Deprecate](#how-to-deprecate) + - [With No Existing JSDoc Block](#with-no-existing-jsdoc-block) + - [With Existing JSDoc Block](#with-existing-jsdoc-block) ## Branches @@ -125,7 +127,6 @@ are initiated automatically when a commit is merged to `prerelease/minor` or `pr a more in-depth review of the workflow, [view the source code](https://github.com/Workday/canvas-kit/blob/master/.github/workflows/release-minor.yml). - ## Releases ### Patch Releases @@ -395,11 +396,19 @@ utility or component that is more stable. When deprecating a component or utility use the following pattern: +#### With No Existing JSDoc Block + ```tsx /** - * ### ⚠️ ${ComponentName/Utility} has been deprecated. Optionally give a reason as to why. ⚠️ - * - Please consider using [`${OtherComponent/Utility}`](insert link to documentation) in ${packageName}. - * @deprecated + * @deprecated ⚠️ ${ComponentName/Utility} has been deprecated. ${Provide an explanation and/or alternative}. + */ +``` + +#### With an Existing JSDoc Block + +```tsx +/** ${Existing JSDOC code block for Component/Utility} + * @deprecated ⚠️ ${ComponentName/Utility} has been deprecated. ${Provide an explanation and/or alternative}. */ ``` From 49f34554b26d6a1b9773607187f5bb61070f82d3 Mon Sep 17 00:00:00 2001 From: "manuel.carrera" Date: Mon, 25 Sep 2023 10:25:37 -0600 Subject: [PATCH 04/17] fix: Update references to deprecated --- .../common/lib/theming/useThemeRTL.ts | 2 +- modules/preview-react/menu/lib/Menu.tsx | 3 +-- modules/preview-react/menu/lib/MenuItem.tsx | 5 ++-- .../text-input/lib/hooks/useTextInputModel.ts | 2 +- modules/react/common/lib/utils/components.ts | 4 ++-- modules/react/common/lib/utils/models.ts | 8 +++---- modules/react/common/lib/utils/useUniqueId.ts | 2 +- .../status-indicator/lib/StatusIndicator.tsx | 24 +++++-------------- modules/react/tabs/lib/Tabs.tsx | 2 +- 9 files changed, 19 insertions(+), 33 deletions(-) diff --git a/modules/labs-react/common/lib/theming/useThemeRTL.ts b/modules/labs-react/common/lib/theming/useThemeRTL.ts index 40b7971ab2..a42b53c681 100644 --- a/modules/labs-react/common/lib/theming/useThemeRTL.ts +++ b/modules/labs-react/common/lib/theming/useThemeRTL.ts @@ -18,7 +18,7 @@ const getConvertedStyles = ( }; /** - * @deprecated Now that IE11 is no longer supported, we encourage consumers to use [CSS logical properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties) + * @deprecated ⚠️ `useThemeRTL` has been deprecated. Now that IE11 is no longer supported, we encourage consumers to use [CSS logical properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties) * * * A helpful hook for supporting bidirectional styles. diff --git a/modules/preview-react/menu/lib/Menu.tsx b/modules/preview-react/menu/lib/Menu.tsx index 7cfbe28f81..66bd45071b 100644 --- a/modules/preview-react/menu/lib/Menu.tsx +++ b/modules/preview-react/menu/lib/Menu.tsx @@ -78,7 +78,7 @@ const List = styled('ul')({ }); /** - * As of Canvas Kit v8, Menu is being deprecated. + * @deprecated ⚠️ `DeprecatedMenu` has been deprecated. As of Canvas Kit v8, `Menu` is being deprecated. * It will be removed in v10. Please see the [upgrade * guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page) for * more information. @@ -90,7 +90,6 @@ const List = styled('ul')({ * * Undocumented props are spread to the underlying `
    ` element. * - * @deprecated */ export class DeprecatedMenu extends React.Component { private id = generateUniqueId(); diff --git a/modules/preview-react/menu/lib/MenuItem.tsx b/modules/preview-react/menu/lib/MenuItem.tsx index 053f27f013..1df90f0f30 100644 --- a/modules/preview-react/menu/lib/MenuItem.tsx +++ b/modules/preview-react/menu/lib/MenuItem.tsx @@ -262,14 +262,13 @@ const scrollIntoViewIfNeeded = (elem: HTMLElement, centerIfNeeded = true): void * - `tabindex={-1}` * - `id`s following this pattern: `${MenuId}-${index}` * - * As of Canvas Kit v8, Menu is being deprecated. - * It will be removed in v10. Please see the [upgrade + * * @deprecated ⚠️ `DeprecatedMenuItem` has been deprecated. As of Canvas Kit v8, Menu is being deprecated. + * It will be removed in a future major version. Please see the [upgrade * guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page) for * more information. * * Undocumented props are spread to the underlying `
  • ` element. * - * @deprecated */ export class DeprecatedMenuItem extends React.Component { ref = React.createRef(); diff --git a/modules/preview-react/text-input/lib/hooks/useTextInputModel.ts b/modules/preview-react/text-input/lib/hooks/useTextInputModel.ts index c7c7ccd7f1..5226ebaeb1 100644 --- a/modules/preview-react/text-input/lib/hooks/useTextInputModel.ts +++ b/modules/preview-react/text-input/lib/hooks/useTextInputModel.ts @@ -1,4 +1,4 @@ import {useFormFieldModel} from '@workday/canvas-kit-preview-react/form-field'; -/** @deprecated Please use `useFormFieldModel` instead */ +/** @deprecated ⚠️ `useTextInputModel` is deprecated. Please use `useFormFieldModel` instead */ export const useTextInputModel = useFormFieldModel; diff --git a/modules/react/common/lib/utils/components.ts b/modules/react/common/lib/utils/components.ts index 6b37ac53db..47165bb222 100644 --- a/modules/react/common/lib/utils/components.ts +++ b/modules/react/common/lib/utils/components.ts @@ -388,7 +388,7 @@ export const createSubcomponent = < elemPropsHook, subComponents, }: { - /** @deprecated You no longer need to use displayName. A `displayName` will be automatically added if it belongs to a container */ + /** @deprecated ⚠️ `displayName` has been deprecated. You no longer need to use displayName. A `displayName` will be automatically added if it belongs to a container */ displayName?: string; modelHook: TModelHook; elemPropsHook?: TElemPropsHook; @@ -661,7 +661,7 @@ export const createHook = , PO extends {}, PI extends }; /** - * @deprecated use `createSubModelElemPropsHook` instead + * @deprecated ⚠️ `subModelHook` has been deprecated. Use `createSubModelElemPropsHook` instead. */ export const subModelHook = , SM extends Model, O extends {}>( fn: (model: M) => SM, diff --git a/modules/react/common/lib/utils/models.ts b/modules/react/common/lib/utils/models.ts index ba7da22f39..36f6d65048 100644 --- a/modules/react/common/lib/utils/models.ts +++ b/modules/react/common/lib/utils/models.ts @@ -2,7 +2,7 @@ import React from 'react'; /** - * @deprecated The returned model is now inferred from `createModelHook` + * @deprecated ⚠️ `Model` type has been deprecated. The returned model is now inferred from `createModelHook` */ export type Model = { state: State; @@ -64,7 +64,7 @@ type ToCallbackConfig< * id?: string * } & Partial> * - * @deprecated `createModelHook` now infers the config type + * @deprecated ⚠️ `ToModelConfig` has been deprecated. `createModelHook` now infers the config type */ export type ToModelConfig< TState extends Record, @@ -97,7 +97,7 @@ export type ToModelConfig< * } * }) * - * @deprecated `createModelHook` uses Template Literal Types to create event map types + * @deprecated ⚠️ `createEventMap` has been deprecated. Use `createModelHook` instead. It uses Template Literal Types to create event map types */ export const createEventMap = () => < TGuardMap extends Record, @@ -131,7 +131,7 @@ const keys = (input: T) => Object.keys(input) as (keyof T)[]; * } * } * }) - * @deprecated Use `createModelHook` instead + * @deprecated ⚠️ `useEventMap` has been deprecated. Please use `createModelHook` instead. */ export const useEventMap = < TEvents extends IEvent, diff --git a/modules/react/common/lib/utils/useUniqueId.ts b/modules/react/common/lib/utils/useUniqueId.ts index 44a9931f0a..2ad946926f 100644 --- a/modules/react/common/lib/utils/useUniqueId.ts +++ b/modules/react/common/lib/utils/useUniqueId.ts @@ -32,7 +32,7 @@ export const useUniqueId = (id?: string) => { /** * Backwards-compatible change to converting to hook - * @deprecated + * @deprecated ⚠️ `uniqueId` has been deprecated. * TODO: Remove in major release */ export const uniqueId = useUniqueId; diff --git a/modules/react/status-indicator/lib/StatusIndicator.tsx b/modules/react/status-indicator/lib/StatusIndicator.tsx index 1b6605be79..94693c6b82 100644 --- a/modules/react/status-indicator/lib/StatusIndicator.tsx +++ b/modules/react/status-indicator/lib/StatusIndicator.tsx @@ -6,9 +6,7 @@ import {borderRadius, colors, type, space, CSSProperties} from '@workday/canvas- import styled from '@emotion/styled'; /** - * ### ⚠️ Status Indicator has been deprecated and will be removed in v11 ⚠️ - * - Please consider using [`Status Indicator`](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) in preview - * @deprecated + * @deprecated ⚠️ Status Indicator has been deprecated and will be removed in a future major version. Please consider using [`Status Indicator`](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) in preview */ export enum StatusIndicatorType { Gray = 'gray', @@ -20,9 +18,7 @@ export enum StatusIndicatorType { } /** - * ### ⚠️ Status Indicator has been deprecated and will be removed in v11 ⚠️ - * - Please consider using [`Status Indicator`](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) in preview - * @deprecated + * @deprecated ⚠️ Status Indicator has been deprecated and will be removed in a future major version. Please consider using [`Status Indicator`](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) in preview */ export enum StatusIndicatorEmphasis { High = 'high', @@ -30,9 +26,7 @@ export enum StatusIndicatorEmphasis { } /** - * ### ⚠️ Status Indicator has been deprecated and will be removed in v11 ⚠️ - * - Please consider using [`Status Indicator`](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) in preview - * @deprecated + * @deprecated ⚠️ Status Indicator has been deprecated and will be removed in a future major version. Please consider using [`Status Indicator`](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) in preview */ export interface StatusIndicatorGenericStyle extends GenericStyle { styles: CSSProperties; @@ -44,9 +38,7 @@ export interface StatusIndicatorGenericStyle extends GenericStyle { } /** - * ### ⚠️ Status Indicator has been deprecated and will be removed in v11 ⚠️ - * - Please consider using [`Status Indicator`](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) in preview - * @deprecated + * @deprecated ⚠️ Status Indicator has been deprecated and will be removed in a future major version. Please consider using [`Status Indicator`](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) in preview */ export const statusIndicatorStyles: StatusIndicatorGenericStyle = { classname: 'status-indicator', @@ -126,9 +118,7 @@ export const statusIndicatorStyles: StatusIndicatorGenericStyle = { }; /** - * ### ⚠️ Status Indicator has been deprecated and will be removed in v11 ⚠️ - * - Please consider using [`Status Indicator`](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) in preview - * @deprecated + * @deprecated ⚠️ Status Indicator has been deprecated and will be removed in a future major version. Please consider using [`Status Indicator`](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) in preview */ export interface StatusIndicatorProps extends React.HTMLAttributes { /** @@ -172,9 +162,7 @@ const StatusLabel = styled('span')({ }); /** - * ### ⚠️ Status Indicator has been deprecated and will be removed in v11 ⚠️ - * - Please consider using [`Status Indicator`](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) in preview - * @deprecated + * @deprecated ⚠️ Status Indicator has been deprecated and will be removed in a future major version. Please consider using [`Status Indicator`](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) in preview */ export class StatusIndicator extends React.Component { public static Type = StatusIndicatorType; diff --git a/modules/react/tabs/lib/Tabs.tsx b/modules/react/tabs/lib/Tabs.tsx index b76045290a..e98d2ce63f 100644 --- a/modules/react/tabs/lib/Tabs.tsx +++ b/modules/react/tabs/lib/Tabs.tsx @@ -112,7 +112,7 @@ export const Tabs = createContainer()({ */ OverflowButton: TabsOverflowButton, /** - * @deprecated Use `Tabs.Menu.Popper` instead + * @deprecated ⚠️ `MenuPopper` has been deprecated. Please use `Tabs.Menu.Popper` instead. */ MenuPopper: TabsMenuPopper, /** From d6c1d413ec7d4adbd37069804f15c45ea398c2c9 Mon Sep 17 00:00:00 2001 From: "manuel.carrera" Date: Mon, 25 Sep 2023 12:34:34 -0600 Subject: [PATCH 05/17] fix: Clean up maintaining docs --- modules/docs/mdx/MAINTAINING.mdx | 73 +++++++++++++++---- .../common/lib/theming/useThemeRTL.ts | 5 +- modules/preview-react/menu/lib/MenuItem.tsx | 7 +- .../text-input/lib/hooks/useTextInputModel.ts | 2 +- modules/react/common/lib/utils/components.ts | 4 +- modules/react/common/lib/utils/models.ts | 8 +- modules/react/common/lib/utils/useUniqueId.ts | 3 +- .../status-indicator/lib/StatusIndicator.tsx | 12 +-- 8 files changed, 76 insertions(+), 38 deletions(-) diff --git a/modules/docs/mdx/MAINTAINING.mdx b/modules/docs/mdx/MAINTAINING.mdx index ec792d422c..2410a7ccd9 100644 --- a/modules/docs/mdx/MAINTAINING.mdx +++ b/modules/docs/mdx/MAINTAINING.mdx @@ -28,9 +28,6 @@ Kit! - [Codemods](#codemods) - [Add a New Codemod](#add-a-new-codemod) - [Deprecations](#deprecations) - - [How To Deprecate](#how-to-deprecate) - - [With No Existing JSDoc Block](#with-no-existing-jsdoc-block) - - [With Existing JSDoc Block](#with-existing-jsdoc-block) ## Branches @@ -388,30 +385,76 @@ And that's it! You're done. Stage your changes, commit, and push up a PR. ## Deprecations -We add the [@deprecated](https://jsdoc.app/tags-deprecated.html) from JSDoc to code that we plan to -remove in the near future. Al though you can still consume this code, we want consumers to move to a -utility or component that is more stable. +We add the [@deprecated](https://jsdoc.app/tags-deprecated.html) JSDoc tag to code we plan to remove +in a future major release. This signals consumers to migrate to a more stable alternative before the +deprecated code is removed. -### How To Deprecate +Add the `@deprecated` tag to the JSDoc comment directly above all exported declarations you wish to +deprecate. Create a new JSDoc comment if one doesn't already exist. -When deprecating a component or utility use the following pattern: +```tsx +/** + * ...existing JSDoc block, if present... + * + * @deprecated ⚠️ ${Deprecated Name} has been deprecated and will be removed in a future major release. ${Provide a migration strategy} + */ +export... +``` + +The provided migration strategy can take on any form as long as it gives the consumer a path forward +once the deprecated code is removed. + +For example, we'll deprecate a component in our Main package before replacing it with an updated +version of the component in our Preview or Labs packages. Note the optional Storybook link to the +updated component. -#### With No Existing JSDoc Block +```tsx +/** + * @deprecated ⚠️ Status Indicator in Main has been deprecated and will be removed in a future major release. Please use [`Status Indicator`](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) in Preview instead. + */ +export class StatusIndicator... +``` + +Here's an example of a deprecated utility function. ```tsx /** - * @deprecated ⚠️ ${ComponentName/Utility} has been deprecated. ${Provide an explanation and/or alternative}. + * @deprecated ⚠️ subModelHook has been deprecated and will be removed in a future major release. Please use `createSubModelElemPropsHook` instead. */ +export const subModelHook... ``` -#### With an Existing JSDoc Block +You may share the same `@deprecation` note for multiple deprecations related to the same component. ```tsx -/** ${Existing JSDOC code block for Component/Utility} - * @deprecated ⚠️ ${ComponentName/Utility} has been deprecated. ${Provide an explanation and/or alternative}. +/** + * @deprecated ⚠️ Status Indicator in Main has been deprecated and will be removed in a future major release. Please use [`Status Indicator`](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) in Preview instead. */ +export enum StatusIndicatorType... + +/** + * @deprecated ⚠️ Status Indicator in Main has been deprecated and will be removed in a future major release. Please use [`Status Indicator`](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) in Preview instead. + */ +export interface StatusIndicatorProps... + +/** + * @deprecated ⚠️ Status Indicator in Main has been deprecated and will be removed in a future major release. Please use [`Status Indicator`](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) in Preview instead. + */ +export class StatusIndicator... ``` -Attach this block of JSDoc directly above to all exported members that relate to the deprecation. +Finally, be sure to notify users of the deprecation in the corresponding +[Upgrade Guide](https://github.com/Workday/canvas-kit/tree/master/modules/docs/mdx) MDX. -Be sure to add any additional information to an upgrade guide if necessary. +```md +## Deprecations + +... + +### ${Deprecated Name} + +**PR:** [#${PR number where the deprecation took place}](https://github.com/Workday/canvas-kit/pull/${PR number}) + +We've deprecated ${Deprecated Name} ${Optional: Include package name to disambiguate (e.g., "from Labs")} ${Provide a +migration strategy} +``` diff --git a/modules/labs-react/common/lib/theming/useThemeRTL.ts b/modules/labs-react/common/lib/theming/useThemeRTL.ts index a42b53c681..24a83b60b6 100644 --- a/modules/labs-react/common/lib/theming/useThemeRTL.ts +++ b/modules/labs-react/common/lib/theming/useThemeRTL.ts @@ -18,9 +18,6 @@ const getConvertedStyles = ( }; /** - * @deprecated ⚠️ `useThemeRTL` has been deprecated. Now that IE11 is no longer supported, we encourage consumers to use [CSS logical properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties) - * - * * A helpful hook for supporting bidirectional styles. * * Read below for more detail or [view the docs](https://github.com/Workday/canvas-kit/blob/master/modules/labs-react/common/README.md#useThemeRTL). * @@ -48,6 +45,8 @@ const getConvertedStyles = ( * * return ; * } + * + * @deprecated ⚠️ `useThemeRTL` has been deprecated and will be removed in a future major version. Now that IE11 is no longer supported, we encourage consumers to use [CSS logical properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties) */ export function useThemeRTL() { const theme = useTheme(); diff --git a/modules/preview-react/menu/lib/MenuItem.tsx b/modules/preview-react/menu/lib/MenuItem.tsx index 1df90f0f30..e51226e2ad 100644 --- a/modules/preview-react/menu/lib/MenuItem.tsx +++ b/modules/preview-react/menu/lib/MenuItem.tsx @@ -262,13 +262,10 @@ const scrollIntoViewIfNeeded = (elem: HTMLElement, centerIfNeeded = true): void * - `tabindex={-1}` * - `id`s following this pattern: `${MenuId}-${index}` * - * * @deprecated ⚠️ `DeprecatedMenuItem` has been deprecated. As of Canvas Kit v8, Menu is being deprecated. - * It will be removed in a future major version. Please see the [upgrade - * guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page) for - * more information. - * * Undocumented props are spread to the underlying `
  • ` element. * + * @deprecated ⚠️ `DeprecatedMenuItem` has been deprecated and will be removed in a future major version. Please see the [Upgrade Guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page) for more information. + * */ export class DeprecatedMenuItem extends React.Component { ref = React.createRef(); diff --git a/modules/preview-react/text-input/lib/hooks/useTextInputModel.ts b/modules/preview-react/text-input/lib/hooks/useTextInputModel.ts index 5226ebaeb1..6204c2ebba 100644 --- a/modules/preview-react/text-input/lib/hooks/useTextInputModel.ts +++ b/modules/preview-react/text-input/lib/hooks/useTextInputModel.ts @@ -1,4 +1,4 @@ import {useFormFieldModel} from '@workday/canvas-kit-preview-react/form-field'; -/** @deprecated ⚠️ `useTextInputModel` is deprecated. Please use `useFormFieldModel` instead */ +/** @deprecated ⚠️ `useTextInputModel` is deprecated and will be removed in a future major version. Please use `useFormFieldModel` instead. */ export const useTextInputModel = useFormFieldModel; diff --git a/modules/react/common/lib/utils/components.ts b/modules/react/common/lib/utils/components.ts index 47165bb222..d728dacbb5 100644 --- a/modules/react/common/lib/utils/components.ts +++ b/modules/react/common/lib/utils/components.ts @@ -388,7 +388,7 @@ export const createSubcomponent = < elemPropsHook, subComponents, }: { - /** @deprecated ⚠️ `displayName` has been deprecated. You no longer need to use displayName. A `displayName` will be automatically added if it belongs to a container */ + /** @deprecated ⚠️ `displayName` has been deprecated and will be removed in a future major version. You no longer need to use displayName. A `displayName` will be automatically added if it belongs to a container. */ displayName?: string; modelHook: TModelHook; elemPropsHook?: TElemPropsHook; @@ -661,7 +661,7 @@ export const createHook = , PO extends {}, PI extends }; /** - * @deprecated ⚠️ `subModelHook` has been deprecated. Use `createSubModelElemPropsHook` instead. + * @deprecated ⚠️ `subModelHook` has been deprecated and will be removed in a future major version. Please use `createSubModelElemPropsHook` instead. */ export const subModelHook = , SM extends Model, O extends {}>( fn: (model: M) => SM, diff --git a/modules/react/common/lib/utils/models.ts b/modules/react/common/lib/utils/models.ts index 36f6d65048..c804c61539 100644 --- a/modules/react/common/lib/utils/models.ts +++ b/modules/react/common/lib/utils/models.ts @@ -2,7 +2,7 @@ import React from 'react'; /** - * @deprecated ⚠️ `Model` type has been deprecated. The returned model is now inferred from `createModelHook` + * @deprecated ⚠️ `Model` type has been deprecated and will be removed in a future major version. The returned model is now inferred from `createModelHook` */ export type Model = { state: State; @@ -64,7 +64,7 @@ type ToCallbackConfig< * id?: string * } & Partial> * - * @deprecated ⚠️ `ToModelConfig` has been deprecated. `createModelHook` now infers the config type + * @deprecated ⚠️ `ToModelConfig` has been deprecated and will be removed in a future major version. Please use `createModelHook` instead since it infers the config type. */ export type ToModelConfig< TState extends Record, @@ -97,7 +97,7 @@ export type ToModelConfig< * } * }) * - * @deprecated ⚠️ `createEventMap` has been deprecated. Use `createModelHook` instead. It uses Template Literal Types to create event map types + * @deprecated ⚠️ `createEventMap` has been deprecated and will be removed in a future major version. Please use `createModelHook` instead. It uses Template Literal Types to create event map types. */ export const createEventMap = () => < TGuardMap extends Record, @@ -131,7 +131,7 @@ const keys = (input: T) => Object.keys(input) as (keyof T)[]; * } * } * }) - * @deprecated ⚠️ `useEventMap` has been deprecated. Please use `createModelHook` instead. + * @deprecated ⚠️ `useEventMap` has been deprecated and will be removed in a future major version. Please use `createModelHook` instead. */ export const useEventMap = < TEvents extends IEvent, diff --git a/modules/react/common/lib/utils/useUniqueId.ts b/modules/react/common/lib/utils/useUniqueId.ts index 2ad946926f..57527766da 100644 --- a/modules/react/common/lib/utils/useUniqueId.ts +++ b/modules/react/common/lib/utils/useUniqueId.ts @@ -32,8 +32,7 @@ export const useUniqueId = (id?: string) => { /** * Backwards-compatible change to converting to hook - * @deprecated ⚠️ `uniqueId` has been deprecated. - * TODO: Remove in major release + * @deprecated ⚠️ `uniqueId` has been deprecated and will be removed in a future major version. Please use `useUniqueId` instead. */ export const uniqueId = useUniqueId; diff --git a/modules/react/status-indicator/lib/StatusIndicator.tsx b/modules/react/status-indicator/lib/StatusIndicator.tsx index 94693c6b82..18debbe5b7 100644 --- a/modules/react/status-indicator/lib/StatusIndicator.tsx +++ b/modules/react/status-indicator/lib/StatusIndicator.tsx @@ -6,7 +6,7 @@ import {borderRadius, colors, type, space, CSSProperties} from '@workday/canvas- import styled from '@emotion/styled'; /** - * @deprecated ⚠️ Status Indicator has been deprecated and will be removed in a future major version. Please consider using [`Status Indicator`](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) in preview + * @deprecated ⚠️ Status Indicator has been deprecated and will be removed in a future major version. Please use [`Status Indicator`](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) in Preview instead. */ export enum StatusIndicatorType { Gray = 'gray', @@ -18,7 +18,7 @@ export enum StatusIndicatorType { } /** - * @deprecated ⚠️ Status Indicator has been deprecated and will be removed in a future major version. Please consider using [`Status Indicator`](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) in preview + * @deprecated ⚠️ Status Indicator has been deprecated and will be removed in a future major version. Please use [`Status Indicator`](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) in Preview instead. */ export enum StatusIndicatorEmphasis { High = 'high', @@ -26,7 +26,7 @@ export enum StatusIndicatorEmphasis { } /** - * @deprecated ⚠️ Status Indicator has been deprecated and will be removed in a future major version. Please consider using [`Status Indicator`](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) in preview + * @deprecated ⚠️ Status Indicator has been deprecated and will be removed in a future major version. Please use [`Status Indicator`](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) in Preview instead. */ export interface StatusIndicatorGenericStyle extends GenericStyle { styles: CSSProperties; @@ -38,7 +38,7 @@ export interface StatusIndicatorGenericStyle extends GenericStyle { } /** - * @deprecated ⚠️ Status Indicator has been deprecated and will be removed in a future major version. Please consider using [`Status Indicator`](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) in preview + * @deprecated ⚠️ Status Indicator has been deprecated and will be removed in a future major version. Please use [`Status Indicator`](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) in Preview instead. */ export const statusIndicatorStyles: StatusIndicatorGenericStyle = { classname: 'status-indicator', @@ -118,7 +118,7 @@ export const statusIndicatorStyles: StatusIndicatorGenericStyle = { }; /** - * @deprecated ⚠️ Status Indicator has been deprecated and will be removed in a future major version. Please consider using [`Status Indicator`](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) in preview + * @deprecated ⚠️ Status Indicator has been deprecated and will be removed in a future major version. Please use [`Status Indicator`](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) in Preview instead. */ export interface StatusIndicatorProps extends React.HTMLAttributes { /** @@ -162,7 +162,7 @@ const StatusLabel = styled('span')({ }); /** - * @deprecated ⚠️ Status Indicator has been deprecated and will be removed in a future major version. Please consider using [`Status Indicator`](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) in preview + * @deprecated ⚠️ Status Indicator has been deprecated and will be removed in a future major version. Please use [`Status Indicator`](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) in Preview instead. */ export class StatusIndicator extends React.Component { public static Type = StatusIndicatorType; From 3bf767a334fa06dc2f998cdf4dd31288dbf0ae53 Mon Sep 17 00:00:00 2001 From: Manuel Carrera Date: Mon, 25 Sep 2023 14:28:41 -0600 Subject: [PATCH 06/17] Update modules/react/common/lib/utils/models.ts Co-authored-by: James Fan --- modules/react/common/lib/utils/models.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/react/common/lib/utils/models.ts b/modules/react/common/lib/utils/models.ts index c804c61539..bef43ceb11 100644 --- a/modules/react/common/lib/utils/models.ts +++ b/modules/react/common/lib/utils/models.ts @@ -2,7 +2,7 @@ import React from 'react'; /** - * @deprecated ⚠️ `Model` type has been deprecated and will be removed in a future major version. The returned model is now inferred from `createModelHook` + * @deprecated ⚠️ `Model` has been deprecated and will be removed in a future major version. The returned model is now inferred from `createModelHook`. */ export type Model = { state: State; From 733da6cff05276363f7abb454022328aa2bac9b8 Mon Sep 17 00:00:00 2001 From: Manuel Carrera Date: Mon, 25 Sep 2023 14:28:49 -0600 Subject: [PATCH 07/17] Update modules/docs/mdx/MAINTAINING.mdx Co-authored-by: James Fan --- modules/docs/mdx/MAINTAINING.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/docs/mdx/MAINTAINING.mdx b/modules/docs/mdx/MAINTAINING.mdx index 2410a7ccd9..9978372f23 100644 --- a/modules/docs/mdx/MAINTAINING.mdx +++ b/modules/docs/mdx/MAINTAINING.mdx @@ -394,7 +394,7 @@ deprecate. Create a new JSDoc comment if one doesn't already exist. ```tsx /** - * ...existing JSDoc block, if present... + * ...existing JSDoc comment, if present... * * @deprecated ⚠️ ${Deprecated Name} has been deprecated and will be removed in a future major release. ${Provide a migration strategy} */ From bd840f47c6c53d6c96927cfceb1ef71c68f3ee95 Mon Sep 17 00:00:00 2001 From: Manuel Carrera Date: Mon, 25 Sep 2023 14:29:13 -0600 Subject: [PATCH 08/17] Update modules/labs-react/common/lib/theming/useThemeRTL.ts Co-authored-by: James Fan --- modules/labs-react/common/lib/theming/useThemeRTL.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/labs-react/common/lib/theming/useThemeRTL.ts b/modules/labs-react/common/lib/theming/useThemeRTL.ts index 24a83b60b6..ba789b110a 100644 --- a/modules/labs-react/common/lib/theming/useThemeRTL.ts +++ b/modules/labs-react/common/lib/theming/useThemeRTL.ts @@ -46,7 +46,7 @@ const getConvertedStyles = ( * return ; * } * - * @deprecated ⚠️ `useThemeRTL` has been deprecated and will be removed in a future major version. Now that IE11 is no longer supported, we encourage consumers to use [CSS logical properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties) + * @deprecated ⚠️ `useThemeRTL` has been deprecated and will be removed in a future major version. Now that IE11 is no longer supported, we encourage consumers to use [CSS logical properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties). */ export function useThemeRTL() { const theme = useTheme(); From 9e8b1d001c878cbd3cdd76c49c2766bbcc34df1b Mon Sep 17 00:00:00 2001 From: Manuel Carrera Date: Mon, 25 Sep 2023 14:29:22 -0600 Subject: [PATCH 09/17] Update modules/react/common/lib/utils/components.ts Co-authored-by: James Fan --- modules/react/common/lib/utils/components.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/react/common/lib/utils/components.ts b/modules/react/common/lib/utils/components.ts index d728dacbb5..8759a3d140 100644 --- a/modules/react/common/lib/utils/components.ts +++ b/modules/react/common/lib/utils/components.ts @@ -388,7 +388,7 @@ export const createSubcomponent = < elemPropsHook, subComponents, }: { - /** @deprecated ⚠️ `displayName` has been deprecated and will be removed in a future major version. You no longer need to use displayName. A `displayName` will be automatically added if it belongs to a container. */ + /** @deprecated ⚠️ `displayName` has been deprecated and will be removed in a future major version. You no longer need to use `displayName`. A `displayName` will be automatically added if it belongs to a container. */ displayName?: string; modelHook: TModelHook; elemPropsHook?: TElemPropsHook; From 776f98f7d4fb27f5f47856ed87a9dae88726799f Mon Sep 17 00:00:00 2001 From: Manuel Carrera Date: Mon, 25 Sep 2023 15:37:59 -0600 Subject: [PATCH 10/17] Update modules/docs/mdx/MAINTAINING.mdx Co-authored-by: James Fan --- modules/docs/mdx/MAINTAINING.mdx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/docs/mdx/MAINTAINING.mdx b/modules/docs/mdx/MAINTAINING.mdx index 9978372f23..9966205b63 100644 --- a/modules/docs/mdx/MAINTAINING.mdx +++ b/modules/docs/mdx/MAINTAINING.mdx @@ -405,8 +405,9 @@ The provided migration strategy can take on any form as long as it gives the con once the deprecated code is removed. For example, we'll deprecate a component in our Main package before replacing it with an updated -version of the component in our Preview or Labs packages. Note the optional Storybook link to the -updated component. +version of the component in our Preview or Labs packages. Note the inclusion of package names +(Main/Preview/Labs) for disambiguation as well as the optional Storybook link to the updated +component. ```tsx /** From 531753d7fb1203113c73ba42af2c68f56db62f4e Mon Sep 17 00:00:00 2001 From: Manuel Carrera Date: Mon, 25 Sep 2023 15:38:14 -0600 Subject: [PATCH 11/17] Update modules/docs/mdx/MAINTAINING.mdx Co-authored-by: James Fan --- modules/docs/mdx/MAINTAINING.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/docs/mdx/MAINTAINING.mdx b/modules/docs/mdx/MAINTAINING.mdx index 9966205b63..c7cd7e946a 100644 --- a/modules/docs/mdx/MAINTAINING.mdx +++ b/modules/docs/mdx/MAINTAINING.mdx @@ -411,7 +411,7 @@ component. ```tsx /** - * @deprecated ⚠️ Status Indicator in Main has been deprecated and will be removed in a future major release. Please use [`Status Indicator`](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) in Preview instead. + * @deprecated ⚠️ Status Indicator in Main has been deprecated and will be removed in a future major release. Please use [Status Indicator in Preview](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) instead. */ export class StatusIndicator... ``` From 2ec7cc246ac624aa6c0c927d2f8abffe1cc3e97c Mon Sep 17 00:00:00 2001 From: Manuel Carrera Date: Mon, 25 Sep 2023 15:38:25 -0600 Subject: [PATCH 12/17] Update modules/docs/mdx/MAINTAINING.mdx Co-authored-by: James Fan --- modules/docs/mdx/MAINTAINING.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/docs/mdx/MAINTAINING.mdx b/modules/docs/mdx/MAINTAINING.mdx index c7cd7e946a..aa3eb51ebe 100644 --- a/modules/docs/mdx/MAINTAINING.mdx +++ b/modules/docs/mdx/MAINTAINING.mdx @@ -420,7 +420,7 @@ Here's an example of a deprecated utility function. ```tsx /** - * @deprecated ⚠️ subModelHook has been deprecated and will be removed in a future major release. Please use `createSubModelElemPropsHook` instead. + * @deprecated ⚠️ `subModelHook` has been deprecated and will be removed in a future major release. Please use `createSubModelElemPropsHook` instead. */ export const subModelHook... ``` From 2c22e6f7f4ca6179135637f0eac70a9c17ebbf81 Mon Sep 17 00:00:00 2001 From: Manuel Carrera Date: Mon, 25 Sep 2023 15:38:35 -0600 Subject: [PATCH 13/17] Update modules/docs/mdx/MAINTAINING.mdx Co-authored-by: James Fan --- modules/docs/mdx/MAINTAINING.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/docs/mdx/MAINTAINING.mdx b/modules/docs/mdx/MAINTAINING.mdx index aa3eb51ebe..da2463524c 100644 --- a/modules/docs/mdx/MAINTAINING.mdx +++ b/modules/docs/mdx/MAINTAINING.mdx @@ -429,7 +429,7 @@ You may share the same `@deprecation` note for multiple deprecations related to ```tsx /** - * @deprecated ⚠️ Status Indicator in Main has been deprecated and will be removed in a future major release. Please use [`Status Indicator`](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) in Preview instead. + * @deprecated ⚠️ Status Indicator in Main has been deprecated and will be removed in a future major release. Please use [Status Indicator in Preview](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) instead. */ export enum StatusIndicatorType... From dfb9c69c3188b21e842a414bc9c2d7b060c0d678 Mon Sep 17 00:00:00 2001 From: Manuel Carrera Date: Mon, 25 Sep 2023 15:38:47 -0600 Subject: [PATCH 14/17] Update modules/docs/mdx/MAINTAINING.mdx Co-authored-by: James Fan --- modules/docs/mdx/MAINTAINING.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/docs/mdx/MAINTAINING.mdx b/modules/docs/mdx/MAINTAINING.mdx index da2463524c..808325d377 100644 --- a/modules/docs/mdx/MAINTAINING.mdx +++ b/modules/docs/mdx/MAINTAINING.mdx @@ -434,7 +434,7 @@ You may share the same `@deprecation` note for multiple deprecations related to export enum StatusIndicatorType... /** - * @deprecated ⚠️ Status Indicator in Main has been deprecated and will be removed in a future major release. Please use [`Status Indicator`](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) in Preview instead. + * @deprecated ⚠️ Status Indicator in Main has been deprecated and will be removed in a future major release. Please use [Status Indicator in Preview](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) instead. */ export interface StatusIndicatorProps... From 5b4c6fbb5a8cd97c2b875bbea77a9e1342b65e21 Mon Sep 17 00:00:00 2001 From: Manuel Carrera Date: Mon, 25 Sep 2023 15:38:56 -0600 Subject: [PATCH 15/17] Update modules/docs/mdx/MAINTAINING.mdx Co-authored-by: James Fan --- modules/docs/mdx/MAINTAINING.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/docs/mdx/MAINTAINING.mdx b/modules/docs/mdx/MAINTAINING.mdx index 808325d377..ba94692689 100644 --- a/modules/docs/mdx/MAINTAINING.mdx +++ b/modules/docs/mdx/MAINTAINING.mdx @@ -439,7 +439,7 @@ export enum StatusIndicatorType... export interface StatusIndicatorProps... /** - * @deprecated ⚠️ Status Indicator in Main has been deprecated and will be removed in a future major release. Please use [`Status Indicator`](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) in Preview instead. + * @deprecated ⚠️ Status Indicator in Main has been deprecated and will be removed in a future major release. Please use [Status Indicator in Preview](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) instead. */ export class StatusIndicator... ``` From 40e295aa43e8521e4ccbb866ffaaeb701f4617d0 Mon Sep 17 00:00:00 2001 From: Manuel Carrera Date: Mon, 25 Sep 2023 15:39:25 -0600 Subject: [PATCH 16/17] Update modules/react/tabs/lib/Tabs.tsx Co-authored-by: James Fan --- modules/react/tabs/lib/Tabs.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/react/tabs/lib/Tabs.tsx b/modules/react/tabs/lib/Tabs.tsx index e98d2ce63f..665f74f641 100644 --- a/modules/react/tabs/lib/Tabs.tsx +++ b/modules/react/tabs/lib/Tabs.tsx @@ -112,7 +112,7 @@ export const Tabs = createContainer()({ */ OverflowButton: TabsOverflowButton, /** - * @deprecated ⚠️ `MenuPopper` has been deprecated. Please use `Tabs.Menu.Popper` instead. + * @deprecated ⚠️ `MenuPopper` has been deprecated and will be removed in a future major version. Please use `Tabs.Menu.Popper` instead. */ MenuPopper: TabsMenuPopper, /** From cee0da76d38845dcf12334fa789de31a977b6b1b Mon Sep 17 00:00:00 2001 From: "manuel.carrera" Date: Mon, 25 Sep 2023 15:48:02 -0600 Subject: [PATCH 17/17] fix: Update menu dep docs --- modules/preview-react/menu/lib/Menu.tsx | 19 +++---------------- modules/preview-react/menu/lib/MenuItem.tsx | 9 ++------- 2 files changed, 5 insertions(+), 23 deletions(-) diff --git a/modules/preview-react/menu/lib/Menu.tsx b/modules/preview-react/menu/lib/Menu.tsx index 66bd45071b..e277cb85b4 100644 --- a/modules/preview-react/menu/lib/Menu.tsx +++ b/modules/preview-react/menu/lib/Menu.tsx @@ -7,12 +7,7 @@ import {commonColors, space, borderRadius} from '@workday/canvas-kit-react/token import {hideMouseFocus, GrowthBehavior, generateUniqueId} from '@workday/canvas-kit-react/common'; /** - * ### Deprecated Menu - * - * As of Canvas Kit v8, Menu is being deprecated. - * It will be removed in v10. Please see the - * [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page) - * for more information. + * @deprecated ⚠️ `DeprecatedMenuProps` has been deprecated and will be removed in a future major version. Please use [Menu in Main](https://workday.github.io/canvas-kit/?path=/docs/components-popups-menu--basic) instead. */ export interface DeprecatedMenuProps extends GrowthBehavior, @@ -55,12 +50,8 @@ export interface DeprecatedMenuProps } /** - * ### Deprecated Menu State * - * As of Canvas Kit v8, Menu is being deprecated. - * It will be removed in v10. Please see the - * [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page) - * for more information. + * @deprecated ⚠️ `DeprecatedMenuState` has been deprecated and will be removed in a future major version. Please use [Menu in Main](https://workday.github.io/canvas-kit/?path=/docs/components-popups-menu--basic) instead. */ export interface DeprecatedMenuState { selectedItemIndex: number; @@ -78,11 +69,6 @@ const List = styled('ul')({ }); /** - * @deprecated ⚠️ `DeprecatedMenu` has been deprecated. As of Canvas Kit v8, `Menu` is being deprecated. - * It will be removed in v10. Please see the [upgrade - * guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page) for - * more information. - * * `DeprecatedMenu` renders a styled `
      ` element within a {@link Card} and follows * the [Active Menu * pattern](https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/examples/menu-button-actions-active-descendant/) @@ -90,6 +76,7 @@ const List = styled('ul')({ * * Undocumented props are spread to the underlying `
        ` element. * + * @deprecated ⚠️ Deprecated Menu has been deprecated and will be removed in a future major version. Please use [Menu in Main](https://workday.github.io/canvas-kit/?path=/docs/components-popups-menu--basic) instead. */ export class DeprecatedMenu extends React.Component { private id = generateUniqueId(); diff --git a/modules/preview-react/menu/lib/MenuItem.tsx b/modules/preview-react/menu/lib/MenuItem.tsx index e51226e2ad..286a8fd3e2 100644 --- a/modules/preview-react/menu/lib/MenuItem.tsx +++ b/modules/preview-react/menu/lib/MenuItem.tsx @@ -12,12 +12,7 @@ import {CanvasSystemIcon} from '@workday/design-assets-types'; import {SystemIcon, SystemIconProps} from '@workday/canvas-kit-react/icon'; /** - * ### Deprecated Menu Item Props - * - * As of Canvas Kit v8, Menu is being deprecated. - * It will be removed in v10. Please see the - * [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page) - * for more information. + * @deprecated ⚠️ `DeprecatedMenuItemProps` has been deprecated and will be removed in a future major version. Please use [Menu in Main](https://workday.github.io/canvas-kit/?path=/docs/components-popups-menu--basic) instead. */ export interface DeprecatedMenuItemProps extends React.LiHTMLAttributes { /** @@ -264,7 +259,7 @@ const scrollIntoViewIfNeeded = (elem: HTMLElement, centerIfNeeded = true): void * * Undocumented props are spread to the underlying `
      • ` element. * - * @deprecated ⚠️ `DeprecatedMenuItem` has been deprecated and will be removed in a future major version. Please see the [Upgrade Guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page) for more information. + * @deprecated ⚠️ `DeprecatedMenuItem` has been deprecated and will be removed in a future major version. Please use [Menu in Main](https://workday.github.io/canvas-kit/?path=/docs/components-popups-menu--basic) instead. * */ export class DeprecatedMenuItem extends React.Component {