Skip to content

Commit faea485

Browse files
authored
docs: enhance migration guide (#1895)
1 parent d6ba834 commit faea485

File tree

1 file changed

+88
-38
lines changed

1 file changed

+88
-38
lines changed

docs/migration.md

Lines changed: 88 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
## v9
44

5+
Upgrading from version 8 to version 9 includes handling both [breaking
6+
changes](#breaking-changes) and [deprecated components](#deprecated-components).
7+
To ensure that existing code functions correctly with v9, it is essential to
8+
address the breaking changes. Managing the deprecated components can be deferred
9+
as a subsequent task to prepare for v10, where these components will be
10+
completely removed.
11+
512
### Breaking Changes
613

714
The theme object, along with its utility functions, introduce a minimal set of
@@ -33,6 +40,7 @@ consider additional positioning prop support on a case-by-case basis.
3340
- `react-theming@v9` uses version range `^4.2.0 || ^5.3.1` to support `v8` to `v9` upgrades.
3441

3542
- Garden v9 upgraded from `react-merge-refs` v1 to v2.
43+
3644
- The [breaking
3745
change](https://github.com/gregberge/react-merge-refs/blob/main/CHANGELOG.md#200-2022-06-19)
3846
exports ESM only.
@@ -41,6 +49,11 @@ consider additional positioning prop support on a case-by-case basis.
4149
[jest.config.js](https://github.com/zendeskgarden/react-components/blob/c2aa97d1edccfa0578ee5655b543ca6635767fb9/utils/test/jest.config.js#L28-L30)
4250
for details.
4351

52+
- The following breaking changes are listed alphabetically by package. While
53+
individual packages can be upgraded one at a time,
54+
[@zendeskgarden/react-theming](#zendeskgardenreact-theming) must be upgraded
55+
first.
56+
4457
#### @zendeskgarden/react-accordions
4558

4659
- The following React component prop types have changed:
@@ -70,16 +83,6 @@ consider additional positioning prop support on a case-by-case basis.
7083
- Removed `IBodyProps` type export.
7184
- `Header.ItemIcon`: `HTMLAttributes<HTMLElement>` -> `SVGAttributes<SVGElement>`
7285
- `Nav.ItemIcon`: `HTMLAttributes<HTMLElement>` -> `SVGAttributes<SVGElement>`
73-
- Subcomponent exports have been deprecated and will be removed in a future major version. Update
74-
to subcomponent properties:
75-
- `FooterItem` -> `Footer.Item`
76-
- `HeaderItem` -> `Header.Item`
77-
- `HeaderItemIcon` -> `Header.ItemIcon`
78-
- `HeaderItemText` -> `Header.ItemText`
79-
- `HeaderItemWrapper` -> `Header.ItemWrapper`
80-
- `NavItem` -> `Nav.Item`
81-
- `NavItemIcon` -> `Nav.ItemIcon`
82-
- `NavItemText` -> `Nav.ItemText`
8386
- Added `Nav.List` as a semantic wrapper for `Nav.Item`. See the
8487
[README](../packages/chrome/README.md#usages) for details.
8588

@@ -116,11 +119,6 @@ consider additional positioning prop support on a case-by-case basis.
116119
renamed to `@zendeskgarden/react-dropdowns.legacy` in `v9`
117120
- `Menu`: value `auto` is no longer valid for the `fallbackPlacements` prop.
118121
- Removed `label` prop from `OptGroup`. Use `legend` instead.
119-
- Subcomponent exports have been deprecated and will be removed in a future major version. Update
120-
to subcomponent properties:
121-
- `Hint` -> `Field.Hint`
122-
- `Label` -> `Field.Label`
123-
- `Message` -> `Field.Message`
124122

125123
#### @zendeskgarden/react-forms
126124

@@ -130,19 +128,12 @@ consider additional positioning prop support on a case-by-case basis.
130128
- removed `IIconProps`. Use `IFauxInputStartIconProps` or `IFauxInputEndIconProps` instead.
131129
- `IMediaInputProps['start']`: `any` -> `ReactElement`
132130
- `IMediaInputProps['end']`: `any` -> `ReactElement`
133-
- Subcomponent exports have been deprecated and will be removed in a future major version. Update
134-
to subcomponent properties:
135-
- `Hint` -> `Field.Hint`
136-
- `Label` -> `Field.Label`
137-
- `Message` -> `Field.Message`
138131

139132
#### @zendeskgarden/react-grid
140133

141134
- Exported constants prefixed with `ARRAY_` no longer have a prefix.
142135
- The following types have been removed: `ALIGN_ITEMS`, `ALIGN_SELF`, `DIRECTION`,
143136
`JUSTIFY_CONTENT`, `TEXT_ALIGN`, `GRID_NUMBER`, `BREAKPOINT`, `SPACE`, and `WRAP`
144-
- Subcomponent exports for `Grid` have been deprecated and will be removed in a future major version.
145-
Update to subcomponent properties (e.g., `Grid.Row`).
146137

147138
#### @zendeskgarden/react-modals
148139

@@ -158,19 +149,12 @@ consider additional positioning prop support on a case-by-case basis.
158149
[@zendeskgarden/container-focusvisible](https://www.npmjs.com/package/@zendeskgarden/container-focusvisible)
159150
to restore the polyfill
160151
- Removed `GARDEN_PLACEMENT` type export. Use `ITooltipDialogProps['placement']` instead.
161-
- Subcomponent exports for `Modal` have been deprecated and will be removed in a future major version.
162-
Update to subcomponent properties (e.g., `Modal.Body`).
163152

164153
#### @zendeskgarden/react-notification
165154

166155
- The following types have changed:
167156
- removed `ToastPlacement`. Use `IToastOptions['placement']` instead.
168157
- removed `ToastContent`. Use `IToast['content']` instead.
169-
- Subcomponent exports have been deprecated and will be removed in a future major version. Update
170-
to subcomponent properties:
171-
- `Close` -> `Alert.Close`, `Notification.Close`
172-
- `Paragraph` -> `Alert.Paragraph`, `Notification.Paragraph`, `Well.Paragraph`
173-
- `Title` -> `Alert.Title`, `Notification.Title`, `Well.Title`
174158

175159
#### @zendeskgarden/react-pagination
176160

@@ -182,15 +166,8 @@ consider additional positioning prop support on a case-by-case basis.
182166

183167
#### @zendeskgarden/react-tables
184168

185-
- All subcomponent exports have been deprecated and will be removed in a future major version.
186-
Update to subcomponent properties (e.g., `Table.Body`).
187169
- Removed `isHovered`, `isActive`, and `isFocused` props from `Table.OverflowButton`
188170

189-
#### @zendeskgarden/react-tabs
190-
191-
- All subcomponent exports have been deprecated and will be removed in a future major version.
192-
Update to subcomponent properties (e.g., `Tabs.TabList`).
193-
194171
#### @zendeskgarden/react-theming
195172

196173
- The default `theme` object has removed values for `colors.background` and
@@ -230,8 +207,6 @@ consider additional positioning prop support on a case-by-case basis.
230207
- `Tooltip`
231208
- removed `eventsEnabled` prop (no longer exposed by Floating UI)
232209
- removed `popperModifiers` prop (see [note](#breaking-changes))
233-
- All subcomponent exports have been deprecated and will be removed in a future major version.
234-
Update to subcomponent properties (e.g., `Tooltip.Title`).
235210

236211
#### @zendeskgarden/react-typography
237212

@@ -251,6 +226,81 @@ consider additional positioning prop support on a case-by-case basis.
251226
- Migrate to `@zendeskgarden/container-utilities` and `@zendeskgarden/react-theming` to continue
252227
receiving updates.
253228

229+
### Deprecated components
230+
231+
The following subcomponents have been renamed to streamline imports and improve
232+
affinity with their parent components. The deprecated exports will be removed in
233+
a future major release. Use the following mappings to update subcomponent
234+
properties.
235+
236+
<!-- markdownlint-disable MD024 -->
237+
238+
#### @zendeskgarden/react-chrome
239+
240+
- `FooterItem` -> `Footer.Item`
241+
- `HeaderItem` -> `Header.Item`
242+
- `HeaderItemIcon` -> `Header.ItemIcon`
243+
- `HeaderItemText` -> `Header.ItemText`
244+
- `HeaderItemWrapper` -> `Header.ItemWrapper`
245+
- `NavItem` -> `Nav.Item`
246+
- `NavItemIcon` -> `Nav.ItemIcon`
247+
- `NavItemText` -> `Nav.ItemText`
248+
249+
#### @zendeskgarden/react-dropdowns
250+
251+
- `Hint` -> `Field.Hint`
252+
- `Label` -> `Field.Label`
253+
- `Message` -> `Field.Message`
254+
255+
#### @zendeskgarden/react-forms
256+
257+
- `Hint` -> `Field.Hint`
258+
- `Label` -> `Field.Label`
259+
- `Message` -> `Field.Message`
260+
261+
#### @zendeskgarden/react-grid
262+
263+
- `Col` -> `Grid.Col`
264+
- `Row` -> `Grid.Row`
265+
266+
#### @zendeskgarden/react-modals
267+
268+
- `Body` -> `Modal.Body`
269+
- `Close` -> `Modal.Close`
270+
- `Footer` -> `Modal.Footer`
271+
- `FooterItem` -> `Modal.FooterItem`
272+
- `Header` -> `Modal.Header`
273+
274+
#### @zendeskgarden/react-notification
275+
276+
- `Close` -> `Alert.Close`, `Notification.Close`
277+
- `Paragraph` -> `Alert.Paragraph`, `Notification.Paragraph`, `Well.Paragraph`
278+
- `Title` -> `Alert.Title`, `Notification.Title`, `Well.Title`
279+
280+
#### @zendeskgarden/react-tables
281+
282+
- `Body` -> `Table.Body`
283+
- `Caption` -> `Table.Caption`
284+
- `Cell` -> `Table.Cell`
285+
- `GroupRow` -> `Table.GroupRow`
286+
- `Head` -> `Table.Head`
287+
- `HeaderCell` -> `Table.HeaderCell`
288+
- `HeaderRow` -> `Table.HeaderRow`
289+
- `OverflowButton` -> `Table.OverflowButton`
290+
- `Row` -> `Table.Row`
291+
- `SortableCell` -> `Table.SortableCell`
292+
293+
#### @zendeskgarden/react-tabs
294+
295+
- `Tab` -> `Tabs.Tab`
296+
- `TabList` -> `Tabs.TabList`
297+
- `TabPanel` -> `Tabs.TabPanel`
298+
299+
#### @zendeskgarden/react-tooltips
300+
301+
- `Paragraph` -> `Tooltip.Paragraph`
302+
- `Title` -> `Tooltip.Title`
303+
254304
## v8
255305

256306
[Migration Guide](https://github.com/zendeskgarden/react-components/blob/main/docs/migrations/v8.md)

0 commit comments

Comments
 (0)