Skip to content

5.0.0

Choose a tag to compare

@csandman csandman released this 11 Oct 23:10
· 146 commits to main since this release

What's Changed

This is the last major release before Chakra v3 is fully released! The intention of this release is to batch a few breaking changes that have been in the works for a while, along with a codemod to hopefully make the changes for you.

Breaking Changes

  1. The useBasicStyles prop was removed, as the styles provided by it are now the default. Originally, it was styled to match the InputRightAddon component, in order to create a visual separation between the dropdown indicator and the clear indicator. However, it seems that most people preferred it to visually match the original Chakra Select component, so those styles are now the default. If you want to modify the styles to appear like they used to, you can do so using the chakraStyles prop. Some examples of how to do this are provided in the README.
  2. Remove the deprecated selectedOptionColor prop. A new prop was added a while ago to replace that one, selectedOptionColorScheme, as some people were getting confused by the meaning of the original (thinking it meant an explicit color instead of a named color from their theme). The old one was left in the code though, and now it is gone for good.
  3. Remove the deprecated hasStickyGroupHeaders prop. This was removed from the documentation since v4.6.0, as it was only ever really an experimental way to style the grouped option headers so they'd stay in view while you scroll the list of options. It also had some problems with using the keyboard to navigate between options. They would disappear behind the header when you used the up arrow. There is an example for how these styles can be implemented using chakraStyles in #343.
  4. Renamed the colorScheme prop to tagColorScheme. There has been some confusion around what this prop actually means, as the original name the prop had wasn't specific enough to it's purpose. It didn't make sense to have a specific prop for selectedOptionColorScheme, and not be specific with the naming for the tagColorScheme. This may be followed by the addition of a new root colorScheme prop, but that isn't included here.

All of these changes can be made automatically using the Codemod provided here

npx crs-codemod@latest v5 .
# or
npx crs-codemod@latest v5 ./src

This release will most likely mean an end of support for v3 (Chakra v1 compatible version), unless people want to put up any fix PRs for it themselves.

Full Changelog: v4.10.1...v5.0.0