Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
153 changes: 31 additions & 122 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
version: 2.1

orbs:
code-infra: https://raw.githubusercontent.com/mui/mui-public/refs/heads/ci-orb/packages/code-infra/circleci/code-infra.yml

parameters:
browserstack-force:
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.
Expand Down Expand Up @@ -46,12 +49,9 @@ default-job: &default-job
environment:
# expose it globally otherwise we have to thread it from each job to the install command
BROWSERSTACK_FORCE: << pipeline.parameters.browserstack-force >>
REACT_VERSION: << parameters.react-version >>
MATERIAL_UI_VERSION: << parameters.material-ui-version >>
COREPACK_ENABLE_DOWNLOAD_PROMPT: '0'
working_directory: /tmp/mui
docker:
- image: cimg/node:22.18
executor: code-infra/mui-node
# CircleCI has disabled the cache across forks for security reasons.
# Following their official statement, it was a quick solution, they
# are working on providing this feature back with appropriate security measures.
Expand All @@ -66,81 +66,34 @@ default-context: &default-context
- org-global

commands:
install_js:
install-deps:
parameters:
playwright:
description: If playwright should be installed.
type: boolean
default: false
react-version:
description: The version of React to use.
type: string
default: << pipeline.parameters.react-version >>
material-ui-version:
description: The version of material-ui to use.
type: string
default: << pipeline.parameters.material-ui-version >>
browsers:
type: boolean
default: false
steps:
- when:
condition: << parameters.playwright >>
steps:
- run:
name: Install pnpm package manager
command: corepack enable
- when:
condition:
not: << parameters.playwright >>
steps:
- run:
name: Install pnpm package manager
# See https://stackoverflow.com/a/73411601
command: corepack enable --install-directory ~/bin
- run:
name: View install environment
command: |
node --version
pnpm --version

- run:
name: Install js dependencies
command: |
args=""
if [ -n "$REACT_VERSION" ] && [ "$REACT_VERSION" != "stable" ]; then
args="react@$REACT_VERSION"
fi
if [ -n "$MATERIAL_UI_VERSION" ] && [ "$MATERIAL_UI_VERSION" != "stable" ]; then
args="$args @mui/material@$MATERIAL_UI_VERSION"
fi
if [ -n "$args" ]; then
pnpm dlx @mui/internal-code-infra@canary set-version-overrides --pkg $args
else
pnpm install
fi
- code-infra/install-deps:
package-overrides: react@<< parameters.react-version >> @mui/material@<< pipeline.parameters.material-ui-version >>
browsers: << parameters.browsers >>

jobs:
checkout:
<<: *default-job
steps:
- checkout
- install_js
- install-deps
- run:
name: Should not have any git not staged
command: git add -A && git diff --exit-code --staged
- run:
name: '`pnpm dedupe` was run?'
command: |
# #target-branch-reference
if [[ $(git diff --name-status master | grep pnpm-lock) == "" ]];
then
echo "No changes to dependencies detected. Skipping..."
else
pnpm dedupe --check
fi

