From c10480c70964f652b3fc4e19fe3eaa1bdf7dc0ec Mon Sep 17 00:00:00 2001 From: Cassandra Date: Wed, 20 Nov 2024 14:37:54 +1100 Subject: [PATCH] docs(codemods): add release version to readme (#5296) --- .changeset/flat-rats-do.md | 2 + packages/components/codemods/README.md | 137 +++++++++++++++++++------ 2 files changed, 106 insertions(+), 33 deletions(-) create mode 100644 .changeset/flat-rats-do.md diff --git a/.changeset/flat-rats-do.md b/.changeset/flat-rats-do.md new file mode 100644 index 00000000000..a845151cc84 --- /dev/null +++ b/.changeset/flat-rats-do.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/packages/components/codemods/README.md b/packages/components/codemods/README.md index 79c087e6957..a52382655c1 100644 --- a/packages/components/codemods/README.md +++ b/packages/components/codemods/README.md @@ -23,36 +23,107 @@ pnpm kaizen-codemod src migrateWellVariantToColor ``` ## Available codemods -- `migrateBrandMomentMoodToVariant`: Migrates `BrandMoment` component prop from `mood` to `variant` -- `migrateCardVariantToColor`: Migrates `Card` component prop from `variant` to `color` -- `migrateConfirmationModalMoodsToVariant`: Migrates `ConfirmationModal` component prop from `mood` to `variant` -- `migrateEmptyStateIllustrationTypeToVariant`: Migrates `EmptyState` component prop from `illustrationType` to `variant` -- `migrateGlobalNotificationTypeToVariant`: Transforms `GlobalNotification`'s `type` prop to the new `variant` prop -- `migrateInformationTileMoodToVariant`: Migrates `InformationTile` component prop from `mood` to `variant` -- `migrateInlineNotificationTypeToVariant`: Transforms `InlineNotification`'s `type` prop to the new `variant` prop -- `migrateMultiActionTileMoodToVariant`: Migrates `MultiActionTile` component prop from `mood` to `variant` -- `migrateProgressBarMoodToColor`: Migrates `ProgressBar` component prop from `mood` to `color` -- `migrateToastNotificationTypeToVariant`: Transforms `ToastNotification`'s `type` prop to the new `variant` prop -- `migrateWellVariantToColor`: Migrates `Well` component prop from `variant` to `color` -- `removeInputEditModalMood`: Removes `InputEditModal` component prop `mood` -- `removePopoverVariant`: Removes `Popover` component props `variant` and `customIcon` -- `upgradeIconV1`: Migrates `*Icon` components to a new equivalent - - `CaMonogramIcon` becomes `Brand` variant `enso` - - `inheritSize` will be removed if set, if not set then `style` will be added to make it 20px (manually adjust to a `className` if you can) - - `SpinnerIcon` becomes `LoadingSpinner` - - `aria-label` will be replaced with `accessibilityLabel` (with a fallback value of `"Loading"`) - - `role` will be removed - - `viewBox` will be removed - - All other Icons become future `Icon` - - **Note:** See [Icon API Specification (Future)](https://cultureamp.design/?path=/docs/illustrations-icon-icon-future-api-specification--docs) for setup instructions - - Icons previously filled may become unfilled. This is intentional as filled icons should only be for active states or selection (see [Icon Usage Guidelines (Future)](https://cultureamp.design/?path=/docs/illustrations-icon-icon-future-usage-guidelines--docs#do-use-the-appropriate-fill-for-the-icon-context-and-state)) - - `role="presentational"` becomes `isPresentational` - - `role="img"` will be removed (as `aria-label` should exist) - - `aria-label` becomes `alt` - - `classNameOverride` becomes `className` - - `inheritSize` will remain - however is no longer a valid prop, therefore will have a TypeScript error and will be prefixed with a comment to manually fix the usage - - `aria-hidden` becomes `isPresentational` - - `color` becomes an inline `style` (manually adjust to a `className` if you can) - - `fontSize` will be removed - - `height` and `width` become an inline `style` (manually adjust to a `className` if you can, ideally setting `--icon-size`) - - `viewBox` will be removed + +### `migrateBrandMomentMoodToVariant` + +Released in `1.58.0` + +Migrates `BrandMoment` component prop from `mood` to `variant`. + +### `migrateCardVariantToColor` + +Released in `1.58.0` + +Migrates `Card` component prop from `variant` to `color`. + +### `migrateConfirmationModalMoodsToVariant` + +Released in `1.58.0` + +Migrates `ConfirmationModal` component prop from `mood` to `variant`. + +### `migrateEmptyStateIllustrationTypeToVariant` + +Released in `1.58.0` + +Migrates `EmptyState` component prop from `illustrationType` to `variant`. + +### `migrateGlobalNotificationTypeToVariant` + +Released in `1.58.0` + +Transforms `GlobalNotification`'s `type` prop to the new `variant` prop. + +### `migrateInformationTileMoodToVariant` + +Released in `1.58.0` + +Migrates `InformationTile` component prop from `mood` to `variant`. + +### `migrateInlineNotificationTypeToVariant` + +Released in `1.58.0` + +Transforms `InlineNotification`'s `type` prop to the new `variant` prop. + +### `migrateMultiActionTileMoodToVariant` + +Released in `1.58.0` + +Migrates `MultiActionTile` component prop from `mood` to `variant`. + +### `migrateProgressBarMoodToColor` + +Released in `1.58.0` + +Migrates `ProgressBar` component prop from `mood` to `color`. + +### `migrateToastNotificationTypeToVariant` + +Released in `1.58.0` + +Transforms `ToastNotification`'s `type` prop to the new `variant` prop. + +### `migrateWellVariantToColor` + +Released in `1.58.0` + +Migrates `Well` component prop from `variant` to `color`. + +### `removeInputEditModalMood` + +Released in `1.58.0` + +Removes `InputEditModal` component prop `mood`. + +### `removePopoverVariant` + +Released in `1.60.0` + +Removes `Popover` component props `variant` and `customIcon`. + +### `upgradeIconV1` + +Released in `1.67.0`; last updated in `1.68.1` + +Migrates `*Icon` components to a new equivalent. + +- `CaMonogramIcon` becomes `Brand` variant `enso` + - `inheritSize` will be removed if set, if not set then `style` will be added to make it 20px (manually adjust to a `className` if you can) +- `SpinnerIcon` becomes `LoadingSpinner` + - `aria-label` will be replaced with `accessibilityLabel` (with a fallback value of `"Loading"`) + - `role` will be removed + - `viewBox` will be removed +- All other Icons become future `Icon` + - **Note:** See [Icon API Specification (Future)](https://cultureamp.design/?path=/docs/illustrations-icon-icon-future-api-specification--docs) for setup instructions + - Icons previously filled may become unfilled. This is intentional as filled icons should only be for active states or selection (see [Icon Usage Guidelines (Future)](https://cultureamp.design/?path=/docs/illustrations-icon-icon-future-usage-guidelines--docs#do-use-the-appropriate-fill-for-the-icon-context-and-state)) + - `role="presentational"` becomes `isPresentational` + - `role="img"` will be removed (as `aria-label` should exist) + - `aria-label` becomes `alt` + - `classNameOverride` becomes `className` + - `inheritSize` will remain - however is no longer a valid prop, therefore will have a TypeScript error and will be prefixed with a comment to manually fix the usage + - `aria-hidden` becomes `isPresentational` + - `color` becomes an inline `style` (manually adjust to a `className` if you can) + - `fontSize` will be removed + - `height` and `width` become an inline `style` (manually adjust to a `className` if you can, ideally setting `--icon-size`) + - `viewBox` will be removed