Skip to content

Commit b6ca005

Browse files
committed
Merge branch 'master' into header-filter-design
1 parent 585e71d commit b6ca005

File tree

882 files changed

+15717
-10687
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

882 files changed

+15717
-10687
lines changed

.github/workflows/codeql.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2020
# Initializes the CodeQL tools for scanning.
2121
- name: Initialize CodeQL
22-
uses: github/codeql-action/init@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0
22+
uses: github/codeql-action/init@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1
2323
with:
2424
languages: typescript
2525
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -29,4 +29,4 @@ jobs:
2929
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
3030
# queries: security-extended,security-and-quality
3131
- name: Perform CodeQL Analysis
32-
uses: github/codeql-action/analyze@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0
32+
uses: github/codeql-action/analyze@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1

.github/workflows/maintenance.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
pull-requests: write
2626
steps:
2727
- name: check if prs are dirty
28-
uses: eps1lon/actions-label-merge-conflict@1b1b1fcde06a9b3d089f3464c96417961dde1168 # v3.0.2
28+
uses: eps1lon/actions-label-merge-conflict@1df065ebe6e3310545d4f4c4e862e43bdca146f0 # v3.0.3
2929
with:
3030
dirtyLabel: 'PR: out-of-date'
3131
repoToken: '${{ secrets.GITHUB_TOKEN }}'

.github/workflows/scorecards.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ jobs:
4444

4545
# Upload the results to GitHub's code scanning dashboard.
4646
- name: Upload to code-scanning
47-
uses: github/codeql-action/upload-sarif@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0
47+
uses: github/codeql-action/upload-sarif@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1
4848
with:
4949
sarif_file: results.sarif

CHANGELOG.md

