Skip to content

Commit

Permalink
Merge branch 'mui:master' into fix-no-results-overlay-dark-demo
Browse files Browse the repository at this point in the history
  • Loading branch information
KenanYusuf authored Jul 3, 2024
2 parents 5348cd4 + 13403cd commit a5f4b62
Show file tree
Hide file tree
Showing 208 changed files with 3,298 additions and 1,226 deletions.
61 changes: 53 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ parameters:
description: Whether to force browserstack usage. We have limited resources on browserstack so the pipeline might decide to skip browserstack if this parameter isn't set to true.
type: boolean
default: false
react-dist-tag:
description: The dist-tag of react to be used
react-version:
description: The version of react to be used
type: string
default: stable
workflow:
Expand All @@ -20,10 +20,10 @@ parameters:

default-job: &default-job
parameters:
react-dist-tag:
description: The dist-tag of react to be used
react-version:
description: The version of react to be used
type: string
default: << pipeline.parameters.react-dist-tag >>
default: << pipeline.parameters.react-version >>
e2e-base-url:
description: The base url for running end-to-end test
type: string
Expand All @@ -33,7 +33,7 @@ default-job: &default-job
PLAYWRIGHT_BROWSERS_PATH: /tmp/pw-browsers
# expose it globally otherwise we have to thread it from each job to the install command
BROWSERSTACK_FORCE: << pipeline.parameters.browserstack-force >>
REACT_DIST_TAG: << parameters.react-dist-tag >>
REACT_VERSION: << parameters.react-version >>
working_directory: /tmp/mui
docker:
- image: cimg/node:18.20
Expand All @@ -59,6 +59,13 @@ commands:
description: 'Set to true if you intend to any browser (for example with playwright).'

steps:
- run:
name: Resolve React version
command: |
node scripts/useReactVersion.mjs
# log a patch for maintainers who want to check out this change
git --no-pager diff HEAD
- when:
condition: << parameters.browsers >>
steps:
Expand Down Expand Up @@ -90,7 +97,17 @@ commands:
pnpm --version
- run:
name: Install js dependencies
command: pnpm install
command: |
echo "React version $REACT_VERSION"
if [ $REACT_VERSION == "stable" ];
then
echo "pnpm install"
pnpm install
else
echo "pnpm install --no-frozen-lockfile"
pnpm install --no-frozen-lockfile
fi
- when:
condition: << parameters.browsers >>
steps:
Expand Down Expand Up @@ -146,7 +163,7 @@ jobs:
command: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -t ${CODECOV_TOKEN} -Z -F "$REACT_DIST_TAG-jsdom"
./codecov -t ${CODECOV_TOKEN} -Z -F "$REACT_VERSION-jsdom"
test_lint:
<<: *default-job
steps:
Expand Down Expand Up @@ -330,3 +347,31 @@ workflows:
- test_e2e_website:
requires:
- checkout

