Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into yarn-to-pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasTy committed Apr 22, 2024
2 parents 34cfe46 + 1f25e1f commit ee4c36d
Show file tree
Hide file tree
Showing 84 changed files with 1,804 additions and 1,230 deletions.
15 changes: 9 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const baseline = require('@mui/monorepo/.eslintrc');
const path = require('path');

// TODO move this helper to @mui/monorepo/.eslintrc
// It needs to know about the parent "no-restricted-imports" to not override them.
const buildPackageRestrictedImports = (packageName, root) => ({
files: [`packages/${root}/src/**/*{.ts,.tsx,.js}`],
excludedFiles: ['*.d.ts', '*.spec.ts', '*.spec.tsx', '**.test.tx', '**.test.tsx'],
Expand Down Expand Up @@ -50,10 +52,12 @@ module.exports = {
*/
rules: {
...baseline.rules,
// TODO move to @mui/monorepo/.eslintrc, codebase is moving away from default exports
'import/prefer-default-export': 'off',
// TODO move rule into the main repo once it has upgraded
'@typescript-eslint/return-await': 'off',
'no-restricted-imports': 'off',
// TODO move to @mui/monorepo/.eslintrc
'jsdoc/require-param': ['error', { contexts: ['TSFunctionType'] }],
'jsdoc/require-param-type': ['error', { contexts: ['TSFunctionType'] }],
'jsdoc/require-param-name': ['error', { contexts: ['TSFunctionType'] }],
Expand All @@ -75,7 +79,10 @@ module.exports = {
],
// Fixes false positive when using both `inputProps` and `InputProps` on the same example
// See https://stackoverflow.com/questions/42367236/why-am-i-getting-this-warning-no-duplicate-props-allowed-react-jsx-no-duplicate
// TODO move to @mui/monorepo/.eslintrc
// TODO Fix <Input> props names to not conflict
'react/jsx-no-duplicate-props': [1, { ignoreCase: false }],
// TOOD move to @mui/monorepo/.eslintrc, these are false positive
'react/no-unstable-nested-components': ['error', { allowAsProps: true }],
},
overrides: [
Expand Down Expand Up @@ -114,19 +121,15 @@ module.exports = {
},
parserOptions: { tsconfigRootDir: __dirname, project: ['./tsconfig.json'] },
},
// TODO remove, shouldn't disable prop-type generation rule.
// lot of public components are missing it.
{
files: ['*.tsx'],
excludedFiles: '*.spec.tsx',
rules: {
'react/prop-types': 'off',
},
},
{
files: ['docs/data/**/*.js', 'docs/data/**/*.tsx'],
rules: {
'filenames/match-exported': ['error'],
},
},
{
files: ['**/*.mjs'],
rules: {
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/discord-release-announcement.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Discord Release Announcement

on:
release:
types: [prereleased, published]

permissions: {}

jobs:
delimiter-test:
runs-on: ubuntu-latest
name: Send message to discord
steps:
- name: parse and send message
uses: michelengelen/discord-message-action@02af30a15955ecf718049bc33b0efabf6f626e0b
with:
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
username: MUI Releases
avatar-url: 'https://raw.githubusercontent.com/mui/material-ui/master/docs/public/static/logo.png'
separator: '<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->'
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ Same changes as in `@mui/[email protected]`, plus:
- [docs] Fix type arguments in Custom Field page (#12619) @Juneezee
- [docs] Fix typo in `getItemId` prop description (#12637) @flaviendelangle
- [docs] Make the Charts `margin` usage more visible (#12591) @alexfauquette
- [docs] Match IE 11 spacing with Material UI @oliviertassinari
- [docs] Match IE 11 spacing with Material UI @oliviertassinari
- [docs] Move data grid interfaces to standard API page layout (#12016) @alexfauquette
- [docs] Remove ` around @default values (#12158) @alexfauquette
- [docs] Remove `day` from the default `dayOfWeekFormatter` function params (#12644) @LukasTy
Expand Down Expand Up @@ -506,7 +506,7 @@ Same changes as in `@mui/[email protected]`, plus:
- [docs] Update links to v6 (#12496) @cherniavskii
- [docs] Update links to v7 docs (#12500) @noraleonte
- [docs] Update supported versions (#12508) @joserodolfofreitas
- [docs] Update "What's new in MUI X" page #12527 @cherniavskii
- [docs] Update "What's new in MUI X" page #12527 @cherniavskii

### Core

Expand Down
34 changes: 19 additions & 15 deletions docs/data/charts/bars/ColorScaleNoSnap.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,55 +112,59 @@ export default function ColorScaleNoSnap() {
...(colorX === 'None' ? [' xAxis={[{}]}'] : []),
...(colorX === 'ordinal'
? [
' xAxis={[',
` {`,
' xAxis={[{',
` colorMap: {`,
` type: 'ordinal',`,
` colors: ['#ccebc5', '#a8ddb5', '#7bccc4', '#4eb3d3', '#2b8cbe', '#08589e']`,
` }`,
' ]}',
' }]}',
]
: []),
...(colorX === 'continuous'
? [
' xAxis={[',
` {`,
' xAxis={[{',
` colorMap: {`,
` type: 'continuous',`,
` min: new Date(2019, 1, 1),`,
` max: new Date(2024, 1, 1),`,
` color: ['green', 'orange']`,
` }`,
' ]}',
' }]}',
]
: []),
...(colorX === 'piecewise'
? [
' xAxis={[{',
` type: 'piecewise',`,
` thresholds: [new Date(2021, 1, 1), new Date(2023, 1, 1)],`,
` colors: ['blue', 'red', 'blue'],`,
` colorMap: {`,
` type: 'piecewise',`,
` thresholds: [new Date(2021, 1, 1), new Date(2023, 1, 1)],`,
` colors: ['blue', 'red', 'blue'],`,
` }`,
' }]}',
]
: []),
// ColorY
...(colorY === 'None' ? [' yAxis={[{}]}'] : []),
...(colorY === 'continuous'
? [
' yAxis={[',
` {`,
' yAxis={[{',
` colorMap: {`,
` type: 'continuous',`,
` min: -10,`,
` max: 10,`,
` color: ['red', 'green'],`,
` }`,
' ]}',
' }]}',
]
: []),
...(colorY === 'piecewise'
? [
' yAxis={[{',
` type: 'piecewise',`,
` thresholds: [0],`,
` colors: ['red', 'green'],`,
` colorMap: {`,
` type: 'piecewise',`,
` thresholds: [0],`,
` colors: ['red', 'green'],`,
` }`,
' }]}',
]
: []),
Expand Down
36 changes: 19 additions & 17 deletions docs/data/charts/bars/ColorScaleNoSnap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,32 +122,34 @@ export default function ColorScaleNoSnap() {
...(colorX === 'None' ? [' xAxis={[{}]}'] : []),
...(colorX === 'ordinal'
? [
' xAxis={[',
` {`,
' xAxis={[{',
` colorMap: {`,
` type: 'ordinal',`,
` colors: ['#ccebc5', '#a8ddb5', '#7bccc4', '#4eb3d3', '#2b8cbe', '#08589e']`,
` }`,
' ]}',
' }]}',
]
: []),
...(colorX === 'continuous'
? [
' xAxis={[',
` {`,
' xAxis={[{',
` colorMap: {`,
` type: 'continuous',`,
` min: new Date(2019, 1, 1),`,
` max: new Date(2024, 1, 1),`,
` color: ['green', 'orange']`,
` }`,
' ]}',
' }]}',
]
: []),
...(colorX === 'piecewise'
? [
' xAxis={[{',
` type: 'piecewise',`,
` thresholds: [new Date(2021, 1, 1), new Date(2023, 1, 1)],`,
` colors: ['blue', 'red', 'blue'],`,
` colorMap: {`,
` type: 'piecewise',`,
` thresholds: [new Date(2021, 1, 1), new Date(2023, 1, 1)],`,
` colors: ['blue', 'red', 'blue'],`,
` }`,
' }]}',
]
: []),
Expand All @@ -156,24 +158,24 @@ export default function ColorScaleNoSnap() {
...(colorY === 'None' ? [' yAxis={[{}]}'] : []),
...(colorY === 'continuous'
? [
' yAxis={[',
` {`,

' yAxis={[{',
` colorMap: {`,
` type: 'continuous',`,
` min: -10,`,
` max: 10,`,
` color: ['red', 'green'],`,
` }`,
' ]}',
' }]}',
]
: []),
...(colorY === 'piecewise'
? [
' yAxis={[{',
` type: 'piecewise',`,
` thresholds: [0],`,
` colors: ['red', 'green'],`,

` colorMap: {`,
` type: 'piecewise',`,
` thresholds: [0],`,
` colors: ['red', 'green'],`,
` }`,
' }]}',
]
: []),
Expand Down
28 changes: 16 additions & 12 deletions docs/data/charts/lines/ColorScaleNoSnap.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,45 +103,49 @@ export default function ColorScaleNoSnap() {
...(colorX === 'None' ? [' xAxis={[{}]}'] : []),
...(colorX === 'continuous'
? [
' xAxis={[',
` {`,
' xAxis={[{',
` colorMap: {`,
` type: 'continuous',`,
` min: new Date(2019, 1, 1),`,
` max: new Date(2024, 1, 1),`,
` color: ['green', 'orange']`,
` }`,
' ]}',
' }]}',
]
: []),
...(colorX === 'piecewise'
? [
' xAxis={[{',
` type: 'piecewise',`,
` thresholds: [new Date(2021, 1, 1), new Date(2023, 1, 1)],`,
` colors: ['blue', 'red', 'blue'],`,
` colorMap: {`,
` type: 'piecewise',`,
` thresholds: [new Date(2021, 1, 1), new Date(2023, 1, 1)],`,
` colors: ['blue', 'red', 'blue'],`,
` }`,
' }]}',
]
: []),
// ColorY
...(colorY === 'None' ? [' yAxis={[{}]}'] : []),
...(colorY === 'continuous'
? [
' yAxis={[',
` {`,
' yAxis={[{',
` colorMap: {`,
` type: 'continuous',`,
` min: -10,`,
` max: 10,`,
` color: ['red', 'green'],`,
` }`,
' ]}',
' }]}',
]
: []),
...(colorY === 'piecewise'
? [
' yAxis={[{',
` type: 'piecewise',`,
` thresholds: [0, 10],`,
` colors: ['red', 'green', 'blue'],`,
` colorMap: {`,
` type: 'piecewise',`,
` thresholds: [0, 10],`,
` colors: ['red', 'green', 'blue'],`,
` }`,
' }]}',
]
: []),
Expand Down
29 changes: 16 additions & 13 deletions docs/data/charts/lines/ColorScaleNoSnap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,22 +111,24 @@ export default function ColorScaleNoSnap() {
...(colorX === 'None' ? [' xAxis={[{}]}'] : []),
...(colorX === 'continuous'
? [
' xAxis={[',
` {`,
' xAxis={[{',
` colorMap: {`,
` type: 'continuous',`,
` min: new Date(2019, 1, 1),`,
` max: new Date(2024, 1, 1),`,
` color: ['green', 'orange']`,
` }`,
' ]}',
' }]}',
]
: []),
...(colorX === 'piecewise'
? [
' xAxis={[{',
` type: 'piecewise',`,
` thresholds: [new Date(2021, 1, 1), new Date(2023, 1, 1)],`,
` colors: ['blue', 'red', 'blue'],`,
` colorMap: {`,
` type: 'piecewise',`,
` thresholds: [new Date(2021, 1, 1), new Date(2023, 1, 1)],`,
` colors: ['blue', 'red', 'blue'],`,
` }`,
' }]}',
]
: []),
Expand All @@ -135,23 +137,24 @@ export default function ColorScaleNoSnap() {
...(colorY === 'None' ? [' yAxis={[{}]}'] : []),
...(colorY === 'continuous'
? [
' yAxis={[',
` {`,
' yAxis={[{',
` colorMap: {`,
` type: 'continuous',`,
` min: -10,`,
` max: 10,`,
` color: ['red', 'green'],`,
` }`,
' ]}',
' }]}',
]
: []),
...(colorY === 'piecewise'
? [
' yAxis={[{',
` type: 'piecewise',`,
` thresholds: [0, 10],`,
` colors: ['red', 'green', 'blue'],`,

` colorMap: {`,
` type: 'piecewise',`,
` thresholds: [0, 10],`,
` colors: ['red', 'green', 'blue'],`,
` }`,
' }]}',
]
: []),
Expand Down
Loading

0 comments on commit ee4c36d

Please sign in to comment.