Skip to content

Commit

Permalink
[docs] Fix some migration typos (#15422)
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasTy authored Nov 14, 2024
1 parent e07d874 commit b541da8
Show file tree
Hide file tree
Showing 6 changed files with 234 additions and 28 deletions.
216 changes: 211 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,15 @@ Same changes as in `@mui/[email protected]`.

#### Breaking changes

- The `legend` prop got removed. To pass props to the legend, use `slotProps={{ legend: { ... } }}` instead. This can be automatically done with the codemod as long as the `legend` prop does not come from a destructured object — [Learn more](https://next.mui.com/x/migration/migration-charts-v7/#legend-props-propagation-✅).
- The `legend` prop has been removed. To pass props to the legend, use `slotProps={{ legend: { ... } }}` instead. This can be automatically done with the codemod as long as the `legend` prop does not come from a destructured object — [Learn more](https://next.mui.com/x/migration/migration-charts-v7/#legend-props-propagation-✅).

- The `slots.legend` does not receive the `drawingArea` prop. You can still access your custom legend with the `useDrawingArea()` hook if your custom legend needs it.

- Removed or renamed multiple props from Series — [Learn more](https://next.mui.com/x/migration/migration-charts-v7/#series-properties-renaming).

- The `highlighted` and `faded` properties of highlightScope were deprecated in favor of `highlight` and `fade`.
- The `highlighted` and `faded` properties of highlightScope have been deprecated in favor of `highlight` and `fade`.
The deprecated ones are now removed.
- The `xAxisKey`, `yAxisKey`, and `zAxisKey` properties got deprecated in favor of `xAxisId`, `yAxisId`, and `zAxisId`.
- The `xAxisKey`, `yAxisKey`, and `zAxisKey` properties have been deprecated in favor of `xAxisId`, `yAxisId`, and `zAxisId`.

- The Pie Chart lost all props and renderer linked to axes because pie chart does not need cartesian axes. If you used it, you can still add them back with composition. Please consider opening an issue to share your use case with us — [Learn more](https://next.mui.com/x/migration/migration-charts-v7/#remove-pie-chart-axes).

Expand Down Expand Up @@ -196,6 +196,212 @@ Same changes as in `@mui/[email protected]`.
- [release] v8 preparation (#15054) @michelengelen
- [test] Fix advanced list view regression test snapshot (#15260) @KenanYusuf

## 7.22.2

_Nov 8, 2024_

We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:

- 👨🏽‍💻 API enhancements
- 🐞 Bugfixes

Special thanks go out to the community contributors who have helped make this release possible:
@clins1994, @GuillaumeMeheut, @k-rajat19.
Following are all team members who have contributed to this release:
@LukasTy, @MBilalShafi, @KenanYusuf, @arminmeh.

### Upcoming alpha

Keep an eye out for the MUI⠀X `v8.0.0-aplha.0` release soon. It will follow a weekly release schedule as always until it is stable.

<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->

### Data Grid

#### `@mui/[email protected]`

- [DataGrid] Fix `null` reference error in `GridVirtualScrollbar` (#15289) @MBilalShafi
- [DataGrid] Fix filtering with `boolean` column type (#15257) @k-rajat19
- [DataGrid] Improve row selection propagation trigger (#15274) @MBilalShafi
- [DataGrid] Preprocess edit cell props on backspace/delete (#15223) @KenanYusuf
- [DataGrid] Add a recipe to persist column width and order (#15309) @MBilalShafi

#### `@mui/[email protected]` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')

Same changes as in `@mui/[email protected]`, plus:

- [DataGridPro] Apply default properties if they are not passed in a reorder column (#15320) @k-rajat19
- [DataGridPro] Toggle row expansion with `Enter` key in Tree data (#15313) @k-rajat19

#### `@mui/[email protected]` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')

Same changes as in `@mui/[email protected]`, plus:

- [DataGridPremium] Fix incorrect rows selection count when selection propagation is enabled with row grouping (#15222) @arminmeh

### Date and Time Pickers

#### `@mui/[email protected]`

- [pickers] Add support for `[email protected]` (#15248) @LukasTy

#### `@mui/[email protected]` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')

Same changes as in `@mui/[email protected]`.

### Charts

#### `@mui/[email protected]`

- [charts] Allow `SeriesValueFormatter` to return `null` value (#15295) @clins1994
- [charts] Allow configuring the `domainLimit` for each axis. (#15325) @GuillaumeMeheut

#### `@mui/[email protected]` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')

Same changes as in `@mui/[email protected]`.

## 7.22.1

_Nov 1, 2024_

We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:

- 🐞 Bugfixes
- 📚 Documentation improvements
- 🌍 Improve Polish (pl-PL) locale on the Date Pickers

Special thanks go out to the community contributors who have helped make this release possible:
@wojtkolos, @dpak-maurya, @k-rajat19.
Following are all team members who have contributed to this release:
@LukasTy, @arminmeh, @MBilalShafi, @KenanYusuf, @flaviendelangle.

<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->

### Data Grid

#### `@mui/[email protected]`

- [DataGrid] Fix right column group header border (#15152) @KenanYusuf
- [DataGrid] Fix scroll jump when holding down arrow keys (#15167) @arminmeh
- [DataGrid] Move `rowGroupingModelChange` handler to respective hook (#15127) @MBilalShafi
- [DataGrid] Prevent error when deleting the last row (#15153) @dpak-maurya
- [DataGrid] Fix overlay height in autoHeight mode (#15205) @cherniavskii

#### `@mui/[email protected]` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')

Same changes as in `@mui/[email protected]`, plus:

- [DataGridPro] Add list view tests (#15166) @KenanYusuf

#### `@mui/[email protected]` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')

- [DataGridPremium] Keep focus on the grouping cell on space bar press #15155 @k-rajat19

### Date and Time Pickers

#### `@mui/[email protected]`

- [l10n] Improve Polish (pl-PL) locale (#15177) @wojtkolos

#### `@mui/[email protected]` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')

Same changes as in `@mui/[email protected]`.

### Tree View

#### `@mui/[email protected]`

- [TreeView] Export `TreeItem2DragAndDropOverlay` and `TreeItem2LabelInput` from the root of each package (#15208) @flaviendelangle
- [TreeView] Fix drag and drop color usage (#15149) @LukasTy

#### `@mui/[email protected]` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')

Same changes as in `@mui/[email protected]`.

### Docs

- [docs] Add section explaining how to keep the selection while filtering in Data grid docs (#15199) @arminmeh

## 7.22.0

_Oct 25, 2024_

We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:

- 🛰 Introduce [server-side support for Data Grid row grouping](https://mui.com/x/react-data-grid/server-side-data/row-grouping/)
- 🐞 Bugfixes
- 📚 Documentation improvements
- 🌍 Improve Portuguese (pt-BR) locale on the Data Grid component

Special thanks go out to the community contributors who have helped make this release possible:
@clins1994, @GITPHLAP, @k-rajat19, @kalyan90, @merotosc, @yash49.
Following are all team members who have contributed to this release:
@cherniavskii, @flaviendelangle, @LukasTy, @MBilalShafi, @romgrk.

<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->

### Data Grid

#### `@mui/[email protected]`

- [DataGrid] Fix `GridPanelAnchor` positioning (#15022) @k-rajat19
- [DataGrid] Fix ugly prop-types for the `pageStyle` prop of the `GridPrintExportMenuItem` component (#15015) @flaviendelangle
- [DataGrid] Fix value type in filter model for number and boolean column type (#14733) @k-rajat19
- [DataGrid] Focus next row when the focused row is deleted (#15067) @cherniavskii
- [DataGrid] Remove some usages of `<Box />` and `<Badge />` (#15013) @romgrk
- [DataGrid] Fix number of rows to display for page size options with negative value (#14890) @kalyan90
- [l10n] Improve Portuguese (pt-BR) locale (#15021) @k-rajat19

#### `@mui/[email protected]` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')

Same changes as in `@mui/[email protected]`, plus:

- [DataGridPro] Fix column pinning layout (#15073) @cherniavskii

#### `@mui/[email protected]` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')

Same changes as in `@mui/[email protected]`, plus:

- [DataGridPremium] Server-side data source with row grouping (#15109) @MBilalShafi

### Date and Time Pickers

#### `@mui/[email protected]`

- [pickers] Fix `DateCalendar` timezone management (#15119) @LukasTy
- [pickers] Fix `DigitalClock` time options on a `DST` switch day (#15092) @LukasTy

#### `@mui/[email protected]` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')

Same changes as in `@mui/[email protected]`.

### Charts

#### `@mui/[email protected]`

- [charts] Export data type in `onAxisClick(_, data)` callback (#15038) @clins1994

#### `@mui/[email protected]` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')

Same changes as in `@mui/[email protected]`.

### Tree View

#### `@mui/[email protected]`

- [TreeView] Make the cancellable event types public (#14992) @flaviendelangle

### Docs

- [docs] Fix typo in Tree View docs (#15047) @yash49

### Core

- [core] Adjust cherry-pick GH actions (#15101) @LukasTy
- [core] Update prettier target branch (#15100) @MBilalShafi
- [core] Update some `default-branch-switch` instances for `v7.x` (#15085) @MBilalShafi
- [test] Revert to using `fireEvent` instead of `userEvent` (#14927) @LukasTy

## 7.21.0

_Oct 17, 2024_
Expand Down Expand Up @@ -4310,7 +4516,7 @@ Same changes as in `@mui/[email protected]`.

#### Breaking changes

- The slot interfaces got renamed to match with `@mui/base` naming.
- The slot interfaces have been renamed to match with `@mui/base` naming.
The `SlotsComponent` suffix has been replaced with `Slots` and `SlotsComponentsProps` with `SlotProps`.

```diff
Expand Down Expand Up @@ -5352,7 +5558,7 @@ Same changes as in `@mui/[email protected]`.

#### Breaking changes

Types for `slots` and `slotProps` got renamed by removing the "Component" which is meaningless for charts.
Types for `slots` and `slotProps` have been renamed by removing the "Component" which is meaningless for charts.
Unless you imported those types, to create a wrapper, you should not be impacted by this breaking change.

Here is an example of the renaming for the `<ChartsTooltip />` component.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Here is an example of how you can transpile these features on webpack 4 using th

#### Types

Some types got renamed for coherence:
Some types have been renamed for coherence:

| v6 | v7 |
| :-------------------------------- | :----------------------- |
Expand Down
20 changes: 10 additions & 10 deletions docs/data/migration/migration-charts-v7/migration-charts-v7.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Not all use cases are covered by codemods. In some scenarios, like props spreadi
For example, if a codemod tries to rename a prop, but this prop is hidden with the spread operator, it won't be transformed as expected.

```tsx
<PieChart {...pickerProps} /> // The codemod will not modify the content of `pickerProps`.
<PieChart {...chartProps} /> // The codemod will not modify the content of `chartProps`.
```

After running the codemods, make sure to test your application and that you don't have any console errors.
Expand All @@ -71,17 +71,17 @@ Feel free to [open an issue](https://github.com/mui/mui-x/issues/new/choose) for

## Series properties renaming

Some properties got deprecated in v7 in favor of a more consistent naming convention.
Those deprecated properties got removed in v8.
Some properties were deprecated in v7 in favor of a more consistent naming convention.
Those deprecated properties have been removed in v8.

The impacted properties are:

- The `xAxisKey`, `yAxisKey`, and `zAxisKey` are renamed `xAxisId`, `yAxisId`, and `zAxisId`.
- The `highlighted` and `faded` properties of `series.highlightScope` are renamed `highlight` and `fade`.
- The `xAxisKey`, `yAxisKey`, and `zAxisKey` have been renamed `xAxisId`, `yAxisId`, and `zAxisId`.
- The `highlighted` and `faded` properties of `series.highlightScope` have been renamed `highlight` and `fade`.

## Legend props propagation ✅

The `legend` props of charts single components got removed.
The `legend` prop of charts single components has been removed.
To pass props to the legend, use the `slotProps.legend`.

```diff
Expand All @@ -91,7 +91,7 @@ To pass props to the legend, use the `slotProps.legend`.

## Removing ResponsiveChartContainer ✅

The `ResponsiveChartContainer` got removed.
The `ResponsiveChartContainer` has been removed.
You can now use `ChartContainer` as a responsive container which works now exactly the same way.

```diff
Expand All @@ -109,14 +109,14 @@ You can now use `ChartContainer` as a responsive container which works now exact

## New DOM structure for ChartContainer

The `<ChartContainer />` now wrap the `svg` component into a `div`.
The `<ChartContainer />` now wraps the `svg` component into a `div`.

This change should not impact your codebase except for some CSS selector edge cases.

## Remove Pie Chart axes

The `<PieChart />` got by error the code to render axes.
This code is removed in v8, which implies removing the following props: `axisHighlight`, `topAxis`, `rightAxis`, `bottomAxis`, and `leftAxis`.
The `<PieChart />` by error had the code to render axes.
This code has been removed in v8, which implies removing the following props: `axisHighlight`, `topAxis`, `rightAxis`, `bottomAxis`, and `leftAxis`.

This should not impact your code.
If you used axes in a pie chart please open an issue, we would be curious to get more information about the use-case.
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ The same applies to `slotProps` and `componentsProps`.

### ✅ Rename slots types

The slot interfaces got renamed to match with `@mui/base` naming convention.
The slot interfaces have been renamed to match with `@mui/base` naming convention.
Suffix `SlotsComponent` is replaced by `Slots` and `SlotsComponentsProps` is replaced by `SlotProps`.
If you are not relying on the codemod, consider checking all the renamed types in [this file](https://github.com/mui/mui-x/blob/HEAD/packages/x-codemod/src/v7.0.0/pickers/rename-slots-types/index.ts).
Here is an example on the `DateCalendar` typing.
Expand Down
20 changes: 10 additions & 10 deletions docs/data/migration/migration-pickers-v7/migration-pickers-v7.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,19 +258,19 @@ const theme = createTheme({

The following variables were renamed to have a coherent `Picker` / `Pickers` prefix:

- `usePickersTranslation`
- `usePickersTranslations`

```diff
- import { usePickersTranslation } from '@mui/x-date-pickers/hooks';
- import { usePickersTranslation } from '@mui/x-date-pickers';
- import { usePickersTranslation } from '@mui/x-date-pickers-pro';
- import { usePickersTranslations } from '@mui/x-date-pickers/hooks';
- import { usePickersTranslations } from '@mui/x-date-pickers';
- import { usePickersTranslations } from '@mui/x-date-pickers-pro';

+ import { usePickerTranslation } from '@mui/x-date-pickers/hooks';
+ import { usePickerTranslation } from '@mui/x-date-pickers';
+ import { usePickerTranslation } from '@mui/x-date-pickers-pro';
+ import { usePickerTranslations } from '@mui/x-date-pickers/hooks';
+ import { usePickerTranslations } from '@mui/x-date-pickers';
+ import { usePickerTranslations } from '@mui/x-date-pickers-pro';

- const translations = usePickersTranslation();
+ const translations = usePickerTranslation();
- const translations = usePickersTranslations();
+ const translations = usePickerTranslations();
```

- `usePickersContext`
Expand Down Expand Up @@ -578,7 +578,7 @@ If you were using them, you need to replace them with the following code:

## Stop using `LicenseInfo` from `@mui/x-date-pickers-pro`

The `LicenseInfo` object is not exported from the `@mui/x-date-pickers-pro` package anymore.
The `LicenseInfo` object is no longer exported from the `@mui/x-date-pickers-pro` package.
You can import it from `@mui/x-license` instead:

```diff
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Not all use cases are covered by codemods. In some scenarios, like props spreadi
For example, if a codemod tries to rename a prop, but this prop is hidden with the spread operator, it won't be transformed as expected.

```tsx
<RichTreeView {...pickerProps} />
<RichTreeView {...treeViewProps} />
```

After running the codemods, make sure to test your application and that you don't have any console errors.
Expand Down

0 comments on commit b541da8

Please sign in to comment.