test_unit:
<<: *default-job
steps:
- checkout
- install_js:
- install-deps:
react-version: << parameters.react-version >>
- run:
name: Test JSDOM
Expand All @@ -159,9 +112,9 @@ jobs:
resource_class: large
steps:
- checkout
- install_js:
playwright: true
- install-deps:
react-version: << parameters.react-version >>
browsers: true
- when:
condition:
not:
Expand All @@ -185,50 +138,22 @@ jobs:
PLAYWRIGHT_SERVER_WS: 'ws://127.0.0.1:9050/mui-browser'
command: |
node ./scripts/playwrightLaunchServer.mjs & pnpm test:unit:browser --coverage
- run:
name: Check coverage generated
command: |
if ! [[ -s coverage/lcov.info ]]
then
exit 1
fi
- run:
name: Coverage
command: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -t ${CODECOV_TOKEN} -Z -F "$REACT_VERSION-browser"
- code-infra/upload-coverage:
key: << parameters.react-version >>-browser
- store_test_results:
path: test-results
test_lint:
<<: *default-job
steps:
- checkout
- install_js
- run:
name: ESLint
command: pnpm eslint:ci
- run:
name: Stylelint
command: pnpm stylelint
- run:
name: Lint Markdown
command: pnpm markdownlint
- install-deps
- code-infra/run-linters
test_static:
<<: *default-job
steps:
- checkout
- install_js
- run:
name: '`pnpm prettier` changes committed?'
command: |
# #target-branch-reference
if [[ $(git diff --name-status master | grep pnpm-lock) == "" ]];
then
pnpm prettier --check
else
pnpm exec prettier --check . --ignore-path .lintignore
fi
- install-deps
- code-infra/check-static-changes
- run:
name: Generate PropTypes
command: pnpm proptypes
Expand Down Expand Up @@ -286,7 +211,7 @@ jobs:
<<: *default-job
steps:
- checkout
- install_js
- install-deps
- run:
name: Transpile TypeScript demos
command: pnpm docs:typescript:formatted --disable-cache
Expand All @@ -304,8 +229,8 @@ jobs:
- image: mcr.microsoft.com/playwright:v1.55.1-noble
steps:
- checkout
- install_js:
playwright: true
- install-deps:
browsers: true
react-version: << parameters.react-version >>
- run:
name: Run e2e tests
Expand All @@ -316,8 +241,8 @@ jobs:
- image: mcr.microsoft.com/playwright:v1.55.1-noble
steps:
- checkout
- install_js:
playwright: true
- install-deps:
browsers: true
- run:
name: pnpm test:e2e-website
command: pnpm test:e2e-website
Expand All @@ -327,36 +252,20 @@ jobs:
<<: *default-job
steps:
- checkout
- install_js:
- install-deps:
react-version: << parameters.react-version >>
- run:
name: prepare danger on PRs
command: pnpm danger ci
environment:
DANGER_COMMAND: prepareBundleSizeReport
- run:
name: Build packages
command: pnpm release:build
- run:
name: create and upload a size snapshot
command: |
export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID_ARTIFACTS
export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY_ARTIFACTS
export AWS_REGION=$AWS_REGION_ARTIFACTS
pnpm size:snapshot
- run:
name: Run danger on PRs
command: pnpm danger ci --fail-on-errors
environment:
DANGER_COMMAND: reportBundleSize
- code-infra/upload-size-snapshot
test_regressions:
<<: *default-job
docker:
- image: mcr.microsoft.com/playwright:v1.55.1-noble
steps:
- checkout
- install_js:
playwright: true
- install-deps:
browsers: true
react-version: << parameters.react-version >>
- run:
name: Install ffmpeg
Expand Down
6 changes: 0 additions & 6 deletions dangerfile.js

This file was deleted.

2 changes: 1 addition & 1 deletion docs/data/charts/tooltip/tooltip.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ To display the series with a blank space, return an empty string.
## Position

By default the tooltip is placed relative to the pointer position.
If the pointer is not available, it is placed relative to the node instead (e.g., the bar in a bar chart).
If the pointer is not available, it is placed relative to the node instead (for example, the bar in a bar chart).

This behavior can be modified with the `anchor`, `position`, and `placement` props.

Expand Down
2 changes: 1 addition & 1 deletion docs/data/data-grid/row-selection/row-selection.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ The model can be either:

To opt out of the `exclude` model and always use `include` model and a predictable behavior with explicit row IDs, pass `disableRowSelectionExcludeModel` prop to the Data Grid.

By default, the Data Grid uses an exclude model optimization when selecting all rows (e.g., via "Select all" checkbox) for better performance with large datasets.
By default, the Data Grid uses an exclude model optimization when selecting all rows (for example, via "Select all" checkbox) for better performance with large datasets.

```tsx
<DataGrid
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@
"chai-dom": "^1.12.1",
"concurrently": "^9.2.1",
"cross-env": "catalog:",
"danger": "^13.0.4",
"date-fns-jalali-v2": "npm:[email protected]",
"date-fns-v2": "npm:[email protected]",
"es-toolkit": "^1.41.0",
Expand Down
Loading
Loading