diff --git a/.github/styles/Blog/ComposedWords.yml b/.github/styles/Blog/ComposedWords.yml index 149dc0bd6ab30..1d931388bee34 100644 --- a/.github/styles/Blog/ComposedWords.yml +++ b/.github/styles/Blog/ComposedWords.yml @@ -11,3 +11,5 @@ swap: 'sub components': subcomponents 'use-case': 'use case' 'usecase': 'use case' + "can't": 'cannot' + 'can not': 'cannot' diff --git a/changelogOld/CHANGELOG.v5.md b/changelogOld/CHANGELOG.v5.md index 90e58e28abf42..dc300290b139f 100644 --- a/changelogOld/CHANGELOG.v5.md +++ b/changelogOld/CHANGELOG.v5.md @@ -2386,7 +2386,7 @@ A big thanks to the 9 contributors who made this release possible. Here are some - [DataGrid] Close other actions menus when opening a new one (#3492) @m4theushw - [DataGrid] Deprecate `getValue` param from the cell and row params (#3369) @flaviendelangle - [DataGrid] Fix value parsing in date input (#3307) @alexfauquette -- [DataGrid] Fix can't enter 0 on numeric column (#3491) @m4theushw +- [DataGrid] Fix cannot enter 0 on numeric column (#3491) @m4theushw - [DataGrid] Fix scrolling bug when an action is focused (#3483) @alexfauquette - [DataGrid] Remove `line-height` from `GridCell` (#3446) @DanailH - [DataGridPro] Block edition for auto-generated rows (#3547) @flaviendelangle diff --git a/docs/data/data-grid/column-pinning/column-pinning.md b/docs/data/data-grid/column-pinning/column-pinning.md index ed27f0ae3c1b1..462a666c6a832 100644 --- a/docs/data/data-grid/column-pinning/column-pinning.md +++ b/docs/data/data-grid/column-pinning/column-pinning.md @@ -73,7 +73,7 @@ To disable the pinning of a single column, set the `pinnable` property in `GridC ### Pin non-pinnable columns programmatically -It may be desirable to allow one or more columns to be pinned or unpinned programmatically that can not be pinned or unpinned on the UI (i.e. columns for which prop `disableColumnPinning = true` or `colDef.pinnable = false`). +It may be desirable to allow one or more columns to be pinned or unpinned programmatically that cannot be pinned or unpinned on the UI (i.e. columns for which prop `disableColumnPinning = true` or `colDef.pinnable = false`). This can be done in one of the following ways. - (A) Initializing the pinned columns diff --git a/docs/data/data-grid/editing/AskConfirmationBeforeSave.js b/docs/data/data-grid/editing/AskConfirmationBeforeSave.js index 0ef962fe2744e..82806abcca1c9 100644 --- a/docs/data/data-grid/editing/AskConfirmationBeforeSave.js +++ b/docs/data/data-grid/editing/AskConfirmationBeforeSave.js @@ -78,7 +78,7 @@ export default function AskConfirmationBeforeSave() { resolve(response); setPromiseArguments(null); } catch (error) { - setSnackbar({ children: "Name can't be empty", severity: 'error' }); + setSnackbar({ children: 'Name cannot be empty', severity: 'error' }); reject(oldRow); setPromiseArguments(null); } diff --git a/docs/data/data-grid/editing/AskConfirmationBeforeSave.tsx b/docs/data/data-grid/editing/AskConfirmationBeforeSave.tsx index 669db71ae1afd..618f7fc071789 100644 --- a/docs/data/data-grid/editing/AskConfirmationBeforeSave.tsx +++ b/docs/data/data-grid/editing/AskConfirmationBeforeSave.tsx @@ -95,7 +95,7 @@ export default function AskConfirmationBeforeSave() { resolve(response); setPromiseArguments(null); } catch (error) { - setSnackbar({ children: "Name can't be empty", severity: 'error' }); + setSnackbar({ children: 'Name cannot be empty', severity: 'error' }); reject(oldRow); setPromiseArguments(null); } diff --git a/docs/data/data-grid/editing/ServerSidePersistence.js b/docs/data/data-grid/editing/ServerSidePersistence.js index 55490d8b23a71..5bd968a078d3c 100644 --- a/docs/data/data-grid/editing/ServerSidePersistence.js +++ b/docs/data/data-grid/editing/ServerSidePersistence.js @@ -14,7 +14,7 @@ const useFakeMutation = () => { new Promise((resolve, reject) => { setTimeout(() => { if (user.name?.trim() === '') { - reject(new Error("Error while saving user: name can't be empty.")); + reject(new Error('Error while saving user: name cannot be empty.')); } else { resolve({ ...user, name: user.name?.toUpperCase() }); } diff --git a/docs/data/data-grid/editing/ServerSidePersistence.tsx b/docs/data/data-grid/editing/ServerSidePersistence.tsx index fe16dc37194ab..22be81606f615 100644 --- a/docs/data/data-grid/editing/ServerSidePersistence.tsx +++ b/docs/data/data-grid/editing/ServerSidePersistence.tsx @@ -28,7 +28,7 @@ const useFakeMutation = () => { new Promise>((resolve, reject) => { setTimeout(() => { if (user.name?.trim() === '') { - reject(new Error("Error while saving user: name can't be empty.")); + reject(new Error('Error while saving user: name cannot be empty.')); } else { resolve({ ...user, name: user.name?.toUpperCase() }); } diff --git a/docs/data/data-grid/filtering/QuickFilteringCustomLogic.js b/docs/data/data-grid/filtering/QuickFilteringCustomLogic.js index 168fd37a2b203..69003cef4005e 100644 --- a/docs/data/data-grid/filtering/QuickFilteringCustomLogic.js +++ b/docs/data/data-grid/filtering/QuickFilteringCustomLogic.js @@ -20,7 +20,7 @@ const VISIBLE_FIELDS = ['name', 'rating', 'country', 'dateCreated', 'isAdmin']; const getApplyQuickFilterFnSameYear = (value) => { if (!value || value.length !== 4 || !/\d{4}/.test(value)) { - // If the value is not a 4 digit string, it can not be a year so applying this filter is useless + // If the value is not a 4-digit string, it cannot be a year so applying this filter is useless return null; } return (cellValue) => { diff --git a/docs/data/data-grid/filtering/QuickFilteringCustomLogic.tsx b/docs/data/data-grid/filtering/QuickFilteringCustomLogic.tsx index 930e29b1c161c..5baf7a7ab05d1 100644 --- a/docs/data/data-grid/filtering/QuickFilteringCustomLogic.tsx +++ b/docs/data/data-grid/filtering/QuickFilteringCustomLogic.tsx @@ -26,7 +26,7 @@ const getApplyQuickFilterFnSameYear: GetApplyQuickFilterFn = ( value, ) => { if (!value || value.length !== 4 || !/\d{4}/.test(value)) { - // If the value is not a 4 digit string, it can not be a year so applying this filter is useless + // If the value is not a 4-digit string, it cannot be a year so applying this filter is useless return null; } return (cellValue) => { diff --git a/docs/data/data-grid/filtering/index.md b/docs/data/data-grid/filtering/index.md index 5fbdc9077dca7..c0787c6afdfae 100644 --- a/docs/data/data-grid/filtering/index.md +++ b/docs/data/data-grid/filtering/index.md @@ -119,7 +119,7 @@ Filters are enabled by default, but you can easily disable this feature by setti To disable the filter of a single column, set the `filterable` property in `GridColDef` to `false`. -In the example below, the _rating_ column can not be filtered. +In the example below, the _rating_ column cannot be filtered. ```js diff --git a/docs/data/data-grid/filtering/quick-filter.md b/docs/data/data-grid/filtering/quick-filter.md index 280cd5a3e32db..fb43ebab0de8a 100644 --- a/docs/data/data-grid/filtering/quick-filter.md +++ b/docs/data/data-grid/filtering/quick-filter.md @@ -82,7 +82,7 @@ In the example below, a custom filter is created for the `date` column to check ```ts const getApplyQuickFilterFn: GetApplyQuickFilterFn = (value) => { if (!value || value.length !== 4 || !/\d{4}/.test(value)) { - // If the value is not a 4 digit string, it can not be a year so applying this filter is useless + // If the value is not a 4 digit string, it cannot be a year so applying this filter is useless return null; } return (cellValue) => { diff --git a/docs/data/data-grid/pagination/pagination.md b/docs/data/data-grid/pagination/pagination.md index 397fdf04ce411..eebea559626f3 100644 --- a/docs/data/data-grid/pagination/pagination.md +++ b/docs/data/data-grid/pagination/pagination.md @@ -33,7 +33,7 @@ You should provide an array of items, each item should be one of these types: Use the `autoPageSize` prop to auto-scale the `pageSize` to match the container height and the max number of rows that can be displayed without a vertical scroll bar. :::warning -You can't use both the `autoPageSize` and `autoHeight` props at the same time because `autoHeight` scales the height of the Data Grid according to the `pageSize`. +You cannot use both the `autoPageSize` and `autoHeight` props at the same time because `autoHeight` scales the height of the Data Grid according to the `pageSize`. ::: {{"demo": "PageSizeAuto.js", "bg": "inline"}} @@ -42,7 +42,7 @@ You can't use both the `autoPageSize` and `autoHeight` props at the same time be The default pagination behavior depends on your plan. -- On the `DataGrid`, pagination is enabled by default and can't be disabled. +- On the `DataGrid`, pagination is enabled by default and cannot be disabled. - On the `DataGridPro` and `DataGridPremium`, pagination is disabled by default; use the `pagination` prop to enable it. The following example activates pagination on a `DataGridPremium` component. diff --git a/docs/data/data-grid/row-grouping/row-grouping.md b/docs/data/data-grid/row-grouping/row-grouping.md index 2935b2ad9861b..a8a5c8ae0b23a 100644 --- a/docs/data/data-grid/row-grouping/row-grouping.md +++ b/docs/data/data-grid/row-grouping/row-grouping.md @@ -187,7 +187,7 @@ It will disable all the features related to the row grouping, even if a model is ### For some columns In case you need to disable grouping on specific column(s), set the `groupable` property on the respective column definition (`GridColDef`) to `false`. -In the example below, the `director` column can not be grouped. And in all example, the `title` and `gross` columns can not be grouped. +In the example below, the `director` column cannot be grouped. In all examples, the `title` and `gross` columns cannot be grouped. {{"demo": "RowGroupingColDefCanBeGrouped.js", "bg": "inline", "defaultCodeOpen": false}} diff --git a/docs/data/date-pickers/adapters-locale/adapters-locale.md b/docs/data/date-pickers/adapters-locale/adapters-locale.md index 5bb45bacae465..8d08042c202ba 100644 --- a/docs/data/date-pickers/adapters-locale/adapters-locale.md +++ b/docs/data/date-pickers/adapters-locale/adapters-locale.md @@ -43,7 +43,7 @@ For `date-fns`, import the locale and pass it to `LocalizationProvider`: :::info Both `date-fns` major versions (v2.x and v3.x) are supported. -A single adapter can not work for both `date-fns` v2.x and v3.x, because the way functions are exported has been changed in v3.x. +A single adapter cannot work for both `date-fns` v2.x and v3.x, because the way functions are exported has been changed in v3.x. To use `date-fns` v3.x, you will have to import the adapter from `@mui/x-date-pickers/AdapterDateFnsV3` instead of `@mui/x-date-pickers/AdapterDateFns`. ::: diff --git a/docs/data/date-pickers/validation/validation.md b/docs/data/date-pickers/validation/validation.md index 4dbbe7f5467cd..427ae2bfa1df1 100644 --- a/docs/data/date-pickers/validation/validation.md +++ b/docs/data/date-pickers/validation/validation.md @@ -118,7 +118,7 @@ Please note that `shouldDisableDate` will execute on every date rendered in the For components supporting date range edition (`DateRangePicker`, `DateTimeRangePicker`)—the `shouldDisableDate` prop receives a second argument to differentiate the start and the end date. -In the example below—the start date can't be in the weekend but the end date can. +In the example below—the start date cannot be in the weekend but the end date can. {{"demo": "DateRangeValidationShouldDisableDate.js", "defaultCodeOpen": false}} diff --git a/docs/data/introduction/support/support.md b/docs/data/introduction/support/support.md index 9112bccbaafdb..16eb909b0f2be 100644 --- a/docs/data/introduction/support/support.md +++ b/docs/data/introduction/support/support.md @@ -58,7 +58,7 @@ You can search through existing questions and answers to see if someone has aske - mui-x-date-picker - mui-x-charts -If you can't find your answer, [ask a new question](https://stackoverflow.com/questions/ask?tags=reactjs%20mui-x) using the relevant tags. +If you cannot find your answer, [ask a new question](https://stackoverflow.com/questions/ask?tags=reactjs%20mui-x) using the relevant tags. ## Technical support diff --git a/docs/data/migration/migration-pickers-v5/migration-pickers-v5.md b/docs/data/migration/migration-pickers-v5/migration-pickers-v5.md index 969f2b58acb91..67cdb7dab1d1c 100644 --- a/docs/data/migration/migration-pickers-v5/migration-pickers-v5.md +++ b/docs/data/migration/migration-pickers-v5/migration-pickers-v5.md @@ -268,7 +268,7 @@ The codemod will take care of renaming the prop to keep the existing functionali In v5, it was possible to import adapters either from either `@date-io` or `@mui/x-date-pickers` which were the same. In v6, the adapters are extended by `@mui/x-date-pickers` to support [fields components](/x/react-date-pickers/fields/). -Which means adapters can not be imported from `@date-io` anymore. They need to be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`. +Which means adapters cannot be imported from `@date-io` anymore. They need to be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`. Otherwise, some methods will be missing. If you do not find the adapter you were using—there probably was a reason for it, but you can raise an issue expressing interest in it. diff --git a/docs/data/tree-view/rich-tree-view/items/items.md b/docs/data/tree-view/rich-tree-view/items/items.md index cb23941ca7ff7..e85d35328c698 100644 --- a/docs/data/tree-view/rich-tree-view/items/items.md +++ b/docs/data/tree-view/rich-tree-view/items/items.md @@ -95,7 +95,7 @@ It could be achieved by either defining the prop outside the component scope or ::: :::warning -Unlike the `SimpleTreeView` component, the `RichTreeView` component only supports string labels, you can't pass React nodes to it. +Unlike the `SimpleTreeView` component, the `RichTreeView` component only supports string labels, you cannot pass React nodes to it. ::: ## Disabled items diff --git a/docs/scripts/reportBrokenLinks.js b/docs/scripts/reportBrokenLinks.js index b63814708e958..d1dffe84647b6 100644 --- a/docs/scripts/reportBrokenLinks.js +++ b/docs/scripts/reportBrokenLinks.js @@ -54,7 +54,7 @@ write('Broken links found by `yarn docs:link-check` that exist:\n'); Object.keys(usedLinks) .filter((link) => link.startsWith('/')) .filter((link) => !availableLinks[removeUnsupportedHash(link)]) - // unstyled sections are added by scripts (can not be found in markdown) + // unstyled sections are added by scripts (cannot be found in markdown) .filter((link) => !link.includes('#unstyled')) .filter((link) => UNSUPPORTED_PATHS.every((unsupportedPath) => !link.includes(unsupportedPath))) .sort() diff --git a/packages/x-charts/src/ChartsReferenceLine/ChartsReferenceLine.tsx b/packages/x-charts/src/ChartsReferenceLine/ChartsReferenceLine.tsx index 209548aaf14b6..c58f28fe85386 100644 --- a/packages/x-charts/src/ChartsReferenceLine/ChartsReferenceLine.tsx +++ b/packages/x-charts/src/ChartsReferenceLine/ChartsReferenceLine.tsx @@ -13,7 +13,7 @@ function ChartsReferenceLine(props: ChartsReferenceLineProps) { const { x, y } = props; if (x !== undefined && y !== undefined) { throw new Error( - 'MUI X Charts: The ChartsReferenceLine can not have both `x` and `y` props set.', + 'MUI X Charts: The ChartsReferenceLine cannot have both `x` and `y` props set.', ); } diff --git a/packages/x-data-grid-pro/src/hooks/features/columnReorder/useGridColumnReorder.tsx b/packages/x-data-grid-pro/src/hooks/features/columnReorder/useGridColumnReorder.tsx index 68c773980c60a..4b1c3bf5e3390 100644 --- a/packages/x-data-grid-pro/src/hooks/features/columnReorder/useGridColumnReorder.tsx +++ b/packages/x-data-grid-pro/src/hooks/features/columnReorder/useGridColumnReorder.tsx @@ -276,7 +276,7 @@ export const useGridColumnReorder = ( forbiddenIndexes.current[indexWithOffset] || allColumns[indexWithOffset].field === nextVisibleColumnField ) { - // If we ended up on a visible column, or a forbidden one, we can not do the reorder + // If we ended up on a visible column, or a forbidden one, we cannot do the reorder canBeReordered = false; } } diff --git a/packages/x-data-grid/src/hooks/features/rows/useGridRows.ts b/packages/x-data-grid/src/hooks/features/rows/useGridRows.ts index 90c846f460233..1bdc10b76eab6 100644 --- a/packages/x-data-grid/src/hooks/features/rows/useGridRows.ts +++ b/packages/x-data-grid/src/hooks/features/rows/useGridRows.ts @@ -196,7 +196,7 @@ export const useGridRows = ( if (props.signature === GridSignature.DataGrid && updates.length > 1) { throw new Error( [ - "MUI X: You can't update several rows at once in `apiRef.current.updateRows` on the DataGrid.", + 'MUI X: You cannot update several rows at once in `apiRef.current.updateRows` on the DataGrid.', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature.', ].join('\n'), ); @@ -387,7 +387,7 @@ export const useGridRows = ( if (props.signature === GridSignature.DataGrid && newRows.length > 1) { throw new Error( [ - "MUI X: You can't replace rows using `apiRef.current.unstable_replaceRows` on the DataGrid.", + 'MUI X: You cannot replace rows using `apiRef.current.unstable_replaceRows` on the DataGrid.', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature.', ].join('\n'), ); diff --git a/packages/x-data-grid/src/internals/utils/propValidation.ts b/packages/x-data-grid/src/internals/utils/propValidation.ts index 3323c4a8950a6..b86261d3ca8c1 100644 --- a/packages/x-data-grid/src/internals/utils/propValidation.ts +++ b/packages/x-data-grid/src/internals/utils/propValidation.ts @@ -8,7 +8,7 @@ export const propValidatorsDataGrid: PropValidator[] = [ props.autoHeight && [ 'MUI X: `` are not valid props.', - 'You can not use both the `autoPageSize` and `autoHeight` props at the same time because `autoHeight` scales the height of the Data Grid according to the `pageSize`.', + 'You cannot use both the `autoPageSize` and `autoHeight` props at the same time because `autoHeight` scales the height of the Data Grid according to the `pageSize`.', '', 'Please remove one of these two props.', ].join('\n')) || diff --git a/packages/x-data-grid/src/tests/rows.DataGrid.test.tsx b/packages/x-data-grid/src/tests/rows.DataGrid.test.tsx index 3dcb768db66ef..5a26392c02576 100644 --- a/packages/x-data-grid/src/tests/rows.DataGrid.test.tsx +++ b/packages/x-data-grid/src/tests/rows.DataGrid.test.tsx @@ -1082,7 +1082,7 @@ describe(' - Rows', () => { { id: 2, brand: 'Pum' }, { id: 3, brand: 'Jordan' }, ]), - ).to.throw(/You can't update several rows at once/); + ).to.throw(/You cannot update several rows at once/); }); it('should allow to update one row at the time', () => { @@ -1117,7 +1117,7 @@ describe(' - Rows', () => { }).toErrorDev( [ 'MUI X: `` are not valid props.', - 'You can not use both the `autoPageSize` and `autoHeight` props at the same time because `autoHeight` scales the height of the Data Grid according to the `pageSize`.', + 'You cannot use both the `autoPageSize` and `autoHeight` props at the same time because `autoHeight` scales the height of the Data Grid according to the `pageSize`.', '', 'Please remove one of these two props.', ].join('\n'),