Skip to content

Commit 7746150

Browse files
alexfauquetteflaviendelanglecherniavskiiKenanYusufarminmeh
authored
v8.0.0-alpha.13 (#16684)
Signed-off-by: Alexandre Fauquette <[email protected]> Co-authored-by: Flavien DELANGLE <[email protected]> Co-authored-by: Andrew Cherniavskyi <[email protected]> Co-authored-by: Kenan Yusuf <[email protected]> Co-authored-by: Armin Mehinovic <[email protected]> Co-authored-by: Michel Engelen <[email protected]>
1 parent 3855f1e commit 7746150

File tree

16 files changed

+314
-15
lines changed

16 files changed

+314
-15
lines changed

Diff for: CHANGELOG.md

+299
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,305 @@
55
All notable changes to this project will be documented in this file.
66
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
77

8+
## 8.0.0-alpha.13
9+
10+
_Feb 28, 2025_
11+
12+
We'd like to offer a big thanks to the 19 contributors who made this release possible. Here are some highlights ✨:
13+
14+
- 📊 Decouple `margin` and `axis-size`. A new API to support multiple axes (#16418) @JCQuintas
15+
- 🗺️ Added Bangla (bn-BD) locale
16+
- 🗺️ Improve Russian (ru-RU) and Hungarian (hu-HU) locale on the Data Grid
17+
18+
Special thanks go out to the community members for their contributions:
19+
@denpiligrim, @lhilgert9, @noherczeg, @officialkidmax, @pcorpet.
20+
Following are all team members who have contributed to this release:
21+
@alexfauquette, @arminmeh, @bernardobelchior, @cherniavskii, @flaviendelangle, @hasdfa, @Janpot, @JCQuintas, @KenanYusuf, @LukasTy, @michelengelen, @MBilalShafi, @oliviertassinari, @romgrk.
22+
23+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
24+
25+
### Data Grid
26+
27+
#### Breaking changes
28+
29+
- The `slots.baseFormControl` component was removed.
30+
31+
- The "Reset" button in the column visibility panel now resets to the initial column visibility model. Previously it was reset to the model that was active at the time the panel was opened. The reset behavior follows these rules:
32+
33+
1. If an initial `columnVisibilityModel` is provided, it resets to that model.
34+
2. If a controlled `columnVisibilityModel` is provided, it resets to the first model value.
35+
3. When the columns are updated (via the `columns` prop or `updateColumns()` API method), the reset reference point updates to the current `columnVisibilityModel`.
36+
37+
To revert to the previous behavior, provide a custom component to the `slots.columnsManagement`.
38+
39+
- The deprecated `LicenseInfo` export has been removed from the `@mui/x-data-grid-pro` and `@mui/x-data-grid-premium` packages.
40+
You have to import it from `@mui/x-license` instead:
41+
42+
```diff
43+
- import { LicenseInfo } from '@mui/x-data-grid-pro';
44+
- import { LicenseInfo } from '@mui/x-data-grid-premium';
45+
+ import { LicenseInfo } from '@mui/x-license';
46+
47+
LicenseInfo.setLicenseKey('YOUR_LICENSE_KEY');
48+
```
49+
50+
- The row selection model has been changed from `GridRowId[]` to `{ type: 'include' | 'exclude'; ids: Set<GridRowId> }`.
51+
Using `Set` allows for a more efficient row selection management.
52+
The `exclude` selection type allows to select all rows except the ones in the `ids` set.
53+
54+
This change impacts the following props:
55+
56+
- `rowSelectionModel`
57+
- `onRowSelectionModelChange`
58+
- `initialState.rowSelectionModel`
59+
60+
```diff
61+
- const [rowSelectionModel, setRowSelectionModel] = React.useState<GridRowSelectionModel>([]);
62+
+ const [rowSelectionModel, setRowSelectionModel] = React.useState<GridRowSelectionModel>({ type: 'include', ids: new Set() });
63+
```
64+
65+
This change also impacts the `gridRowSelectionStateSelector` selector.
66+
For convenience, use the `gridRowSelectionManagerSelector` selector to handle both selection types:
67+
68+
```diff
69+
- const rowSelection = gridRowSelectionStateSelector(apiRef);
70+
- const isRowSelected = rowSelection.includes(rowId);
71+
+ const rowSelectionManager = gridRowSelectionManagerSelector(apiRef);
72+
+ const isRowSelected = rowSelectionManager.has(rowId);
73+
```
74+
75+
There is also a `createRowSelectionManager` utility function that can be used to manage the row selection:
76+
77+
```ts
78+
const rowSelectionManager = createRowSelectionManager({
79+
type: 'include',
80+
ids: new Set(),
81+
});
82+
rowSelectionManager.select(rowId);
83+
rowSelectionManager.unselect(rowId);
84+
rowSelectionManager.has(rowId);
85+
```
86+
87+
- The `selectedIdsLookupSelector` selector has been removed. Use the `gridRowSelectionManagerSelector` or `gridRowSelectionStateSelector` selectors instead.
88+
- The `selectedGridRowsSelector` has been renamed to `gridRowSelectionIdsSelector`.
89+
- The `selectedGridRowsCountSelector` has been renamed to `gridRowSelectionCountSelector`.
90+
91+
- The data source feature and its related props are now stable.
92+
93+
```diff
94+
<DataGridPro
95+
- unstable_dataSource={dataSource}
96+
- unstable_dataSourceCache={cache}
97+
- unstable_lazyLoading
98+
- unstable_lazyLoadingRequestThrottleMs={100}
99+
+ dataSource={dataSource}
100+
+ dataSourceCache={cache}
101+
+ lazyLoading
102+
+ lazyLoadingRequestThrottleMs={100}
103+
/>
104+
```
105+
106+
- The data source API is now stable.
107+
108+
```diff
109+
- apiRef.current.unstable_dataSource.getRows()
110+
+ apiRef.current.dataSource.getRows()
111+
```
112+
113+
- The signature of `unstable_onDataSourceError()` has been updated to support future use-cases.
114+
115+
```diff
116+
<DataGrid
117+
- unstable_onDataSourceError={(error: Error, params: GridGetRowsParams) => {
118+
- if (params.filterModel) {
119+
- // do something
120+
- }
121+
- }}
122+
+ unstable_onDataSourceError={(error: GridGetRowsError | GridUpdateRowError) => {
123+
+ if (error instanceof GridGetRowsError && error.params.filterModel) {
124+
+ // do something
125+
+ }
126+
+ }}
127+
/>
128+
```
129+
130+
- Fix the type of the `GridSortModel` to allow readonly arrays.
131+
132+
- `GridSortItem` interface is not exported anymore.
133+
134+
- The `showToolbar` prop is now required to display the toolbar.
135+
136+
It is no longer necessary to pass `GridToolbar` as a slot to display the default toolbar.
137+
138+
```diff
139+
<DataGrid
140+
+ showToolbar
141+
- slots={{
142+
- toolbar: GridToolbar,
143+
- }}
144+
/>
145+
```
146+
147+
#### `@mui/[email protected]`
148+
149+
- [DataGrid] Add `showToolbar` prop to enable default toolbar (#16687) @KenanYusuf
150+
- [DataGrid] Column Visibility: Update "Reset" button behavior (#16626) @MBilalShafi
151+
- [DataGrid] Column management design updates (#16630) @KenanYusuf
152+
- [DataGrid] Fix `showColumnVerticalBorder` prop (#16715) @KenanYusuf
153+
- [DataGrid] Fix scrollbar overlapping cells on mount (#16639) @KenanYusuf
154+
- [DataGrid] Fix: base `Select` menuprops `onClose()` (#16643) @romgrk
155+
- [DataGrid] Make `GridSortItem` internal (#16732) @arminmeh
156+
- [DataGrid] Make data source stable (#16710) @MBilalShafi
157+
- [DataGrid] Reshape row selection model (#15651) @cherniavskii
158+
- [DataGrid] Replace `sx` prop usage with `styled()` components (#16665) @KenanYusuf
159+
- [DataGrid] Refactor: create base `Autocomplete` (#16390) @romgrk
160+
- [DataGrid] Refactor: remove base form control (#16634) @romgrk
161+
- [DataGrid] Refactor: remove base input label & adornment (#16646) @romgrk
162+
- [DataGrid] Refactor: remove material containers (#16633) @romgrk
163+
- [DataGrid] Refactor: theme to CSS variables (#16588) @romgrk
164+
- [DataGrid] Update the signature of the `onDataSourceError()` callback (#16718) @MBilalShafi
165+
- [DataGrid] Use readonly array for the `GridSortModel` (#16627) @pcorpet
166+
- [DataGrid] Fix the popper focus trap (#16736) @romgrk
167+
- [l10n] Added Bangla (bn-BD) locale (#16648) @officialkidmax
168+
- [l10n] Improve Hungarian (hu-HU) locale (#16578) @noherczeg
169+
- [l10n] Improve Russian (ru-RU) locale (#16591) @denpiligrim
170+
171+
#### `@mui/[email protected]` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
172+
173+
Same changes as in `@mui/[email protected]`, plus:
174+
175+
- [DataGridPro] Remove `LicenseInfo` reexports (#16671) @cherniavskii
176+
177+
#### `@mui/[email protected]` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
178+
179+
Same changes as in `@mui/[email protected]`, plus:
180+
181+
- [DataGridPremium] Use `valueGetter` to get row group keys (#16016) @cherniavskii
182+
183+
### Date and Time Pickers
184+
185+
#### Breaking changes
186+
187+
- The `<DateRangePicker />` now uses a `dialog` instead of a `tooltip` to render their view when used with a single input range field.
188+
189+
#### `@mui/[email protected]`
190+
191+
- [l10n] Added Bangla (bn-BD) locale (#16648) @officialkidmax
192+
- [pickers] Clean the typing of the slots on the range pickers (#16670) @flaviendelangle
193+
- [pickers] Fix Time Clock meridiem button selected styles (#16681) @LukasTy
194+
- [pickers] Make the single input field the default field on range pickers (#16656) @flaviendelangle
195+
- [pickers] Move the opening logic to the range fields (#16175) @flaviendelangle
196+
197+
#### `@mui/[email protected]` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
198+
199+
Same changes as in `@mui/[email protected]`.
200+
201+
### Charts
202+
203+
#### Breaking changes
204+
205+
- Charts array inputs are now `readonly`. Allowing externally defined `as const` to be used as a prop value of the React component.
206+
207+
```tsx
208+
const xAxis = [{ position: 'bottom' }] as const
209+
<BarChart xAxis={xAxis} />
210+
```
211+
212+
- Replace `topAxis`, `rightAxis`, `bottomAxis` and `leftAxis` props by the `position` property in the axis config.
213+
If you were using them to place axis, set the `position` property to the corresponding value `'top' | 'right' | 'bottom' | 'left'`.
214+
If you were disabling an axis by setting it to `null`, set its `position` to `'none'`.
215+
216+
```diff
217+
<LineChart
218+
yAxis={[
219+
{
220+
scaleType: 'linear',
221+
+ position: 'right',
222+
},
223+
]}
224+
series={[{ data: [1, 10, 30, 50, 70, 90, 100], label: 'linear' }]}
225+
height={400}
226+
- rightAxis={{}}
227+
/>
228+
```
229+
230+
- Remove `position` prop from `ChartsXAxis` and `ChartsYAxis`.
231+
The `position` prop has been removed from the `ChartsXAxis` and `ChartsYAxis` components. Configure it directly in the axis config.
232+
233+
```diff
234+
<ChartContainer
235+
yAxis={[
236+
{
237+
id: 'my-axis',
238+
+ position: 'right',
239+
},
240+
]}
241+
>
242+
- <ChartsYAxis axisId="my-axis" position="right" />
243+
+ <ChartsYAxis axisId="my-axis" />
244+
</ChartContainer>
245+
```
246+
247+
- Add `minTickLabelGap` to x-axis, which allows users to define the minimum gap, in pixels, between two tick labels. The default value is 4px. Make sure to check your charts as the spacing between tick labels might have changed.
248+
249+
#### `@mui/[email protected]`
250+
251+
- [charts] Accept component in `labelMarkType` (#16739) @bernardobelchior
252+
- [charts] Add `minTickLabelGap` to x-axis (#16548) @bernardobelchior
253+
- [charts] Add unit test for pie chart with empty series (#16663) @bernardobelchior
254+
- [charts] Decouple `margin` and `axis-size` (#16418) @JCQuintas
255+
- [charts] Display slider tooltip on demos (#16723) @JCQuintas
256+
- [charts] Fix composition docs link (#16761) @bernardobelchior
257+
- [charts] Fix default label measurement being off (#16635) @bernardobelchior
258+
- [charts] Fix is highlighted memoization (#16592) @alexfauquette
259+
- [charts] Fix missing `theme.shape` error in the tooltip (#16748) @alexfauquette
260+
- [charts] Fix typo in error message (#16641) @JCQuintas
261+
- [charts] Improve axis size docs (#16673) @JCQuintas
262+
- [charts] Improve performance of rendering ticks in x-axis (#16536) @bernardobelchior
263+
- [charts] Make `defaultizeAxis` function type-safe (#16642) @JCQuintas
264+
- [charts] Make `series.data` readonly (#16645) @JCQuintas
265+
- [charts] Migrate `ChartsUsageDemo` to TSX and removed NoSnap (#16686) @JCQuintas
266+
- [charts] Prevent `position='none'` axes from rendering (#16727) @JCQuintas
267+
- [charts] Make array inputs readonly (#16632) @JCQuintas
268+
- [charts] Remove state initialization hack (#16520) @alexfauquette
269+
- [charts] Remove redundant default axis (#16734) @bernardobelchior
270+
271+
#### `@mui/[email protected]` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
272+
273+
Same changes as in `@mui/[email protected]`, plus:
274+
275+
- [charts-pro] Add back zoom control (#16550) @alexfauquette
276+
277+
### Tree View
278+
279+
#### `@mui/[email protected]`
280+
281+
Internal changes.
282+
283+
#### `@mui/[email protected]` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
284+
285+
Same changes as in `@mui/[email protected]`.
286+
287+
288+
289+
- [codemod] Add a few Data Grid codemods (#16711) @MBilalShafi
290+
- [codemod] Improve Pickers renaming codemod (#16685) @LukasTy
291+
292+
### Docs
293+
294+
- [docs] Fix charts with on bar and line pages (#16712) @alexfauquette
295+
- [docs] Fix migration guide introduction for charts (#16679) @alexfauquette
296+
- [docs] Fix remaining charts demos on mobile (#16728) @alexfauquette
297+
- [docs] Fix scroll overflow on mobile (#16675) @oliviertassinari
298+
- [docs] Improve Pickers migration page (#16682) @LukasTy
299+
- [docs] Update small Pickers doc inconsistencies (#16724) @LukasTy
300+
- [code-infra] Charts changes for `vitest` (#16755) @JCQuintas
301+
- [code-infra] General packages changes for `vitest` (#16757) @JCQuintas
302+
- [code-infra] Native Node.js ESM (#16603) @Janpot
303+
- [infra] Update contributor acknowledgment wording (#16751) @michelengelen
304+
- [test] Revert timeout increase for possibly slow tests (#16651) @LukasTy
305+
- [x-license] Introduce usage telemetry (#13530) @hasdfa
306+
8307
## 8.0.0-alpha.12
9308

10309
_Feb 17, 2025_

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "8.0.0-alpha.12",
2+
"version": "8.0.0-alpha.13",
33
"private": true,
44
"scripts": {
55
"preinstall": "npx only-allow pnpm",

Diff for: packages/x-charts-pro/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mui/x-charts-pro",
3-
"version": "8.0.0-alpha.12",
3+
"version": "8.0.0-alpha.13",
44
"description": "The Pro plan edition of the Charts components (MUI X).",
55
"author": "MUI Team",
66
"main": "src/index.ts",

Diff for: packages/x-charts-vendor/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mui/x-charts-vendor",
3-
"version": "8.0.0-alpha.10",
3+
"version": "8.0.0-alpha.13",
44
"description": "Vendored dependencies for MUI X Charts",
55
"author": "MUI Team",
66
"keywords": [

Diff for: packages/x-charts/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mui/x-charts",
3-
"version": "8.0.0-alpha.12",
3+
"version": "8.0.0-alpha.13",
44
"description": "The community edition of the Charts components (MUI X).",
55
"author": "MUI Team",
66
"main": "src/index.js",

Diff for: packages/x-codemod/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mui/x-codemod",
3-
"version": "8.0.0-alpha.12",
3+
"version": "8.0.0-alpha.13",
44
"bin": "./codemod.js",
55
"private": false,
66
"author": "MUI Team",

Diff for: packages/x-data-grid-generator/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mui/x-data-grid-generator",
3-
"version": "8.0.0-alpha.12",
3+
"version": "8.0.0-alpha.13",
44
"description": "Generate fake data for demo purposes only.",
55
"author": "MUI Team",
66
"main": "src/index.ts",

Diff for: packages/x-data-grid-premium/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mui/x-data-grid-premium",
3-
"version": "8.0.0-alpha.12",
3+
"version": "8.0.0-alpha.13",
44
"description": "The Premium plan edition of the Data Grid Components (MUI X).",
55
"author": "MUI Team",
66
"main": "src/index.ts",

Diff for: packages/x-data-grid-pro/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mui/x-data-grid-pro",
3-
"version": "8.0.0-alpha.12",
3+
"version": "8.0.0-alpha.13",
44
"description": "The Pro plan edition of the Data Grid components (MUI X).",
55
"author": "MUI Team",
66
"main": "src/index.ts",

Diff for: packages/x-data-grid/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mui/x-data-grid",
3-
"version": "8.0.0-alpha.12",
3+
"version": "8.0.0-alpha.13",
44
"description": "The Community plan edition of the Data Grid components (MUI X).",
55
"author": "MUI Team",
66
"main": "src/index.ts",

Diff for: packages/x-date-pickers-pro/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mui/x-date-pickers-pro",
3-
"version": "8.0.0-alpha.12",
3+
"version": "8.0.0-alpha.13",
44
"description": "The Pro plan edition of the Date and Time Picker components (MUI X).",
55
"author": "MUI Team",
66
"main": "src/index.ts",

Diff for: packages/x-date-pickers/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mui/x-date-pickers",
3-
"version": "8.0.0-alpha.12",
3+
"version": "8.0.0-alpha.13",
44
"description": "The community edition of the Date and Time Picker components (MUI X).",
55
"author": "MUI Team",
66
"main": "src/index.ts",

0 commit comments

Comments
 (0)