+126
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,132 @@
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.7
9+
10+
_Jan 9, 2025_
11+
12+
We'd like to offer a big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
13+
14+
- 📊 Charts legend is now an HTML element which can be styled more easily
15+
- 💫 Support [aggregation with server-side data](/x/react-data-grid/server-side-data/aggregation/)
16+
- 🏎️ Improve Data Grid aggregation performance
17+
- 🌍 Add Chinese (Taiwan) (zh-TW) locale on the Date and Time Pickers
18+
- 🌍 Improve Norwegian (nb-NO) locale on the Date and Time Pickers
19+
- 🐞 Bugfixes
20+
21+
Special thanks go out to the community contributors who have helped make this release possible:
22+
@derek-0000, @josteinjhauge, @k-rajat19, @nusr, @tomashauser.
23+
Following are all team members who have contributed to this release:
24+
@cherniavskii, @flaviendelangle, @JCQuintas, @LukasTy, @MBilalShafi, @arminmeh, @romgrk, @oliviertassinari.
25+
26+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
27+
28+
### Data Grid
29+
30+
#### `@mui/[email protected]`
31+
32+
- [DataGrid] Improve React 19 support (#15769) @LukasTy
33+
- [DataGrid] Add `name` attribute to the checkbox selection column (#15178) @derek-0000
34+
- [DataGrid] Fix number filter field formatting values while typing (#16062) @arminmeh
35+
- [DataGrid] Fix select all checkbox state reset with server side data (#16034) @MBilalShafi
36+
- [DataGrid] Refactor: create base button props (#15930) @romgrk
37+
- [DataGrid] Refactor: create tooltip props (#16086) @romgrk
38+
- [DataGrid] Fix TS error (#16046) @cherniavskii
39+
40+
#### `@mui/[email protected]` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
41+
42+
Same changes as in `@mui/[email protected]`.
43+
44+
#### `@mui/[email protected]` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
45+
46+
Same changes as in `@mui/[email protected]`, plus:
47+
48+
- [DataGridPremium] Improve aggregation performance for multiple columns (#16097) @cherniavskii
49+
- [DataGridPremium] Make Aggregation keyboard accessible in the column menu (#15934) @k-rajat19
50+
- [DataGridPremium] Server-side aggregation with data source (#15741) @MBilalShafi
51+
52+
### Date and Time Pickers
53+
54+
#### Breaking changes
55+
56+
- The `date-fns` and `date-fns-jalali` date library adapters have been renamed to better align with the current stable major versions — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#✅-rename-date-fns-adapter-imports)
57+
- Update default `closeOnSelect` and Action Bar `actions` values - [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#update-default-closeonselect-and-action-bar-actions-values)
58+
- The component passed to the `layout` slot no longer receives the `value`, `onChange` and `onSelectShortcut` props — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-layout).
59+
- The component passed to the `toolbar` slot no longer receives the `value`, `onChange` and `isLandscape` props — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-toolbar).
60+
- The component passed to the `shortcuts` slot no longer receives the `onChange`, `isValid` and `isLandscape` props — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-shortcuts).
61+
- The `PickerShortcutChangeImportance` type has been renamed `PickerChangeImportance`[Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#renamed-variables-and-types).
62+
- The component passed to the `layout` slot no longer receives the `rangePosition` and `onRangePositionChange` on range pickers — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-layout).
63+
- The component passed to the `toolbar` slot no longer receives the `rangePosition` and `onRangePositionChange` on range pickers — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-toolbar).
64+
- The component passed to the `tabs` slot no longer receives the `rangePosition` and `onRangePositionChange` on range pickers — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-tabs).
65+
66+
#### `@mui/[email protected]`
67+
68+
- [fields] Handle focusing container with `inputRef.current.focus` on `accessibleFieldDOMStructure` (#15985) @LukasTy
69+
- [pickers] Always use `setValue` internally to update the picker value (#16056) @flaviendelangle
70+
- [pickers] Create a new context to pass the range position props to the layout components and to the views (#15846) @flaviendelangle
71+
- [pickers] Introduce a new concept of `manager` (#15339) @flaviendelangle
72+
- [pickers] Improve React 19 support (#15769) @LukasTy
73+
- [pickers] Memoize `<PickersActionBar />` (#16071) @LukasTy
74+
- [pickers] Remove `NonEmptyDateRange` type (#16035) @flaviendelangle
75+
- [pickers] Rename `AdapterDateFns` into `AdapterDateFnsV2` and `AdapterDateFnsV3` into `AdapterDateFns` (#16082) @LukasTy
76+
- [pickers] Rename `ctx.onViewChange` to `ctx.setView` and add it to the actions context (#16044) @flaviendelangle
77+
- [pickers] Support `date-fns-jalali` v4 (#16011) @LukasTy
78+
- [pickers] Update `closeOnSelect` and `actionBar.actions` default values (#15944) @LukasTy
79+
- [pickers] Use `usePickerContext()` and `usePickerActionsContext()` instead of passing props to the `shortcuts` and `toolbar` slots (#15948) @flaviendelangle
80+
- [l10n] Add Chinese (Taiwan) (zh-TW) locale (#16033) @nusr
81+
- [l10n] Improve Norwegian (nb-NO) locale (#16089) @josteinjhauge
82+
83+
#### `@mui/[email protected]` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
84+
85+
Same changes as in `@mui/[email protected]`.
86+
87+
### Charts
88+
89+
#### Breaking changes
90+
91+
- Removed `DefaultChartsLegend` component, since it is now easier to create custom legends — [Learn more](https://next.mui.com/x/react-charts/components/#html-components).
92+
- The default legend is now an HTML element and can be styled more easily.
93+
- The `width` and `height` properties of the charts now only apply to the `svg` element, and not their wrappers, this might cause some layout shifts.
94+
- `slotProps.legend.direction` now accepts `'horizontal' | 'vertical'` instead of `'row' | 'column'`[Learn more](https://next.mui.com/x/migration/migration-charts-v7/#legend-direction-value-change-✅).
95+
- The `getSeriesToDisplay` function was removed in favor of the `useLegend` hook. — [Learn more](https://next.mui.com/x/migration/migration-charts-v7/#the-getseriestodisplay-function-was-removed).
96+
97+
#### `@mui/[email protected]`
98+
99+
- [charts] New HTML legend & styles (#15733) @JCQuintas
100+
- [charts] Improve React 19 support (#15769) @LukasTy
101+
- [charts] Fix 301 redirection in the API documentation @oliviertassinari
102+
103+
#### `@mui/[email protected]` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
104+
105+
Same changes as in `@mui/[email protected]`.
106+
107+
### Tree View
108+
109+
#### `@mui/[email protected]`
110+
111+
- [TreeView] Improve React 19 support (#15769) @LukasTy
112+
113+
#### `@mui/[email protected]` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
114+
115+
Same changes as in `@mui/[email protected]`.
116+
117+
### Docs
118+
119+
- [docs] Fix `EditingWithDatePickers` demo (#15967) @k-rajat19
120+
- [docs] Fix inconsistent multi input range field separators (#16043) @flaviendelangle
121+
- [docs] Fix non-existing "adapter" property of `LocalizationProvider` (#16084) @tomashauser
122+
- [docs] Refactor Data Grid with Date Pickers example (#15992) @LukasTy
123+
- [docs] Unify the wording of the pickers slots breaking changes (#16036) @flaviendelangle
124+
125+
### Core
126+
127+
- [core] Clarify the release strategy (#16014) @MBilalShafi
128+
- [core] Small fixes on docs @oliviertassinari
129+
- [core] Sync with other repos @oliviertassinari
130+
- [core] Update the `release:version` docs (#16038) @cherniavskii
131+
- [code-infra] Add `testSkipIf` and `describeSkipIf` (#16049) @JCQuintas
132+
- [test] Stabilize flaky Data Grid tests (#16053) @LukasTy
133+
8134
## 8.0.0-alpha.6
9135

10136
_Dec 26, 2024_

babel.config.js

+5-7
Original file line numberDiff line numberDiff line change
@@ -100,25 +100,23 @@ module.exports = function getBabelConfig(api) {
100100

101101
if (process.env.NODE_ENV === 'test') {
102102
plugins.push(['@babel/plugin-transform-export-namespace-from']);
103-
// We replace `date-fns` imports with an aliased `date-fns@v4` version installed as `date-fns-v4` for tests.
104-
// The plugin is patched to only run on `AdapterDateFnsV3.ts`.
105-
// TODO: remove when we upgrade to date-fns v4 by default.
103+
// We replace `date-fns` imports with an aliased `date-fns@v2` version installed as `date-fns-v2` for tests.
106104
plugins.push([
107105
'babel-plugin-replace-imports',
108106
{
109107
test: /date-fns/i,
110-
replacer: 'date-fns-v4',
108+
replacer: 'date-fns-v2',
111109
// This option is provided by the `patches/[email protected]` patch
112-
filenameIncludes: 'src/AdapterDateFnsV3/',
110+
filenameIncludes: 'src/AdapterDateFnsV2/',
113111
},
114112
]);
115113
plugins.push([
116114
'babel-plugin-replace-imports',
117115
{
118116
test: /date-fns-jalali/i,
119-
replacer: 'date-fns-jalali-v4',
117+
replacer: 'date-fns-jalali-v2',
120118
// This option is provided by the `patches/[email protected]` patch
121-
filenameIncludes: 'src/AdapterDateFnsJalaliV3/',
119+
filenameIncludes: 'src/AdapterDateFnsJalaliV2/',
122120
},
123121
'replace-date-fns-jalali-imports',
124122
]);

docs/data/charts/axis/CustomDomainYAxis.js

-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ import TextField from '@mui/material/TextField';
55
import MenuItem from '@mui/material/MenuItem';
66

77
const settings = {
8-
valueFormatter: (value) => `${value}%`,
98
height: 200,
10-
showTooltip: true,
11-
showHighlight: true,
129
series: [{ data: [60, -15, 66, 68, 87, 82, 83, 85, 92, 75, 76, 50, 91] }],
1310
margin: { top: 10, bottom: 20 },
1411
};

docs/data/charts/axis/CustomDomainYAxis.tsx

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
import * as React from 'react';
22
import Box from '@mui/material/Box';
3-
import { BarChart } from '@mui/x-charts/BarChart';
3+
import { BarChart, BarChartProps } from '@mui/x-charts/BarChart';
44
import TextField from '@mui/material/TextField';
55
import MenuItem from '@mui/material/MenuItem';
66

7-
const settings = {
8-
valueFormatter: (value: number | null) => `${value}%`,
7+
const settings: BarChartProps = {
98
height: 200,
10-
showTooltip: true,
11-
showHighlight: true,
129
series: [{ data: [60, -15, 66, 68, 87, 82, 83, 85, 92, 75, 76, 50, 91] }],
1310
margin: { top: 10, bottom: 20 },
1411
};

docs/data/charts/bars/BarGapNoSnap.js

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ export default function BarGapNoSnap() {
3535
<BarChart
3636
dataset={balanceSheet}
3737
series={series}
38-
width={500}
3938
height={300}
4039
margin={{ top: 15 }}
4140
xAxis={[

docs/data/charts/bars/BarsDataset.js

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const chartSetting = {
1111
],
1212
width: 500,
1313
height: 300,
14+
margin: { left: 60 },
1415
sx: {
1516
[`.${axisClasses.left} .${axisClasses.label}`]: {
1617
transform: 'translate(-20px, 0)',

docs/data/charts/bars/BarsDataset.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const chartSetting = {
1111
],
1212
width: 500,
1313
height: 300,
14+
margin: { left: 60 },
1415
sx: {
1516
[`.${axisClasses.left} .${axisClasses.label}`]: {
1617
transform: 'translate(-20px, 0)',

docs/data/charts/bars/BorderRadius.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,8 @@ const chartSettingsH = {
7777
},
7878
slotProps: {
7979
legend: {
80-
direction: 'row',
80+
direction: 'horizontal',
8181
position: { vertical: 'bottom', horizontal: 'middle' },
82-
padding: -5,
8382
},
8483
},
8584
};

docs/data/charts/bars/BorderRadius.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,8 @@ const chartSettingsH: Partial<BarChartProps> = {
7979
},
8080
slotProps: {
8181
legend: {
82-
direction: 'row',
82+
direction: 'horizontal',
8383
position: { vertical: 'bottom', horizontal: 'middle' },
84-
padding: -5,
8584
},
8685
},
8786
};

docs/data/charts/bars/StackBars.js

+8-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,14 @@ export default function StackBars() {
1616
{ dataKey: 'treas', stack: 'equity' },
1717
])}
1818
xAxis={[{ scaleType: 'band', dataKey: 'year' }]}
19-
hideLegend
20-
width={600}
21-
height={350}
19+
{...config}
2220
/>
2321
);
2422
}
23+
24+
const config = {
25+
width: 600,
26+
height: 350,
27+
margin: { left: 70 },
28+
hideLegend: true,
29+
};

docs/data/charts/bars/StackBars.tsx

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from 'react';
2-
import { BarChart } from '@mui/x-charts/BarChart';
2+
import { BarChart, BarChartProps } from '@mui/x-charts/BarChart';
33
import { addLabels, balanceSheet } from './netflixsBalanceSheet';
44

55
export default function StackBars() {
@@ -16,9 +16,14 @@ export default function StackBars() {
1616
{ dataKey: 'treas', stack: 'equity' },
1717
])}
1818
xAxis={[{ scaleType: 'band', dataKey: 'year' }]}
19-
hideLegend
20-
width={600}
21-
height={350}
19+
{...config}
2220
/>
2321
);
2422
}
23+
24+
const config: Partial<BarChartProps> = {
25+
width: 600,
26+
height: 350,
27+
margin: { left: 70 },
28+
hideLegend: true,
29+
};

docs/data/charts/bars/StackBars.tsx.preview

+1-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,5 @@
1010
{ dataKey: 'treas', stack: 'equity' },
1111
])}
1212
xAxis={[{ scaleType: 'band', dataKey: 'year' }]}
13-
hideLegend
14-
width={600}
15-
height={350}
13+
{...config}
1614
/>

docs/data/charts/components/HtmlLegend.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import * as React from 'react';
22
import Box from '@mui/material/Box';
3-
import { unstable_useBarSeries } from '@mui/x-charts/hooks';
3+
import { useLegend } from '@mui/x-charts/hooks';
44
import { ChartDataProvider } from '@mui/x-charts/context';
55
import { ChartsSurface } from '@mui/x-charts/ChartsSurface';
66
import { BarPlot } from '@mui/x-charts/BarChart';
77
import { ChartsXAxis } from '@mui/x-charts/ChartsXAxis';
88
import { ChartsYAxis } from '@mui/x-charts/ChartsYAxis';
99

1010
function MyCustomLegend() {
11-
const s = unstable_useBarSeries();
11+
const { items } = useLegend();
1212
return (
1313
<table
1414
style={{
@@ -17,7 +17,7 @@ function MyCustomLegend() {
1717
}}
1818
>
1919
<tbody>
20-
{Object.values(s?.series ?? []).map((v) => {
20+
{items.map((v) => {
2121
return (
2222
<tr key={v.id}>
2323
<td aria-hidden>

docs/data/charts/components/HtmlLegend.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import * as React from 'react';
22
import Box from '@mui/material/Box';
3-
import { unstable_useBarSeries } from '@mui/x-charts/hooks';
3+
import { useLegend } from '@mui/x-charts/hooks';
44
import { ChartDataProvider } from '@mui/x-charts/context';
55
import { ChartsSurface } from '@mui/x-charts/ChartsSurface';
66
import { BarPlot } from '@mui/x-charts/BarChart';
77
import { ChartsXAxis } from '@mui/x-charts/ChartsXAxis';
88
import { ChartsYAxis } from '@mui/x-charts/ChartsYAxis';
99

1010
function MyCustomLegend() {
11-
const s = unstable_useBarSeries();
11+
const { items } = useLegend();
1212
return (
1313
<table
1414
style={{
@@ -17,7 +17,7 @@ function MyCustomLegend() {
1717
}}
1818
>
1919
<tbody>
20-
{Object.values(s?.series ?? []).map((v) => {
20+
{items.map((v) => {
2121
return (
2222
<tr key={v.id}>
2323
<td aria-hidden>

docs/data/charts/components/components.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,15 @@ With the introduction of the `ChartDataProvider` in v8, the chart data can be ac
8383
This allows you to create HTML components that interact with the charts data.
8484

8585
In the next example, notice that `MyCustomLegend` component displays the series names and colors.
86-
This creates an html `table` element, which handles long series names better than the default legend.
86+
This creates an html `table` element, which can be customized in any way.
8787

8888
{{"demo": "HtmlLegend.js"}}
8989

9090
:::warning
9191
Note that the HTML components are not part of the SVG hierarchy.
9292
Hence, they should be:
9393

94-
- Outside the `<ChartsSurface />` component to avoid mixing HTAM and SVG.
94+
- Outside the `<ChartsSurface />` component to avoid mixing HTML and SVG.
9595
- Inside the `<ChartDataProvider />` component to get access to the data.
9696

9797
:::

0 commit comments

Comments
 (0)