Skip to content
This repository has been archived by the owner on Oct 19, 2021. It is now read-only.

Commit

Permalink
docs(7.x): update docs to reference v7 instead of v10 (#2100)
Browse files Browse the repository at this point in the history
* docs(7.x): update docs to reference v7 instead of v10

* Update migrate-to-7.x.md

* chore(DataTable): update exports test
  • Loading branch information
joshblack committed Mar 27, 2019
1 parent 912a4d4 commit bd50e18
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 43 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ View available React Components [here](http://react.carbondesignsystem.com). You
- See our documentation site [here](http://carbondesignsystem.com/getting-started/developers) for full how-to docs and guidelines
- [Contributing](/.github/CONTRIBUTING.md): Guidelines for making contributions to this repo
- [🏃‍♀️ Migration Guides](./docs/migration)
- [v9 to v10](./docs/migrate-to-10.x.md)
- [v6 to v7](./docs/migration/migrate-to-7.x.md)

## Contributing

Expand Down
2 changes: 1 addition & 1 deletion docs/migration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

Available guides:

- [v9 to v10](./migrate-to-10.x.md)
- [v6 to v7](./migrate-to-7.x.md)
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
# 10.x Migration
# 7.x Migration

_Note: this migration guide is for a future, unreleased version of Carbon.
Anything in this document is subject to change up until v10 is released._

<!-- prettier-ignore-start -->
<!-- To run doctoc, just do `npx doctoc migrate-to-10.x.md` in this directory! -->
<!-- To run doctoc, just do `npx doctoc migrate-to-7.x.md` in this directory! -->

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->


- [Process](#process)
- [Components](#components)
- [Icons](#icons)
- [Polyfills](#polyfills)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->
Expand All @@ -21,7 +20,7 @@ Anything in this document is subject to change up until v10 is released._
## Process

1. Update your `carbon-components-react` package using `npm` or `yarn`.
1. When migrating from v9 to v10, you'll first want to address your component instances marked with `Removed` in the table below. E.g. if you're using the `<Footer />` React component that was previously available in Carbon, you'll need to either remove your footer instances or create your own footer component so the `<Footer />` syntax is recognized in your client-side JavaScript.
1. When migrating from v6 to v7, you'll first want to address your component instances marked with `Removed` in the table below. E.g. if you're using the `<Footer />` React component that was previously available in Carbon, you'll need to either remove your footer instances or create your own footer component so the `<Footer />` syntax is recognized in your client-side JavaScript.

## Components

Expand All @@ -31,7 +30,7 @@ Anything in this document is subject to change up until v10 is released._
| `AccordionItem` | No breaking changes |
| `Breadcrumb` | No breaking changes |
| `BreadcrumbItem` | No breaking changes |
| `Button` | [Migrate](../../src/components/Button/migrate-to-10.x.md) |
| `Button` | [Migrate](../../src/components/Button/migrate-to-7.x.md) |
| `Checkbox` | No breaking changes |
| `CodeSnippet` | No breaking changes |
| `ComboBox` | No breaking changes |
Expand All @@ -40,20 +39,20 @@ Anything in this document is subject to change up until v10 is released._
| `Copy` | No breaking changes |
| `CopyButton` | No breaking changes |
| `DangerButton` | No breaking changes |
| `DataTable` | [Migrate](../../src/components/DataTable/migrate-to-10.x.md) |
| `DataTable` | [Migrate](../../src/components/DataTable/migrate-to-7.x.md) |
| `DatePicker` | No breaking changes |
| `DatePickerInput` | No breaking changes |
| `Dropdown` | Existing import remapped to `DropdownV2` |
| `DropdownItem` | Removed |
| `DropdownItem` | No breaking changes |
| `DropdownV2` | Renamed to `Dropdown` |
| `FileUploader` | No breaking changes |
| `Footer` | Removed |
| `Form` | No breaking changes |
| `FormGroup` | No breaking changes |
| `FormItem` | No breaking changes |
| `FormLabel` | No breaking changes |
| `Icon` | Deprecated, [Migrate](#icons) |
| `InlineCheckbox` | [Migrate](../../src/components/InlineCheckbox/migrate-to-10.x.md) |
| `Icon` | The `name` prop has been removed |
| `InlineCheckbox` | [Migrate](../../src/components/InlineCheckbox/migrate-to-7.x.md) |
| `InlineLoading` | No breaking changes |
| `Link` | No breaking changes |
| `ListBox` | No breaking changes |
Expand All @@ -63,14 +62,14 @@ Anything in this document is subject to change up until v10 is released._
| `ModalWrapper` | No breaking changes |
| `MultiSelect` | No breaking changes |
| `Notification` | Deprecated, use `InlineNotification` or `ToastNotification` instead |
| `NumberInput` | [Migrate](../../src/components/NumberInput/migrate-to-10.x.md) |
| `OverflowMenu` | [Migrate](../../src/components/OverflowMenu/migrate-to-10.x.md) |
| `NumberInput` | [Migrate](../../src/components/NumberInput/migrate-to-7.x.md) |
| `OverflowMenu` | [Migrate](../../src/components/OverflowMenu/migrate-to-7.x.md) |
| `OverflowMenuItem` | No breaking changes |
| `Pagination` | Export now points to `PaginationV2` |
| `PaginationV2` | Renamed to `Pagination` |
| `PrimaryButton` | No breaking changes |
| `ProgressIndicator` | No breaking changes |
| `RadioButton` | [Migrate](../../src/components/RadioButton/migrate-to-10.x.md) |
| `RadioButton` | [Migrate](../../src/components/RadioButton/migrate-to-7.x.md) |
| `RadioButtonGroup` | No breaking changes |
| `RadioTile` | No breaking changes |
| `Search` | No breaking changes |
Expand Down Expand Up @@ -106,40 +105,13 @@ Anything in this document is subject to change up until v10 is released._
| `ToggleSmall` | No breaking changes |
| `Toolbar` | No breaking changes |
| `ToolbarSearch` | No breaking changes |
| `Tooltip` | [Migrate](../../src/components/Tooltip/migrate-to-10.x.md) |
| `Tooltip` | [Migrate](../../src/components/Tooltip/migrate-to-7.x.md) |
| `TooltipDefinition` | No breaking changes |
| `TooltipIcon` | No breaking changes |
| `TooltipSimple` | Removed, use `TooltipDefinition` or `TooltipIcon` instead |
| `UI Shell` | New, experimental |
| `UnorderedList` | No breaking changes |

## Icons

The `<Icon>` component in `carbon-components-react` has been deprecated in
`v10.0.0` in preference of [`@carbon/icons-react`](https://www.npmjs.com/package/@carbon/icons-react).

At a high-level, this component was removed due to performance, most notably
over this pattern:

```jsx
<Icon name="icon-name" />
```

Supporting the `name` prop meant that all icons needed to be included in the
bundle of a product since a bundler could not determine which icons were being
used and which weren't due to the runtime nature of props.

We looked to solve this in the interim by adding in an `icon` prop, however this
creates an additional install in order to use. With `@carbon/icons-react`, you
can import icon components directly and use them in a variety of sizes (16x16,
20x20, 24x24, and 32x32).

In addition, these components have minor accessibility and performance improvements, most notably
around inlining the SVG data for an icon instead of deriving the markup at
runtime.

When migrating `<Icon />` components, make sure your `description` props become `aria-label` attributes to properly describe the icon to screen readers.

## Polyfills

Required polyfills list has been updated, adding:
Expand Down
2 changes: 1 addition & 1 deletion src/components/DataTable/__tests__/exports-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import * as DataTable from '../../DataTable';
const COMPONENT_PATH = path.resolve(__dirname, '../');
const blacklist = new Set([
'README.md',
'migrate-to-10.x.md',
'migrate-to-7.x.md',
'state',
'tools',
'.DS_Store',
Expand Down

0 comments on commit bd50e18

Please sign in to comment.