Skip to content

Commit

Permalink
docs(codemods): add release version to readme (#5296)
Browse files Browse the repository at this point in the history
  • Loading branch information
HeartSquared authored Nov 20, 2024
1 parent 7a63258 commit c10480c
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 33 deletions.
2 changes: 2 additions & 0 deletions .changeset/flat-rats-do.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
137 changes: 104 additions & 33 deletions packages/components/codemods/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c10480c

Please sign in to comment.