Skip to content

Latest commit

 

History

History
70 lines (52 loc) · 2.96 KB

File metadata and controls

70 lines (52 loc) · 2.96 KB

Garden Migration Guide

v7

Breaking Changes

react-loaders

  • The Dots and Spinner components no longer accept a velocity prop
    • To customize the speed of the animation use the duration prop to provide the time in MS.

react-pagination

  • The focusedKey prop is no longer accepted
    • This state is no longer controllable
  • The onStateChange prop is no longer accepted
    • Use the onChange prop to receive currentPage updates.

react-tabs

  • The selectedKey prop has been renamed to selectedItem
    • This API now aligns with other components
  • All <TabPanel> components now require an item prop instead of a key prop
    • Previously we used the key attribute to uniquely identify each tab
    • This created confusion as key is also a reserved prop name in React
  • The onStateChange prop is no longer valid
    • Use the onChange prop to receive selectedItem updates

Removal of deprecated packages

The following deprecated packages have been removed from the repository and will not be upgraded to v7:

  • @zendeskgarden/react-autocomplete
    • Migrate to the @zendeskgarden/react-dropdowns package
  • @zendeskgarden/react-checkboxes
    • Migrate to the @zendeskgarden/react-forms package
  • @zendeskgarden/react-menus
  • Migrate to the @zendeskgarden/react-dropdowns package
  • @zendeskgarden/react-radios
    • Migrate to the @zendeskgarden/react-forms package
  • @zendeskgarden/react-ranges
    • Migrate to the @zendeskgarden/react-forms package
  • @zendeskgarden/react-select
    • Migrate to the @zendeskgarden/react-dropdowns package
  • @zendeskgarden/react-textfields
    • Migrate to the @zendeskgarden/react-forms package
  • @zendeskgarden/react-toggles
    • Migrate to the @zendeskgarden/react-forms package

Removal of deprecated Render-Prop Containers

In previous versions we have included render-prop containers for the common UX patterns provided in our components. To help make these assets more flexible, we have created a new repository react-containers.

In v7 all render-prop containers (*Container) has been moved to standalone packages. These containers are now available as standard React Hooks as well as render-props.

Migration Steps

  • Upgrade all Garden React dependencies to their latest v6.x version
  • Check your console and testing environments to see if any deprecation warnings can be seen
  • Remove any usages of deprecated packages and containers
  • Upgrade all Garden React dependencies to their latest v7.x version
  • Update any react-tabs, react-pagination, and react-loaders usages affected by the breaking changes listed above

For this breaking change we were able to allow an open range for our peer dependency of react-theming to allow v6 and v7 versions.

This allows you to upgrade each package individually if necessary, ending with react-theming. If you have any questions about this process please open an issue.