From b2fa89f308c6bfc863c431802994f2d113110451 Mon Sep 17 00:00:00 2001 From: Akira Sudoh Date: Fri, 29 Mar 2019 03:25:07 +0900 Subject: [PATCH] docs(migration): misc updates (#2105) * docs(migration): misc updates Refs #2100. * docs(components): migration guides to more components --- docs/migration/migrate-to-7.x.md | 8 ++++---- src/components/DatePicker/DatePicker.js | 2 +- src/components/DatePicker/migrate-to-7.x.md | 7 +++++++ src/components/OverflowMenu/migrate-to-7.x.md | 11 ++++++----- src/components/OverflowMenuItem/migrate-to-10.x.md | 3 --- src/components/OverflowMenuItem/migrate-to-7.x.md | 3 +++ src/components/RadioButton/migrate-to-7.x.md | 6 ++++++ src/components/Slider/migrate-to-7.x.md | 7 +++++++ src/components/Tag/migrate-to-7.x.md | 9 +++++++++ src/components/Tooltip/migrate-to-7.x.md | 9 +++++---- 10 files changed, 48 insertions(+), 17 deletions(-) create mode 100644 src/components/DatePicker/migrate-to-7.x.md delete mode 100644 src/components/OverflowMenuItem/migrate-to-10.x.md create mode 100644 src/components/OverflowMenuItem/migrate-to-7.x.md create mode 100644 src/components/Slider/migrate-to-7.x.md create mode 100644 src/components/Tag/migrate-to-7.x.md diff --git a/docs/migration/migrate-to-7.x.md b/docs/migration/migrate-to-7.x.md index 050d7a03cf..cd6205247e 100644 --- a/docs/migration/migrate-to-7.x.md +++ b/docs/migration/migrate-to-7.x.md @@ -40,7 +40,7 @@ Anything in this document is subject to change up until v10 is released._ | `CopyButton` | No breaking changes | | `DangerButton` | No breaking changes | | `DataTable` | [Migrate](../../src/components/DataTable/migrate-to-7.x.md) | -| `DatePicker` | No breaking changes | +| `DatePicker` | [Migrate](../../src/components/DatePicker/migrate-to-7.x.md) | | `DatePickerInput` | No breaking changes | | `Dropdown` | Existing import remapped to `DropdownV2` | | `DropdownItem` | No breaking changes | @@ -64,7 +64,7 @@ Anything in this document is subject to change up until v10 is released._ | `Notification` | Deprecated, use `InlineNotification` or `ToastNotification` instead | | `NumberInput` | [Migrate](../../src/components/NumberInput/migrate-to-7.x.md) | | `OverflowMenu` | [Migrate](../../src/components/OverflowMenu/migrate-to-7.x.md) | -| `OverflowMenuItem` | No breaking changes | +| `OverflowMenuItem` | [Migrate](../../src/components/OverflowMenuItem/migrate-to-7.x.md) | | `Pagination` | Export now points to `PaginationV2` | | `PaginationV2` | Renamed to `Pagination` | | `PrimaryButton` | No breaking changes | @@ -81,7 +81,7 @@ Anything in this document is subject to change up until v10 is released._ | `SelectItemGroup` | No breaking changes | | `SkeletonPlaceholder` | No breaking changes | | `SkeletonText` | No breaking changes | -| `Slider` | No breaking changes | +| `Slider` | [Migrate](../../src/components/Slider/migrate-to-7.x.md) | | `StructuredList` | No breaking changes | | `Switch` | No breaking changes | | `Tab` | No breaking changes | @@ -94,7 +94,7 @@ Anything in this document is subject to change up until v10 is released._ | `TableRow` | Export now points to `DataTable.TableRow` | | `TableRowExpanded` | Removed | | `Tabs` | No breaking changes | -| `Tag` | No breaking changes | +| `Tag` | [Migrate](../../src/components/Tag/migrate-to-7.x.md) | | `TextArea` | No breaking changes | | `TextInput` | No breaking changes | | `Tile` | No breaking changes | diff --git a/src/components/DatePicker/DatePicker.js b/src/components/DatePicker/DatePicker.js index b420abfcb8..bb323323fe 100644 --- a/src/components/DatePicker/DatePicker.js +++ b/src/components/DatePicker/DatePicker.js @@ -257,7 +257,7 @@ export default class DatePicker extends Component { if (typeof appendTo === 'string' && !breakingChangesX) { warning( false, - `The DatePicker appendTo prop will be deprecated in Carbon X. + `CSS selector (string) for the DatePicker appendTo prop will be deprecated in Carbon X. - If you were using appendTo for styling, consider using a className. - If you were using appendTo for attaching to a specific DOM node, consider a React portal.` ); diff --git a/src/components/DatePicker/migrate-to-7.x.md b/src/components/DatePicker/migrate-to-7.x.md new file mode 100644 index 0000000000..2318c5e903 --- /dev/null +++ b/src/components/DatePicker/migrate-to-7.x.md @@ -0,0 +1,7 @@ +# Props + +`` + +| Prop | v9 | v10 | +| ---------- | ------------------------------------ | ----------------------- | +| `appendTo` | Accepts a CSS selector or a DOM node | Accepts a DOM node only | diff --git a/src/components/OverflowMenu/migrate-to-7.x.md b/src/components/OverflowMenu/migrate-to-7.x.md index a786e4ee40..93bbff085b 100644 --- a/src/components/OverflowMenu/migrate-to-7.x.md +++ b/src/components/OverflowMenu/migrate-to-7.x.md @@ -2,11 +2,12 @@ `` -| v9 | v10 | -| ----------------------------------------- | -------------------------------------------------------------------------------- | -| `floatingMenu` | Removed - `` always works as a floating menu | -| `icon`, icon name from `carbon-icons` | `renderIcon`, which takes a React component, e.g. one from `@carbon/icons-react` | -| `iconName`, icon data from `carbon-icons` | `renderIcon`, which takes a React component, e.g. one from `@carbon/icons-react` | +| v9 | v10 | +| ---------------------------------------------- | -------------------------------------------------------------------------------- | +| `floatingMenu` | Removed - `` always works as a floating menu | +| `icon`, icon name from `carbon-icons` | `renderIcon`, which takes a React component, e.g. one from `@carbon/icons-react` | +| `iconName`, icon data from `carbon-icons` | `renderIcon`, which takes a React component, e.g. one from `@carbon/icons-react` | +| `ref` grabs the React class instance reference | `ref` grabs the trigger button | ## `v10` example diff --git a/src/components/OverflowMenuItem/migrate-to-10.x.md b/src/components/OverflowMenuItem/migrate-to-10.x.md deleted file mode 100644 index d92817451b..0000000000 --- a/src/components/OverflowMenuItem/migrate-to-10.x.md +++ /dev/null @@ -1,3 +0,0 @@ -# Props - -`floatingMenu` prop in `` has been gone, and overflow menu always works as a floating menu. diff --git a/src/components/OverflowMenuItem/migrate-to-7.x.md b/src/components/OverflowMenuItem/migrate-to-7.x.md new file mode 100644 index 0000000000..e61b5c6398 --- /dev/null +++ b/src/components/OverflowMenuItem/migrate-to-7.x.md @@ -0,0 +1,3 @@ +# Props + +`floatingMenu` prop that is set from `` has been gone, and overflow menu always works as a floating menu. diff --git a/src/components/RadioButton/migrate-to-7.x.md b/src/components/RadioButton/migrate-to-7.x.md index 7bbb25faa9..b469d84234 100644 --- a/src/components/RadioButton/migrate-to-7.x.md +++ b/src/components/RadioButton/migrate-to-7.x.md @@ -6,3 +6,9 @@ | ------------------------------------------- | ---------------------------------------- | ------------------- | | `ref` | Grabs the React class instance reference | Grabs the `` | | `top`/`bottom` for `labelPosition` property | | Removed | + +# CSS + +`` + +No longer adds `radioButtonWrapper` class to the top-level element. Please use `bx--radio-button-wrapper` for style overrides. diff --git a/src/components/Slider/migrate-to-7.x.md b/src/components/Slider/migrate-to-7.x.md new file mode 100644 index 0000000000..a83dfbc47e --- /dev/null +++ b/src/components/Slider/migrate-to-7.x.md @@ -0,0 +1,7 @@ +# Props + +`` + +| Prop | v9 | v10 | +| ---------- | -------------------------------------------------------- | -------------------------- | +| `onChange` | Fires on `value` prop change in addition to user gesture | Fires only on user gesture | diff --git a/src/components/Tag/migrate-to-7.x.md b/src/components/Tag/migrate-to-7.x.md new file mode 100644 index 0000000000..b73958463e --- /dev/null +++ b/src/components/Tag/migrate-to-7.x.md @@ -0,0 +1,9 @@ +# Props + +`` + +See [our website](https://www.carbondesignsystem.com/components/tag/code) for details. + +| Prop | v9 | v10 | +| ------ | --------------------------------- | ------------------------------ | +| `type` | Accepts `beta`, `community`, etc. | Accepts `red`, `magenta`, etc. | diff --git a/src/components/Tooltip/migrate-to-7.x.md b/src/components/Tooltip/migrate-to-7.x.md index cb6ff0fce6..1f3bcd0fd6 100644 --- a/src/components/Tooltip/migrate-to-7.x.md +++ b/src/components/Tooltip/migrate-to-7.x.md @@ -2,10 +2,11 @@ `` -| v9 | v10 | -| ----------------------------------------- | -------------------------------------------------------------------------------- | -| `icon`, icon name from `carbon-icons` | `renderIcon`, which takes a React component, e.g. one from `@carbon/icons-react` | -| `iconName`, icon data from `carbon-icons` | `renderIcon`, which takes a React component, e.g. one from `@carbon/icons-react` | +| v9 | v10 | +| ---------------------------------------------- | -------------------------------------------------------------------------------- | +| `icon`, icon name from `carbon-icons` | `renderIcon`, which takes a React component, e.g. one from `@carbon/icons-react` | +| `iconName`, icon data from `carbon-icons` | `renderIcon`, which takes a React component, e.g. one from `@carbon/icons-react` | +| `ref` grabs the React class instance reference | `ref` grabs the trigger button | ## `v10` example