react-next:
when:
equal: [react-next, << pipeline.parameters.workflow >>]
# triggers:
# - schedule:
# cron: '0 0 * * *'
# filters:
# branches:
# only:
# - master
jobs:
- test_unit:
<<: *default-context
react-version: next
name: test_unit-react@next
- test_browser:
<<: *default-context
react-version: next
name: test_browser-react@next
- test_regressions:
<<: *default-context
react-version: next
name: test_regressions-react@next
- test_e2e:
<<: *default-context
react-version: next
name: test_e2e-react@next
6 changes: 4 additions & 2 deletions .codesandbox/ci.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"packages/x-date-pickers",
"packages/x-date-pickers-pro",
"packages/x-charts",
"packages/x-tree-view"
"packages/x-tree-view",
"packages/x-internals"
],
"publishDirectory": {
"@mui/x-license": "packages/x-license/build",
Expand All @@ -24,7 +25,8 @@
"@mui/x-charts": "packages/x-charts/build",
"@mui/x-charts-pro": "packages/x-charts-pro/build",
"@mui/x-tree-view": "packages/x-tree-view/build",
"@mui/x-tree-view-pro": "packages/x-tree-view-pro/build"
"@mui/x-tree-view-pro": "packages/x-tree-view-pro/build",
"@mui/x-internals": "packages/x-internals/build"
},
"sandboxes": ["/bug-reproductions/x-data-grid"],
"silent": true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@23acc5c183826b7a8a97bce3cecc52db901f8251 # v3.25.10
uses: github/codeql-action/init@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
with:
languages: typescript
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -29,4 +29,4 @@ jobs:
# 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
# queries: security-extended,security-and-quality
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@23acc5c183826b7a8a97bce3cecc52db901f8251 # v3.25.10
uses: github/codeql-action/analyze@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
2 changes: 1 addition & 1 deletion .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: Upload to code-scanning
uses: github/codeql-action/upload-sarif@23acc5c183826b7a8a97bce3cecc52db901f8251 # v3.25.10
uses: github/codeql-action/upload-sarif@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
with:
sarif_file: results.sarif
1 change: 1 addition & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const defaultAlias = {
'@mui/x-charts-pro': resolveAliasPath('./packages/x-charts-pro/src'),
'@mui/x-tree-view': resolveAliasPath('./packages/x-tree-view/src'),
'@mui/x-tree-view-pro': resolveAliasPath('./packages/x-tree-view-pro/src'),
'@mui/x-internals': resolveAliasPath('./packages/x-internals/src'),
'@mui/material-nextjs': '@mui/monorepo/packages/mui-material-nextjs/src',
'@mui-internal/api-docs-builder': resolveAliasPath(
'./node_modules/@mui/monorepo/packages/api-docs-builder',
Expand Down
1 change: 0 additions & 1 deletion docs/.link-check-errors.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
Broken links found by `docs:link-check` that exist:

- https://mui.com/x/react-charts/heat-map/
8 changes: 0 additions & 8 deletions docs/data/charts-component-api-pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ const apiPages: MuiPage[] = [
pathname: '/x/api/charts/charts-axis-highlight',
title: 'ChartsAxisHighlight',
},
{
pathname: '/x/api/charts/charts-axis-tooltip-content',
title: 'ChartsAxisTooltipContent',
},
{
pathname: '/x/api/charts/charts-clip-path',
title: 'ChartsClipPath',
Expand All @@ -57,10 +53,6 @@ const apiPages: MuiPage[] = [
pathname: '/x/api/charts/charts-grid',
title: 'ChartsGrid',
},
{
pathname: '/x/api/charts/charts-item-tooltip-content',
title: 'ChartsItemTooltipContent',
},
{
pathname: '/x/api/charts/charts-legend',
title: 'ChartsLegend',
Expand Down
19 changes: 19 additions & 0 deletions docs/data/charts/heatmap/BasicHeatmap.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import * as React from 'react';
import Box from '@mui/material/Box';
import '@mui/x-charts-pro/typeOverloads';
import { UnstableHeatmap } from '@mui/x-charts-pro/Heatmap';
import { data } from './dumbData';

export default function BasicHeatmap() {
return (
<Box sx={{ width: '100%', maxWidth: 400 }}>
<UnstableHeatmap
xAxis={[{ data: [1, 2, 3, 4] }]}
yAxis={[{ data: ['A', 'B', 'C', 'D', 'E'] }]}
series={[{ data }]}
margin={{ top: 5, right: 5, left: 20 }}
height={300}
/>
</Box>
);
}
19 changes: 19 additions & 0 deletions docs/data/charts/heatmap/BasicHeatmap.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import * as React from 'react';
import Box from '@mui/material/Box';
import '@mui/x-charts-pro/typeOverloads';
import { UnstableHeatmap } from '@mui/x-charts-pro/Heatmap';
import { data } from './dumbData';

export default function BasicHeatmap() {
return (
<Box sx={{ width: '100%', maxWidth: 400 }}>
<UnstableHeatmap
xAxis={[{ data: [1, 2, 3, 4] }]}
yAxis={[{ data: ['A', 'B', 'C', 'D', 'E'] }]}
series={[{ data }]}
margin={{ top: 5, right: 5, left: 20 }}
height={300}
/>
</Box>
);
}
7 changes: 7 additions & 0 deletions docs/data/charts/heatmap/BasicHeatmap.tsx.preview
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<UnstableHeatmap
xAxis={[{ data: [1, 2, 3, 4] }]}
yAxis={[{ data: ['A', 'B', 'C', 'D', 'E'] }]}
series={[{ data }]}
margin={{ top: 5, right: 5, left: 20 }}
height={300}
/>
123 changes: 123 additions & 0 deletions docs/data/charts/heatmap/ColorConfig.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
import * as React from 'react';
import { interpolateBlues } from 'd3-scale-chromatic';
import '@mui/x-charts-pro/typeOverloads';
import { UnstableHeatmap } from '@mui/x-charts-pro/Heatmap';

const dataset = [
{
london: 59,
paris: 57,
newYork: 86,
seoul: 21,
month: 'January',
},
{
london: 50,
paris: 52,
newYork: 78,
seoul: 28,
month: 'February',
},
{
london: 47,
paris: 53,
newYork: 106,
seoul: 41,
month: 'March',
},
{
london: 54,
paris: 56,
newYork: 92,
seoul: 73,
month: 'April',
},
{
london: 57,
paris: 69,
newYork: 92,
seoul: 99,
month: 'May',
},
{
london: 60,
paris: 63,
newYork: 103,
seoul: 144,
month: 'June',
},
{
london: 59,
paris: 60,
newYork: 105,
seoul: 319,
month: 'July',
},
{
london: 65,
paris: 60,
newYork: 106,
seoul: 249,
month: 'August',
},
{
london: 51,
paris: 51,
newYork: 95,
seoul: 131,
month: 'September',
},
{
london: 60,
paris: 65,
newYork: 97,
seoul: 55,
month: 'October',
},
{
london: 67,
paris: 64,
newYork: 76,
seoul: 48,
month: 'November',
},
{
london: 61,
paris: 70,
newYork: 103,
seoul: 25,
month: 'December',
},
];

const data = dataset.flatMap(({ london, paris, newYork, seoul }, monthIndex) => [
[0, monthIndex, london],
[1, monthIndex, paris],
[2, monthIndex, newYork],
[3, monthIndex, seoul],
]);

const xData = ['London', 'Paris', 'NewYork', 'Seoul'];
const yData = dataset.flatMap(({ month }) => month);

export default function ColorConfig() {
return (
<UnstableHeatmap
height={400}
width={600}
xAxis={[{ data: xData }]}
yAxis={[{ data: yData }]}
series={[{ data }]}
zAxis={[
{
min: 20,
max: 300,
colorMap: {
type: 'continuous',
color: interpolateBlues,
},
},
]}
/>
);
}
Loading

0 comments on commit a5f4b62

Please sign in to comment.