From d2c8ab171eb1cfed02ff3819a345bf95c7efd775 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Sun, 17 Mar 2024 00:51:26 +0100 Subject: [PATCH] [docs] Fix some Vale errors --- .circleci/config.yml | 2 +- .github/styles/Blog/BrandName.yml | 24 ---------- .github/styles/Blog/ComponentNaming.yml | 24 ---------- .github/styles/Blog/ComposedWords.yml | 15 ------- .github/styles/Blog/NamingConventions.yml | 19 -------- .github/styles/Blog/NoCompanyName.yml | 14 ------ .github/styles/Blog/Typos.yml | 11 ----- .github/styles/Vocab/accept.txt | 0 .github/styles/Vocab/reject.txt | 0 .gitignore | 4 +- .vale.ini | 44 ++++++++----------- CHANGELOG.md | 22 +++++----- README.md | 4 +- changelogOld/CHANGELOG.v4.md | 20 ++++----- changelogOld/CHANGELOG.v5.md | 26 +++++------ docs/README.md | 3 +- docs/data/charts/gauge/gauge.md | 8 ++-- docs/data/charts/sparkline/sparkline.md | 2 +- docs/data/charts/tree-map/tree-map.md | 2 +- docs/data/data-grid/api-object/api-object.md | 2 +- .../column-definition/column-definition.md | 6 +-- .../column-pinning/column-pinning.md | 2 +- docs/data/data-grid/editing/editing.md | 2 +- docs/data/data-grid/events/events.md | 2 +- docs/data/data-grid/faq/faq.md | 6 +-- docs/data/data-grid/filtering/index.md | 2 +- .../data-grid/master-detail/master-detail.md | 2 +- docs/data/data-grid/overview/overview.md | 2 +- .../data-grid/row-grouping/row-grouping.md | 2 +- .../data-grid/row-ordering/row-ordering.md | 2 +- .../data/data-grid/row-updates/row-updates.md | 2 +- .../data-grid/server-side-data/aggregation.md | 2 +- docs/data/data-grid/server-side-data/index.md | 4 +- .../server-side-data/infinite-loading.md | 2 +- .../server-side-data/lazy-loading.md | 2 +- .../server-side-data/row-grouping.md | 2 +- .../data-grid/server-side-data/tree-data.md | 2 +- docs/data/data-grid/state/state.md | 4 +- .../virtualization/virtualization.md | 2 +- .../adapters-locale/FieldPlaceholder.js | 2 +- .../adapters-locale/FieldPlaceholder.tsx | 2 +- .../FieldPlaceholder.tsx.preview | 2 +- .../adapters-locale/adapters-locale.md | 4 +- .../base-concepts/base-concepts.md | 8 ++-- .../date-calendar/date-calendar.md | 2 +- .../date-pickers/date-picker/date-picker.md | 2 +- .../date-time-picker/date-time-picker.md | 2 +- .../digital-clock/digital-clock.md | 4 +- .../date-pickers/time-clock/time-clock.md | 2 +- .../introduction/installation/installation.md | 2 +- docs/data/introduction/licensing/licensing.md | 2 +- .../migration-data-grid-v4.md | 6 +-- .../migration-data-grid-v6.md | 2 +- .../migration-pickers-v6.md | 2 +- docs/public/_redirects | 2 +- docs/scripts/reportBrokenLinks.js | 2 +- docs/src/modules/components/DemoPropsForm.tsx | 2 +- docs/src/modules/utils/postProcessImport.ts | 2 +- .../date-calendar/date-calendar.json | 2 +- .../date-pickers/date-field/date-field.json | 2 +- .../date-pickers/date-picker/date-picker.json | 2 +- .../date-range-calendar.json | 2 +- .../date-range-picker/date-range-picker.json | 2 +- .../date-time-field/date-time-field.json | 2 +- .../date-time-picker/date-time-picker.json | 2 +- .../date-time-range-picker.json | 2 +- .../desktop-date-picker.json | 2 +- .../desktop-date-range-picker.json | 2 +- .../desktop-date-time-picker.json | 2 +- .../desktop-date-time-range-picker.json | 2 +- .../mobile-date-picker.json | 2 +- .../mobile-date-range-picker.json | 2 +- .../mobile-date-time-picker.json | 2 +- .../mobile-date-time-range-picker.json | 2 +- .../multi-input-date-range-field.json | 2 +- .../multi-input-date-time-range-field.json | 2 +- .../single-input-date-range-field.json | 2 +- .../single-input-date-time-range-field.json | 2 +- .../static-date-picker.json | 2 +- .../static-date-range-picker.json | 2 +- .../static-date-time-picker.json | 2 +- docsTech/processing.md | 16 +++---- .../clipboard/useGridClipboardImport.ts | 2 +- .../columnPinning/useGridColumnPinning.tsx | 6 +-- .../detailPanel/useGridDetailPanel.ts | 2 +- .../x-data-grid-pro/src/models/dataSource.ts | 2 +- .../tests/cellEditing.DataGridPro.test.tsx | 2 +- .../src/tests/components.DataGridPro.test.tsx | 4 +- .../src/components/cell/GridActionsCell.tsx | 2 +- .../filterPanel/GridFilterInputBoolean.tsx | 4 +- .../panel/filterPanel/GridFilterInputDate.tsx | 4 +- .../GridFilterInputSingleSelect.tsx | 4 +- .../filterPanel/GridFilterInputValue.tsx | 4 +- .../columnResize/useGridColumnResize.tsx | 2 +- .../features/editing/useGridCellEditing.ts | 2 +- .../features/editing/useGridRowEditing.ts | 2 +- .../hooks/features/filter/gridFilterUtils.ts | 2 +- .../src/models/api/gridRowsMetaApi.ts | 2 +- .../x-data-grid/src/utils/createSelector.ts | 2 +- packages/x-data-grid/src/utils/domUtils.ts | 2 +- .../x-data-grid/src/utils/keyboardUtils.ts | 2 +- .../DateRangeCalendar/DateRangeCalendar.tsx | 2 +- .../src/DateRangePicker/DateRangePicker.tsx | 2 +- .../DateTimeRangePicker.tsx | 2 +- .../DesktopDateRangePicker.tsx | 2 +- .../DesktopDateTimeRangePicker.tsx | 2 +- .../MobileDateRangePicker.tsx | 2 +- .../MobileDateTimeRangePicker.tsx | 2 +- .../MultiInputDateRangeField.tsx | 2 +- .../MultiInputDateTimeRangeField.tsx | 2 +- .../SingleInputDateRangeField.tsx | 2 +- .../SingleInputDateTimeRangeField.tsx | 2 +- .../StaticDateRangePicker.tsx | 2 +- .../src/internals/models/dateRange.ts | 2 +- .../src/DateCalendar/DateCalendar.tsx | 2 +- .../src/DateField/DateField.tsx | 2 +- .../src/DatePicker/DatePicker.tsx | 2 +- .../src/DateTimeField/DateTimeField.tsx | 2 +- .../src/DateTimePicker/DateTimePicker.tsx | 2 +- .../DesktopDatePicker/DesktopDatePicker.tsx | 2 +- .../DesktopDateTimePicker.tsx | 2 +- .../src/MobileDatePicker/MobileDatePicker.tsx | 2 +- .../MobileDateTimePicker.tsx | 2 +- .../src/StaticDatePicker/StaticDatePicker.tsx | 2 +- .../StaticDateTimePicker.tsx | 2 +- .../internals/components/PickersPopper.tsx | 2 +- .../src/internals/hooks/useOpenState.ts | 2 +- .../src/internals/models/validation.ts | 2 +- scripts/README.md | 2 +- scripts/l10n.ts | 2 +- 130 files changed, 204 insertions(+), 316 deletions(-) delete mode 100644 .github/styles/Blog/BrandName.yml delete mode 100644 .github/styles/Blog/ComponentNaming.yml delete mode 100644 .github/styles/Blog/ComposedWords.yml delete mode 100644 .github/styles/Blog/NamingConventions.yml delete mode 100644 .github/styles/Blog/NoCompanyName.yml delete mode 100644 .github/styles/Blog/Typos.yml delete mode 100644 .github/styles/Vocab/accept.txt delete mode 100644 .github/styles/Vocab/reject.txt diff --git a/.circleci/config.yml b/.circleci/config.yml index 49cb3d59e8a9..200f447444cb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -52,7 +52,7 @@ commands: browsers: type: boolean default: false - description: 'Set to true if you intend to any browser (e.g. with playwright).' + description: 'Set to true if you intend to any browser (for example with playwright).' steps: - run: diff --git a/.github/styles/Blog/BrandName.yml b/.github/styles/Blog/BrandName.yml deleted file mode 100644 index bfdb8da88c27..000000000000 --- a/.github/styles/Blog/BrandName.yml +++ /dev/null @@ -1,24 +0,0 @@ -# Without a non-breaking space, brand names can be split in the middle -# with the start and end on two different lines. -# For example, Apple does this meticulously with their brand name: https://www.apple.com/macbook-air/. -# Also read https://www.chrisdpeters.com/blog/using-non-breaking-spaces-to-help-with-branding/ for why. -extends: substitution -message: Use a non-breaking space for brand name ('%s' instead of '%s') -level: error -ignorecase: true -# swap maps tokens in form of bad: good -# for more information: https://vale.sh/docs/topics/styles/#substitution -swap: - Material UI: Material UI - MUI X: MUI X - Base UI: Base UI - MUI System: MUI System - MUI Store: MUI Store - MUI Core: MUI Core - MUI Toolpad: MUI Toolpad - MUI Connect: MUI Connect - Stack Overflow: Stack Overflow -# Don't forget to run the following command to generate the package writing-rules.zip file -# Vale uses that ZIP file and not the YAML files. -# -# pnpm docs:zipRules diff --git a/.github/styles/Blog/ComponentNaming.yml b/.github/styles/Blog/ComponentNaming.yml deleted file mode 100644 index 138f7c303a72..000000000000 --- a/.github/styles/Blog/ComponentNaming.yml +++ /dev/null @@ -1,24 +0,0 @@ -extends: substitution -message: Unless you're referring to the general concept, consider using '%s' instead of '%s'. -level: suggestion -ignorecase: false -# swap maps tokens in form of bad: good -# for more information: https://vale.sh/docs/topics/styles/#substitution -swap: - # Capitalize - data grid: Data Grid - date picker: Date Picker - Data grid: Data Grid - Date picker: Date Picker - Time picker: Time Picker - Date [t|T]ime picker: Date Time Picker - Date [r|R]ange picker: Date Range Picker - Time [r|R]ange picker: Time Range Picker - Date [t|T]ime [r|R]ange picker: Date Time Range Picker - time picker: Time Picker - date time picker: Date Time Picker - date range picker: Date Range Picker - time range picker: Time Range Picker - date time range picker: Date Time Range Picker - # use Data Grid instead of grid - the grid: the Data Grid diff --git a/.github/styles/Blog/ComposedWords.yml b/.github/styles/Blog/ComposedWords.yml deleted file mode 100644 index 1d931388bee3..000000000000 --- a/.github/styles/Blog/ComposedWords.yml +++ /dev/null @@ -1,15 +0,0 @@ -extends: substitution -message: To be consistent with the rest of the documentation, consider using '%s' instead of '%s'. -level: error -ignorecase: true -# swap maps tokens in form of bad: good -# for more information: https://vale.sh/docs/topics/styles/#substitution -swap: - sub-component: subcomponent - sub-components: subcomponents - 'sub component': subcomponent - 'sub components': subcomponents - 'use-case': 'use case' - 'usecase': 'use case' - "can't": 'cannot' - 'can not': 'cannot' diff --git a/.github/styles/Blog/NamingConventions.yml b/.github/styles/Blog/NamingConventions.yml deleted file mode 100644 index ac0e3668f9fc..000000000000 --- a/.github/styles/Blog/NamingConventions.yml +++ /dev/null @@ -1,19 +0,0 @@ -extends: substitution -message: To be consistent with capitalization, consider using '%s' instead of '%s'. -level: error -ignorecase: false -# swap maps tokens in form of bad: good -# for more information: https://vale.sh/docs/topics/styles/#substitution -swap: - api: API - Api: API - typescript: TypeScript - Typescript: TypeScript - ts: TypeScript - TS: TypeScript - javascript: JavaScript - Javascript: JavaScript - css: CSS - Css: CSS - NPM: npm # https://css-tricks.com/start-sentence-npm/ - Github: GitHub diff --git a/.github/styles/Blog/NoCompanyName.yml b/.github/styles/Blog/NoCompanyName.yml deleted file mode 100644 index a60b3c3bc2d7..000000000000 --- a/.github/styles/Blog/NoCompanyName.yml +++ /dev/null @@ -1,14 +0,0 @@ -extends: existence -message: We avoid referencing the company name '%s'. Instead you can reference a product or the team. -level: warning -ignorecase: false -tokens: - - 'MUI \w+' -exceptions: - - 'MUI X' - - 'MUI System' - - 'MUI Store' - - 'MUI Core' - - 'MUI Toolpad' - - 'MUI Connect' - - 'MUI organization' # valid use of a regular space diff --git a/.github/styles/Blog/Typos.yml b/.github/styles/Blog/Typos.yml deleted file mode 100644 index 9397f6153250..000000000000 --- a/.github/styles/Blog/Typos.yml +++ /dev/null @@ -1,11 +0,0 @@ -extends: substitution -message: Do you mean '%s' instead of '%s'? -level: error -ignorecase: true -# swap maps tokens in form of bad: good -# for more information: https://vale.sh/docs/topics/styles/#substitution -swap: - bellow: below - eg: e.g. - eg.: e.g. - 'e.g ': 'e.g. ' diff --git a/.github/styles/Vocab/accept.txt b/.github/styles/Vocab/accept.txt deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/.github/styles/Vocab/reject.txt b/.github/styles/Vocab/reject.txt deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/.gitignore b/.gitignore index a0f281bd1819..a10ee92e04cf 100644 --- a/.gitignore +++ b/.gitignore @@ -20,5 +20,7 @@ dist node_modules size-snapshot.json performance-snapshot.json +# vale downloaded config .github/styles/Google -.github/styles/write-good \ No newline at end of file +.github/styles/MUI +.github/styles/.vale-config diff --git a/.vale.ini b/.vale.ini index b22f6236cfd3..217e3d4d501a 100644 --- a/.vale.ini +++ b/.vale.ini @@ -1,33 +1,27 @@ -# Config vale. More information at https://docs.errata.ai/vale/config +# Vale config. More information at https://vale.sh/docs/topics/config/ StylesPath = .github/styles -MinAlertLevel = suggestion +MinAlertLevel = error -Packages = Google +# To update mui-vale package: +# 1. Go to the docs folder in the material-ui repo +# 2. Update/create YAML files +# 3. Run `pnpm docs:zipRules` to generate the zip files +# 4. You can test locally by replacing the url with the file path of the generated zip +Packages = Google, https://github.com/mui/material-ui/raw/HEAD/docs/mui-vale.zip [*.md] -# Ignore code injection which start with {{... +# Ignore code injections that start with {{... BlockIgnores = {{.* -# Custom syle -# BasedOnStyles = Blog +BasedOnStyles = MUI -Blog.ComposedWords = YES -Blog.NamingConventions = YES -Blog.Typos = YES -Blog.BrandName = YES -Blog.NoCompanyName = YES +# Google errors: +Google.GenderBias = YES # No Gender bias +# Google warings: +Google.FirstPerson = YES # Avoid first-person +Google.We = YES # Avoid first-person plural +Google.Will = YES # Avoid future tense +Google.OxfordComma = YES # Prefer Oxford comma -# Google: -Google.FirstPerson = YES # Avoid first-person pronouns such as I, me, ...'. -Google.GenderBias = YES # Avoid gendered profession -Google.OxfordComma = YES -Google.Quotes = YES # Commas and periods go inside quotation marks. -Google.Spelling = YES # In general, use American spelling (word ending with 'nised' or 'logue') -Google.We = YES # Try to avoid using first-person plural - -# Those rules are not repected a lot -# Google.Passive = YES # In general, use active voice instead of passive voice. -# Google.Will = YES # Avoid using will - -# False positives with "1st" nearly no use in our doc -# Google.Units = YES # Put a nonbreaking space between the number and the unit \ No newline at end of file +[CHANGELOG*.md] +MUI.CorrectReferenceAllCases = NO diff --git a/CHANGELOG.md b/CHANGELOG.md index f39c4060b14f..b0499f734d2d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,7 +90,7 @@ The `onNodeFocus` callback has been renamed to `onItemFocus` for consistency: - [docs] Add `legacy` bundle drop mention in migration pages (#12424) @LukasTy - [docs] Add missing luxon `Info` import (#12427) @LukasTy - [docs] Improve slots definitions for charts (#12408) @alexfauquette -- [docs] Polish What's new in MUI X blog titles (#12309) @oliviertassinari +- [docs] Polish What's new in MUI X blog titles (#12309) @oliviertassinari - [docs] Replace `rel="noreferrer"` by `rel="noopener"` @oliviertassinari - [docs] Update `date-fns` `weekStarsOn` overriding example (#12416) @LukasTy @@ -252,7 +252,7 @@ Same changes as in `@mui/x-date-pickers@7.0.0-beta.5`. ### Docs - [docs] Fix image layout shift when loading @oliviertassinari -- [docs] Match Material UI repo comment for redirections @oliviertassinari +- [docs] Match Material UI repo comment for redirections @oliviertassinari - [docs] Non breaking spaces @oliviertassinari - [docs] Polish the Date Picker playground (#11869) @zanivan - [docs] Standardize WAI-ARIA references @oliviertassinari @@ -263,9 +263,9 @@ Same changes as in `@mui/x-date-pickers@7.0.0-beta.5`. - [core] Remove grid folder from `getComponentInfo` RegExp (#12241) @flaviendelangle - [core] Remove `window.` reference for common globals @oliviertassinari - [core] Use runtime agnostic setTimeout type @oliviertassinari -- [docs-infra] Fix Stack Overflow breaking space @oliviertassinari +- [docs-infra] Fix Stack Overflow breaking space @oliviertassinari - [docs-infra] Fix missing non breaking spaces @oliviertassinari -- [github] Update `no-response` workflow (#12193) @MBilalShafi +- [infra] Update `no-response` workflow (#12193) @MBilalShafi - [infra] Fix missing permission reset @oliviertassinari ## 7.0.0-beta.4 @@ -282,7 +282,7 @@ We'd like to offer a big thanks to the 10 contributors who made this release pos ### Breaking changes -- The support for IE11 has been removed from all MUI X packages. The `legacy` bundle that used to support old browsers like IE11 is no longer included. +- The support for IE11 has been removed from all MUI X packages. The `legacy` bundle that used to support old browsers like IE11 is no longer included. ### Data Grid @@ -392,7 +392,7 @@ These components are no longer exported from `@mui/x-charts`: ### Docs - [docs] Add recipe for hiding separator on non-resizable columns (#12134) @michelengelen -- [docs] Add small improvements to the Gauge Chart page (#12076) @danilo-leal +- [docs] Add small improvements to the Gauge page (#12076) @danilo-leal - [docs] Add the 'point' scaleType to the axis documentation (#12179) @alexfauquette - [docs] Clarify Pickers 'Component composition' section (#12097) @LukasTy - [docs] Fix "Licensing" page link (#12156) @LukasTy @@ -975,7 +975,7 @@ Same changes as in `@mui/x-date-pickers@7.0.0-alpha.9`. - [charts] Do not propagate `innerRadius` and `outerRadius` to the DOM (#11689) @alexfauquette - [charts] Fix default `stackOffset` for `LineChart` (#11647) @alexfauquette -- [charts] Remove a TS ignore (#11688) @alexfauquette +- [charts] Remove a TypeScript ignore (#11688) @alexfauquette ### Tree View @@ -1404,7 +1404,7 @@ Same changes as in `@mui/x-date-pickers@7.0.0-alpha.7`. - [core] Fix release changelog (#11496) @romgrk - [core] Fix use of ::before & ::after (#11515) @oliviertassinari - [core] Localize the issue template to MUI X (#11511) @oliviertassinari -- [core] Regen api files (#11542) @flaviendelangle +- [core] Regenerate API files (#11542) @flaviendelangle - [core] Remove issue emoji @oliviertassinari - [core] Sync the release instructions with MUI Core @oliviertassinari - [core] Yaml format match most common convention @oliviertassinari @@ -1447,7 +1447,7 @@ We'd like to offer a big thanks to the 6 contributors who made this release poss - The `filterModel` now supports `Date` objects as values for `date` and `dateTime` column types. The `filterModel` still accepts strings as values for `date` and `dateTime` column types, - but all updates to the `filterModel` coming from the UI (e.g. filter panel) will set the value as a `Date` object. + but all updates to the `filterModel` coming from the UI (for example filter panel) will set the value as a `Date` object. #### `@mui/x-data-grid@7.0.0-alpha.6` @@ -1658,7 +1658,7 @@ Same changes as in `@mui/x-date-pickers@7.0.0-alpha.5`, plus: ### Core - [core] Automate cherry-pick of PRs from `next` -> `master` (#11382) @MBilalShafi -- [github] Update `no-response` workflow (#11369) @MBilalShafi +- [infra] Update `no-response` workflow (#11369) @MBilalShafi - [test] Fix flaky screenshots (#11388) @cherniavskii ## 7.0.0-alpha.4 @@ -1896,7 +1896,7 @@ Same changes as in `@mui/x-date-pickers@7.0.0-alpha.3`. - [charts] Adjusted `defaultizeValueFormatter` util to accept an optional `series.valueFormatter` value (#11144) @michelengelen - [charts] Apply `labelStyle` and `tickLabelStyle` props on `` (#11180) @akamfoad -- [charts] Fix TS config (#11259) @alexfauquette +- [charts] Fix TypeScript config (#11259) @alexfauquette - [charts] Fix error with empty dataset (#11063) @alexfauquette - [charts] Fix export strategy (#11235) @alexfauquette - [charts] Remove outdated prop-types (#11045) @alexfauquette diff --git a/README.md b/README.md index 5e751d42d69b..3bbfeb09f669 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ From community guidance to critical business support, we're here to help. Read t Read the [contributing guide](/CONTRIBUTING.md) to learn about our development process, how to propose bug fixes and improvements, and how to build and test your changes. Contributing to MUI X is about more than just issues and pull requests! -There are many other ways to [support MUI](https://mui.com/material-ui/getting-started/faq/#mui-is-awesome-how-can-i-support-the-project) beyond contributing to the code base. +There are many other ways to [support MUI X](https://mui.com/material-ui/getting-started/faq/#mui-is-awesome-how-can-i-support-the-project) beyond contributing to the code base. ## Changelog @@ -103,7 +103,7 @@ The [changelog](https://github.com/mui/mui-x/releases) is regularly updated to r ## Roadmap -Future plans and high-priority features and enhancements can be found in our [roadmap](https://mui.com/x/introduction/roadmap/). +Future plans and high-priority features and enhancements can be found in the [roadmap](https://mui.com/x/introduction/roadmap/). ## Security diff --git a/changelogOld/CHANGELOG.v4.md b/changelogOld/CHANGELOG.v4.md index af9cc92f160a..662652efd208 100644 --- a/changelogOld/CHANGELOG.v4.md +++ b/changelogOld/CHANGELOG.v4.md @@ -310,8 +310,8 @@ Big thanks to the 8 contributors who made this release possible. Here are some h - [docs] Add missing API docs (#2167) @ZeeshanTamboli - [docs] Describe how to export custom rendered cells (#2194) @m4theushw -- [docs] Generate api doc for the GridExportCSVOptions interface (#2102) @flaviendelangle -- [docs] Handle generics in api doc generation (#2210) @flaviendelangle +- [docs] Generate API doc for the GridExportCSVOptions interface (#2102) @flaviendelangle +- [docs] Handle generics in API doc generation (#2210) @flaviendelangle ### Core @@ -1260,7 +1260,7 @@ Big thanks to the 8 contributors who made this release possible. Here are some h - [DataGrid] Rename `GridBaseComponentProps` type to `GridSlotComponentProps` (#1252) @DanailH - [DataGrid] Rename `useGridBaseComponentProps` hook to `useGridSlotComponentProps` (#1252) @DanailH - [DataGrid] Rename modules (#1292) @DanailH -- [DataGrid] Rename all events related to column reordering, e.g. `GRID_COL_REORDER_START` -> `GRID_COLUMN_REORDER_START` (#1299) @m4theushw +- [DataGrid] Rename all events related to column reordering, for example `GRID_COL_REORDER_START` -> `GRID_COLUMN_REORDER_START` (#1299) @m4theushw - [DataGrid] Methods `onColItemDragStart`, `onColHeaderDragOver`, `onColItemDragOver`, `onColItemDragEnter` removed from the grid API. Prefer listening to [column reordering events](https://mui.com/x/react-data-grid/column-ordering/) (#1299) @m4theushw - [DataGrid] Calling `apiRef.current.getColumnHeaderParams` returns a `GridColumnHeaderParams` instead of `GridColParams` (#1299) @m4theushw - [DataGrid] Events that follow the pattern `GRID_COLUMN_HEADER_xxx` will be called with a `GridColumnHeaderParams` instead of `GridColParams` (#1299) @m4theushw @@ -1475,7 +1475,7 @@ Big thanks to the 4 contributors who made this release possible. Here are some h - [DataGrid] Fix process is not defined (EXPERIMENTAL_ENABLED) (#1027) @leontastic - [DataGrid] Fix scrollbar size on windows (#1061) @dtassone - [DataGrid] Fix warning with v5 (#1038) @oliviertassinari -- [DataGrid] Resolve the api ref at the same time as any other ref (#990) @oliviertassinari +- [DataGrid] Resolve the apiRef at the same time as any other ref (#990) @oliviertassinari - [DataGrid] Use the disableDensitySelector to disable the DensitySelector (#1031) @DanailH - [DataGrid] Fix passing [] or undefined in sortModel prop (#1035) @dtassone - [XGrid] Fix server-side multi filters (#1029) @dtassone @@ -1501,7 +1501,7 @@ _Feb 5, 2021_ Big thanks to the 5 contributors who made this release possible. Here are some highlights ✨: - 🎁 Add getRowId prop (#972) @dtassone -- 🚀 Add streaming delete row api (#980) @dtassone +- 🚀 Add streaming delete row API (#980) @dtassone - 💅 Fix autoHeight (#940) @oliviertassinari - 🙌 Enable the data grid to work under strict mode (#933) @dtassone - ⚡️ Add component slots for toolbar and preference panel (#971) @DanailH @@ -1511,7 +1511,7 @@ Big thanks to the 5 contributors who made this release possible. Here are some h - [DataGrid] Add component slots for toolbar and preference panel (#971) @DanailH - [DataGrid] Add getRowId prop (#972) @dtassone -- [DataGrid] Add streaming delete row api (#980) @dtassone +- [DataGrid] Add streaming delete row API (#980) @dtassone - [DataGrid] Fix autoHeight (#940) @oliviertassinari - [DataGrid] Fix column reorder instability (#950) @dtassone - [DataGrid] Fix footer visual regression (#932) @dtassone @@ -1525,7 +1525,7 @@ Big thanks to the 5 contributors who made this release possible. Here are some h ### docs - [docs] Add sorting page in datagrid docs (#931) @dtassone -- [docs] Api page update with component slots (#969) @dtassone +- [docs] API page update with component slots (#969) @dtassone - [docs] Catch leaks ahread of time (#979) @oliviertassinari - [docs] Fix immutability with filter operator demos (#975) @dtassone - [docs] Improve docs of DataGrid about filter operators (#973) @SaskiaKeil @@ -1728,7 +1728,7 @@ Big thanks to the 4 contributors who made this release possible. Here are some h ### Docs -- [docs] Add missing props to DataGrid and XGrid api pages (#721) @DanailH +- [docs] Add missing props to DataGrid and XGrid API pages (#721) @DanailH - [docs] Fix wrong link anchor @oliviertassinari - [docs] Proxy production version @oliviertassinari @@ -1853,7 +1853,7 @@ _Nov 20, 2020_ ### Core -- [core] Prepare work for a future public state api (#533) @dtassone +- [core] Prepare work for a future public state API (#533) @dtassone - [core] Fix yarn prettier write @oliviertassinari - [test] Share karma setup (#576) @oliviertassinari @@ -1974,7 +1974,7 @@ You can find the documentation at this address: https://mui.com/x/react-data-gri ### @material-ui/x-grid@v4.0.0-alpha.1 / @material-ui/data-grid@v4.0.0-alpha.1 -- [DataGrid] Add api pages for data-grid and x-grid (#289) @dtassone +- [DataGrid] Add API pages for data-grid and x-grid (#289) @dtassone - [DataGrid] Add dark mode scrollbar (#282) @dtassone - [DataGrid] Better explain the limits of MIT vs commercial (#225) @oliviertassinari - [DataGrid] First v4 alpha version (#291) @dtassone diff --git a/changelogOld/CHANGELOG.v5.md b/changelogOld/CHANGELOG.v5.md index 62a6d292bf60..a544c6b2c162 100644 --- a/changelogOld/CHANGELOG.v5.md +++ b/changelogOld/CHANGELOG.v5.md @@ -295,7 +295,7 @@ We'd like to offer a big thanks to the 4 contributors who made this release poss ### Docs -- [docs] Fix the nested import on the api pages (#7134) @flaviendelangle +- [docs] Fix the nested import on the API pages (#7134) @flaviendelangle - [docs] Keep track of the localization completion (#7099) @alexfauquette - [docs] Update localization doc to use existing locale (#7104) @LukasTy @@ -495,7 +495,7 @@ We'd like to offer a big thanks to the 5 contributors who made this release poss - [CalendarPicker] Don't move to closest enabled date when `props.date` contains a disabled date (#6537) @flaviendelangle - [DateRangePicker] Fix calendar day outside of month layout shifting on hover (pick #6448) (#6538) @alexfauquette -- [pickers] Fix Typescript issues (#6510) @flaviendelangle +- [pickers] Fix TypeScript issues (#6510) @flaviendelangle ### Docs @@ -599,7 +599,7 @@ We'd like to offer a big thanks to the 5 contributors who made this release poss - [pickers] Add Finnish (fi-FI) locale to pickers (#6219) (#6230) @PetroSilenius - [pickers] Add Persian (fa-IR) locale to the pickers (#6181) @fakhamatia -- [pickers] Fix usage with Typescript 4.8 (#6229) @flaviendelangle +- [pickers] Fix usage with TypeScript 4.8 (#6229) @flaviendelangle - [YearPicker] Scroll to the current year even with `autoFocus=false` (#6224) @alexfauquette ### Docs @@ -641,7 +641,7 @@ We'd like to offer a big thanks to the 6 contributors who made this release poss ### Core -- [core] Update to Typescript 4.8.3 (#6136) @flaviendelangle +- [core] Update to TypeScript 4.8.3 (#6136) @flaviendelangle - [core] Update RFC template (#6100) @bytasv ## 5.17.2 @@ -832,7 +832,7 @@ We'd like to offer a big thanks to the 11 contributors who made this release pos ### Core - [core] Clarify the scope of the license key used for tests and documentation (#5824) @oliviertassinari -- [core] Fix Typescript error on field hooks (#5892) @flaviendelangle +- [core] Fix TypeScript error on field hooks (#5892) @flaviendelangle - [core] Memoize `columns` in `useDemoData` hook (#5848) @cherniavskii - [core] Remove Firefox from the BrowserStack list (#5874) @DanailH - [core] Small changes to the release script (#5840) @m4theushw @@ -874,7 +874,7 @@ We'd like to offer a big thanks to the 9 contributors who made this release poss ### Core - [core] Upgrade monorepo (#5771, #5797) @cherniavskii -- [core] Various TS improvements (#5556) @flaviendelangle +- [core] Various TypeScript improvements (#5556) @flaviendelangle - [license] Give more context in the missing license (#5731) @oliviertassinari - [license] Only log an error type once (#5730) @oliviertassinari - [test] Increase timeout to take print screenshot (#5799) @m4theushw @@ -1140,7 +1140,7 @@ We'd like to offer a big thanks to the 10 contributors who made this release pos - [DataGrid] Add Romanian (ro-RO) locale (#5345) @rolule - [DataGrid] Export Norwegian (nb-NO) locale (#5407) @cherniavskii - [DataGrid] Fix broken "start editing" integration with Japanese (#5414) @mnajdova -- [DataGrid] Fix "stop editing" integration with IME e.g. Japanese (#5257) @Gumichocopengin8 +- [DataGrid] Fix "stop editing" integration with IME, for example Japanese (#5257) @Gumichocopengin8 - [DataGrid] Fix dimensions computation with `autoHeight` and scroll x (#5401) @flaviendelangle - [DataGrid] Improve Slovak (sk-SK) locale (#5332) @msidlo - [DataGrid] Mention Premium plan in error messages and docs warnings (#5328) @cherniavskii @@ -1390,7 +1390,7 @@ We'd like to offer a big thanks to the 15 contributors who made this release pos - [core] Avoid Order ID to refer to GitHub issues/PRs (#5005) @oliviertassinari - [core] Improve the workflow for incomplete issues (#5012) @mnajdova - [core] Remove dead code on row grouping tree creation (#4945) @flaviendelangle -- [core] Use new cache api for the row grouping last model tracking (#4980) @flaviendelangle +- [core] Use new cache API for the row grouping last model tracking (#4980) @flaviendelangle - [core] Ensure that PRs have atleast 1 label (#5011) @DanailH - [core] Fix trailing-space @oliviertassinari - [core] Stop Renovate PR updates when PR is on hold (#5020) @cherniavskii @@ -1624,7 +1624,7 @@ We'd like to offer a big thanks to the 15 contributors who made this release pos - [core] Fix naming collision (#4853) @alexfauquette - [core] Prevent out-of-memory when type-checking in CI (#4697) @flaviendelangle - [core] Remove `rowsCache` from state (#4480) @m4theushw -- [core] Rework `DayPicker` api (#4783) @flaviendelangle +- [core] Rework `DayPicker` API (#4783) @flaviendelangle - [core] Update `x-license-pro` license to handle premium package (#4315) @DanailH - [core] Update monorepo & version (#4789) @oliviertassinari - [core] Update monorepo (#4772) @flaviendelangle @@ -1743,7 +1743,7 @@ We'd like to offer a big thanks to the 9 contributors who made this release poss - [core] Fix npm page description mistake (#4364) @oliviertassinari - [core] Fix typos and JSDoc (#4406) @flaviendelangle - [core] Move away for the event system to trigger pipe processings (#4378) @flaviendelangle -- [core] Small fixes TS on pickers (#4461) @flaviendelangle +- [core] Small fixes TypeScript on pickers (#4461) @flaviendelangle - [core] Unify tests (#4368) @flaviendelangle - [core] Enforce `noImplicitAny` in `docs` folder (#4412) @cherniavskii @@ -1994,7 +1994,7 @@ We'd like to offer a big thanks to the 15 contributors who made this release pos - [DataGrid] Allow to navigate between cells with keyboard once inside an `actions` column (#3375) @m4theushw - [DataGrid] Fix desynchronization between rows and header when sorting (#4058) @alexfauquette - [DataGrid] Clean and document the columns selector (#4010) @flaviendelangle -- [DataGrid] Deprecate and stop typing the api params of `GridCellParams`/`GridValueGetterParams` and affiliated (#4089) @ flaviendelangle +- [DataGrid] Deprecate and stop typing the API params of `GridCellParams`/`GridValueGetterParams` and affiliated (#4089) @ flaviendelangle - [DataGrid] Differentiate the Pro and Community versions of `GridState`, `GridApi` and `GridApiRef` (#3648) @flaviendelangle - [DataGrid] Fix column selection for print export (#3917) @alexfauquette - [DataGrid] Fix horizontal scroll not working on empty grid (#3821) @cherniavskii @@ -3001,7 +3001,7 @@ A big thanks to the 5 contributors who made this release possible. Here are some - [DataGrid] Remove the `state` prop and use the `initialState` prop (#2848) @flaviendelangle Note that `initialState` only allows the `preferencePanel`, `filter.filterModel` and `sort.sortModel` keys. - To fully control the state, use the feature's model prop and change callback (e.g. `filterModel` and `onFilterModelChange`). + To fully control the state, use the feature's model prop and change callback (for example `filterModel` and `onFilterModelChange`). ```diff Treemap allows to display data with a hierarchical structure.

:::warning -The Treemap Chart component isn't available yet, but you can upvote [**this GitHub issue**](https://github.com/mui/mui-x/issues/7924) to see it arrive sooner. +The Treemap component isn't available yet, but you can upvote [**this GitHub issue**](https://github.com/mui/mui-x/issues/7924) to see it arrive sooner. Don't hesitate to leave a comment there to influence what gets built. Especially if you already have a use case for this component, or if you're facing a pain point with your current solution. diff --git a/docs/data/data-grid/api-object/api-object.md b/docs/data/data-grid/api-object/api-object.md index 9c0e091826ea..1c436192c83e 100644 --- a/docs/data/data-grid/api-object/api-object.md +++ b/docs/data/data-grid/api-object/api-object.md @@ -62,7 +62,7 @@ If you try to use it in the first render of the component, it will crash because ### Access the disabled column features -You can control the disabled features of a column (e.g. hiding, sorting, filtering, pinning, grouping, etc) programmatically using `initialState`, controlled models, or the API object. +You can control the disabled features of a column (for example hiding, sorting, filtering, pinning, grouping, etc) programmatically using `initialState`, controlled models, or the API object. In the example below, API object is used to build a custom sorting for the _firstName_ column which is not sortable by the default grid UI (i.e `colDef.sortable` property is set to `false`). diff --git a/docs/data/data-grid/column-definition/column-definition.md b/docs/data/data-grid/column-definition/column-definition.md index 0c1ae990eea6..d86945322506 100644 --- a/docs/data/data-grid/column-definition/column-definition.md +++ b/docs/data/data-grid/column-definition/column-definition.md @@ -93,13 +93,13 @@ The value returned by `valueGetter` is used for: ### Value formatter The value formatter allows you to convert the value before displaying it. -Common use cases include converting a JavaScript `Date` object to a date string or a `Number` into a formatted number (e.g. "1,000.50"). +Common use cases include converting a JavaScript `Date` object to a date string or a `Number` into a formatted number (for example "1,000.50"). Note, that the value returned by `valueFormatter` is only used for rendering purposes. Filtering and sorting are based on the raw value (`row[field]`) or the value returned by [`valueGetter`](/x/react-data-grid/column-definition/#value-getter). -In the following demo, `valueGetter` is used to convert the tax rate (e.g. `0.2`) to a decimal value (e.g. `20`), -and `valueFormatter` is used to display it as a percentage (e.g. `20%`). +In the following demo, `valueGetter` is used to convert the tax rate (for example `0.2`) to a decimal value (for example `20`), +and `valueFormatter` is used to display it as a percentage (for example `20%`). {{"demo": "ValueFormatterGrid.js", "bg": "inline"}} diff --git a/docs/data/data-grid/column-pinning/column-pinning.md b/docs/data/data-grid/column-pinning/column-pinning.md index 462a666c6a83..40451599150e 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 cannot 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 (that is 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/editing.md b/docs/data/data-grid/editing/editing.md index 2e74600d3fc9..fcf48175f9a4 100644 --- a/docs/data/data-grid/editing/editing.md +++ b/docs/data/data-grid/editing/editing.md @@ -41,7 +41,7 @@ To enable this behavior, set the `editMode` prop on the Data Grid to `"row"`. No ``` The following demo illustrates how row editing works. -The user can [start](#start-editing) and [stop](#stop-editing) editing a row using the same actions as those provided for cell editing (e.g. double-clicking a cell). +The user can [start](#start-editing) and [stop](#stop-editing) editing a row using the same actions as those provided for cell editing (for example double-clicking a cell). {{"demo": "BasicRowEditingGrid.js", "bg": "inline", "defaultCodeOpen": false}} diff --git a/docs/data/data-grid/events/events.md b/docs/data/data-grid/events/events.md index 5e380ee8b56f..170c71790af7 100644 --- a/docs/data/data-grid/events/events.md +++ b/docs/data/data-grid/events/events.md @@ -48,7 +48,7 @@ useGridApiEventHandler(apiRef, 'rowClick', handleEvent); ``` :::warning -This hook can only be used inside the scope of the Data Grid (i.e. inside component slots or cell renderers). +This hook can only be used inside the scope of the Data Grid (that is inside component slots or cell renderers). ::: The following demo shows how to subscribe to the `rowClick` event using `useGridApiEventHandler`—try it out by clicking on any row: diff --git a/docs/data/data-grid/faq/faq.md b/docs/data/data-grid/faq/faq.md index aabf157af76c..823b9a6d1f7d 100644 --- a/docs/data/data-grid/faq/faq.md +++ b/docs/data/data-grid/faq/faq.md @@ -103,9 +103,9 @@ See more about the `renderCell` method in the [rendering cells](/x/react-data-gr It is a function that allows you to derive the cell value from the row data. It is the most performant way to customize the cell content. It is also the only way to customize the cell value without changing the row data. It should be used when you need to derive the cell value from the row data. Common use cases are: -- Transforming the value (e.g. convert a decimal value to a percentage value) -- Deriving the value from multiple fields (e.g. concatenating first name and last name) -- Deriving the value from a nested field (e.g. `user.address.city`) +- Transforming the value (for example convert a decimal value to a percentage value) +- Deriving the value from multiple fields (for example concatenating first name and last name) +- Deriving the value from a nested field (for example `user.address.city`) This value is also used internally in the Grid to filter, sort, and render (if no `renderCell` or `valueFormatter` is provided). You can learn more about it in the [value getter](/x/react-data-grid/column-definition/#value-getter) section. diff --git a/docs/data/data-grid/filtering/index.md b/docs/data/data-grid/filtering/index.md index c0787c6afdfa..48f73b927bd8 100644 --- a/docs/data/data-grid/filtering/index.md +++ b/docs/data/data-grid/filtering/index.md @@ -36,7 +36,7 @@ A filter item represents a filtering rule and is composed of several elements: - `filterItem.field`: the field on which the rule applies. - `filterItem.value`: the value to look for. -- `filterItem.operator`: name of the operator method to use (e.g. _contains_), matches the `value` key of the operator object. +- `filterItem.operator`: name of the operator method to use (for example _contains_), matches the `value` key of the operator object. - `filterItem.id` ([](/x/introduction/licensing/#pro-plan 'Pro plan')): required when multiple filter items are used. :::info diff --git a/docs/data/data-grid/master-detail/master-detail.md b/docs/data/data-grid/master-detail/master-detail.md index b897a7f8d5c6..ac3cec8269b8 100644 --- a/docs/data/data-grid/master-detail/master-detail.md +++ b/docs/data/data-grid/master-detail/master-detail.md @@ -111,7 +111,7 @@ If this is not sufficient, the entire toggle component can be overridden. To fully customize it, add another column with `field: GRID_DETAIL_PANEL_TOGGLE_FIELD` to your set of columns. The grid will detect that there is already a toggle column defined and it will not add another toggle in the default position. The new toggle component can be provided via [`renderCell`](/x/react-data-grid/column-definition/#rendering-cells) in the same as any other column. -By only setting the `field`, is up to you to configure the remaining options (e.g. disable the column menu, filtering, sorting). +By only setting the `field`, is up to you to configure the remaining options (for example disable the column menu, filtering, sorting). To already start with a few suggested options configured, spread `GRID_DETAIL_PANEL_TOGGLE_COL_DEF` when defining the column. ```tsx diff --git a/docs/data/data-grid/overview/overview.md b/docs/data/data-grid/overview/overview.md index 1d573d2e0e0d..cec6d0fa1ed2 100644 --- a/docs/data/data-grid/overview/overview.md +++ b/docs/data/data-grid/overview/overview.md @@ -51,7 +51,7 @@ import { DataGridPro } from '@mui/x-data-grid-pro'; ### Premium plan [](/x/introduction/licensing/#premium-plan 'Premium plan') -The Premium version includes everything from Pro, as well as advanced features for data analysis and large dataset management, like row grouping with aggregation functions (e.g., Sum) and the ability to export to Excel files. +The Premium version includes everything from Pro, as well as advanced features for data analysis and large dataset management, like row grouping with aggregation functions (for example "Sum") and the ability to export to Excel files. You can visit the [showcase page](/x/react-data-grid/demo/) for a comprehensible overview of all features exclusive to this plan. diff --git a/docs/data/data-grid/row-grouping/row-grouping.md b/docs/data/data-grid/row-grouping/row-grouping.md index a8a5c8ae0b23..bb7aca8496d3 100644 --- a/docs/data/data-grid/row-grouping/row-grouping.md +++ b/docs/data/data-grid/row-grouping/row-grouping.md @@ -305,7 +305,7 @@ If you are dynamically switching the `leafField` or `mainGroupingCriteria`, the ## Get the rows in a group You can use the `apiRef.current.getRowGroupChildren` method to get the id of all rows contained in a group. -It will not contain the autogenerated rows (i.e. the subgroup rows or the aggregation footers). +It will not contain the autogenerated rows (that is the subgroup rows or the aggregation footers). ```ts const rows: GridRowId[] = apiRef.current.getRowGroupChildren({ diff --git a/docs/data/data-grid/row-ordering/row-ordering.md b/docs/data/data-grid/row-ordering/row-ordering.md index 09e3922d1b2f..b4cd6e75930f 100644 --- a/docs/data/data-grid/row-ordering/row-ordering.md +++ b/docs/data/data-grid/row-ordering/row-ordering.md @@ -57,7 +57,7 @@ To change the icon used for the row reordering, you can provide a different comp Another way to customize is to add a column with `field: __reorder__` to your set of columns. That way, you can overwrite any of the properties from the `GRID_REORDER_COL_DEF` column. The grid will detect that there is already a reorder column defined and it will not add another one in the default position. -If you only set the `field`, then it is up to you to configure the remaining options (e.g. disable the column menu, filtering, sorting). +If you only set the `field`, then it is up to you to configure the remaining options (for example disable the column menu, filtering, sorting). To start with our suggested configuration, spread `GRID_REORDER_COL_DEF` when defining the column. ```tsx diff --git a/docs/data/data-grid/row-updates/row-updates.md b/docs/data/data-grid/row-updates/row-updates.md index 02d6e165843f..e1b8e9680284 100644 --- a/docs/data/data-grid/row-updates/row-updates.md +++ b/docs/data/data-grid/row-updates/row-updates.md @@ -41,7 +41,7 @@ In addition, the area in which `onRowsScrollEnd` is called can be changed using {{"demo": "InfiniteLoadingGrid.js", "bg": "inline", "disableAd": true}} :::info -For sorting and filtering to work properly with the infinite loading, they should be applied on the server side. +For sorting and filtering to work properly with the infinite loading, they should be applied on the server-side. Otherwise, the sorting and filtering will only be applied to the subset of rows that have been loaded. ::: diff --git a/docs/data/data-grid/server-side-data/aggregation.md b/docs/data/data-grid/server-side-data/aggregation.md index fdbaf839ca6f..99b226b77770 100644 --- a/docs/data/data-grid/server-side-data/aggregation.md +++ b/docs/data/data-grid/server-side-data/aggregation.md @@ -4,7 +4,7 @@ title: React Server-side row grouping # Data Grid - Server-side aggregation [](/x/introduction/licensing/#premium-plan 'Premium plan')🚧 -

Aggregation with server side data source.

+

Aggregation with server-side data source.

:::warning This feature isn't implemented yet. It's coming. diff --git a/docs/data/data-grid/server-side-data/index.md b/docs/data/data-grid/server-side-data/index.md index 13ee31d9b005..a626f60d7c3c 100644 --- a/docs/data/data-grid/server-side-data/index.md +++ b/docs/data/data-grid/server-side-data/index.md @@ -63,7 +63,7 @@ This example only scratches the surface with a lot of problems still unsolved li - Performance optimization - Caching data/deduping requests - More complex use-cases on the server like grouping, tree data, etc. -- Server side row editing +- Server-side row editing - Lazy loading of data - Handling updates to the data like row editing, row deletion, etc. - Refetching data on-demand @@ -182,7 +182,7 @@ interface GetRowsResponse { rows: GridRowModel[]; /** * To reflect updates in total `rowCount` (optional) - * Useful when the `rowCount` is inaccurate (e.g. when filtering) or not available upfront + * Useful when the `rowCount` is inaccurate (for example when filtering) or not available upfront */ rowCount?: number; /** diff --git a/docs/data/data-grid/server-side-data/infinite-loading.md b/docs/data/data-grid/server-side-data/infinite-loading.md index c317a2bb4fd2..d2bcc0e58d03 100644 --- a/docs/data/data-grid/server-side-data/infinite-loading.md +++ b/docs/data/data-grid/server-side-data/infinite-loading.md @@ -4,7 +4,7 @@ title: React Server-side infinite loading # Data Grid - Server-side infinite loading [](/x/introduction/licensing/#pro-plan 'Pro plan')🚧 -

Row infinite loading with server side data source.

+

Row infinite loading with server-side data source.

:::warning This feature isn't implemented yet. It's coming. diff --git a/docs/data/data-grid/server-side-data/lazy-loading.md b/docs/data/data-grid/server-side-data/lazy-loading.md index 849d0c9ba721..6c66183ab0e6 100644 --- a/docs/data/data-grid/server-side-data/lazy-loading.md +++ b/docs/data/data-grid/server-side-data/lazy-loading.md @@ -4,7 +4,7 @@ title: React Server-side lazy loading # Data Grid - Server-side lazy loading [](/x/introduction/licensing/#pro-plan 'Pro plan')🚧 -

Row lazy-loading with server side data source.

+

Row lazy-loading with server-side data source.

:::warning This feature isn't implemented yet. It's coming. diff --git a/docs/data/data-grid/server-side-data/row-grouping.md b/docs/data/data-grid/server-side-data/row-grouping.md index 3dd487f34f27..537ef8ad0d54 100644 --- a/docs/data/data-grid/server-side-data/row-grouping.md +++ b/docs/data/data-grid/server-side-data/row-grouping.md @@ -4,7 +4,7 @@ title: React Server-side row grouping # Data Grid - Server-side row grouping [](/x/introduction/licensing/#pro-plan 'Pro plan')🚧 -

Lazy-loaded row grouping with server side data source.

+

Lazy-loaded row grouping with server-side data source.

:::warning This feature isn't implemented yet. It's coming. diff --git a/docs/data/data-grid/server-side-data/tree-data.md b/docs/data/data-grid/server-side-data/tree-data.md index 7ce5524f9c16..ba9d93e36719 100644 --- a/docs/data/data-grid/server-side-data/tree-data.md +++ b/docs/data/data-grid/server-side-data/tree-data.md @@ -4,7 +4,7 @@ title: React Server-side tree data # Data Grid - Server-side tree data [](/x/introduction/licensing/#pro-plan 'Pro plan')🚧 -

Tree data lazy-loading with server side data source.

+

Tree data lazy-loading with server-side data source.

:::warning This feature isn't implemented yet. It's coming. diff --git a/docs/data/data-grid/state/state.md b/docs/data/data-grid/state/state.md index 8ba74653c21d..8555125b1009 100644 --- a/docs/data/data-grid/state/state.md +++ b/docs/data/data-grid/state/state.md @@ -11,7 +11,7 @@ This prop has the same format as the returned value of `apiRef.current.exportSta The `initialState` can only be used to set the initial value of the state. The Data Grid will not react if you change the `initialState` value later on. -If you need to fully control specific models, use the control props instead (e.g. [`prop.filterModel`](/x/react-data-grid/filtering/#controlled-filters) or [`prop.sortModel`](https://mui.com/x/react-data-grid/sorting/#controlled-sort-model)). +If you need to fully control specific models, use the control props instead (for example [`prop.filterModel`](/x/react-data-grid/filtering/#controlled-filters) or [`prop.sortModel`](https://mui.com/x/react-data-grid/sorting/#controlled-sort-model)). You can find more information on the corresponding feature documentation page. ::: @@ -96,7 +96,7 @@ If you restore the page using `initialState` before the data is fetched, the Dat ### Save and restore the state from external storage -You can use `apiRef.current.exportState()` to save a snapshot of the state to an external storage (e.g. using local storage or redux). +You can use `apiRef.current.exportState()` to save a snapshot of the state to an external storage (for example using local storage or redux). This way the state can be persisted on refresh or navigating to another page. In the following demo, the state is saved to `localStorage` and restored when the page is refreshed. diff --git a/docs/data/data-grid/virtualization/virtualization.md b/docs/data/data-grid/virtualization/virtualization.md index 7ee018b63d75..201affbcfc9f 100644 --- a/docs/data/data-grid/virtualization/virtualization.md +++ b/docs/data/data-grid/virtualization/virtualization.md @@ -27,7 +27,7 @@ By default, 2 columns are rendered outside of the viewport. You can change this {{"demo": "ColumnVirtualizationGrid.js", "bg": "inline"}} -You can disable column virtualization by setting the column buffer to a higher number than the number of rendered columns, e.g. with `columnBuffer={columns.length}` or `columnBuffer={Number.MAX_SAFE_INTEGER}`. +You can disable column virtualization by setting the column buffer to a higher number than the number of rendered columns, for example with `columnBuffer={columns.length}` or `columnBuffer={Number.MAX_SAFE_INTEGER}`. ## Disable virtualization diff --git a/docs/data/date-pickers/adapters-locale/FieldPlaceholder.js b/docs/data/date-pickers/adapters-locale/FieldPlaceholder.js index 3d6d7780f630..75c82c1dfd6b 100644 --- a/docs/data/date-pickers/adapters-locale/FieldPlaceholder.js +++ b/docs/data/date-pickers/adapters-locale/FieldPlaceholder.js @@ -19,7 +19,7 @@ export default function FieldPlaceholder() { dateAdapter={AdapterDayjs} // Define the date locale to have the right format `day.month.year`. adapterLocale="de" - // Define the translations to have the right placeholders (e.g. `JJJJ` for the year). + // Define the translations to have the right placeholders (for example `JJJJ` for the year). localeText={germanLocale} > diff --git a/docs/data/date-pickers/adapters-locale/FieldPlaceholder.tsx b/docs/data/date-pickers/adapters-locale/FieldPlaceholder.tsx index 3d6d7780f630..75c82c1dfd6b 100644 --- a/docs/data/date-pickers/adapters-locale/FieldPlaceholder.tsx +++ b/docs/data/date-pickers/adapters-locale/FieldPlaceholder.tsx @@ -19,7 +19,7 @@ export default function FieldPlaceholder() { dateAdapter={AdapterDayjs} // Define the date locale to have the right format `day.month.year`. adapterLocale="de" - // Define the translations to have the right placeholders (e.g. `JJJJ` for the year). + // Define the translations to have the right placeholders (for example `JJJJ` for the year). localeText={germanLocale} > diff --git a/docs/data/date-pickers/adapters-locale/FieldPlaceholder.tsx.preview b/docs/data/date-pickers/adapters-locale/FieldPlaceholder.tsx.preview index 75dfaceb1063..eba9949fe496 100644 --- a/docs/data/date-pickers/adapters-locale/FieldPlaceholder.tsx.preview +++ b/docs/data/date-pickers/adapters-locale/FieldPlaceholder.tsx.preview @@ -7,7 +7,7 @@ dateAdapter={AdapterDayjs} // Define the date locale to have the right format `day.month.year`. adapterLocale="de" - // Define the translations to have the right placeholders (e.g. `JJJJ` for the year). + // Define the translations to have the right placeholders (for example `JJJJ` for the year). localeText={germanLocale} > diff --git a/docs/data/date-pickers/adapters-locale/adapters-locale.md b/docs/data/date-pickers/adapters-locale/adapters-locale.md index 6bf74e5efefa..6ab1f2944f39 100644 --- a/docs/data/date-pickers/adapters-locale/adapters-locale.md +++ b/docs/data/date-pickers/adapters-locale/adapters-locale.md @@ -96,7 +96,7 @@ import 'moment/locale/de'; ## Meridiem — 12h/24h format -All the time and datetime components will automatically adjust to the locale's time setting, i.e. the 12-hour or 24-hour format. +All the time and datetime components will automatically adjust to the locale's time setting, that is the 12-hour or 24-hour format. You can override the default setting with the `ampm` prop: {{"demo": "AmPMCustomization.js"}} @@ -141,7 +141,7 @@ Here is the list of the currently supported formats: - The month - ✅ 1-based digit (e.g: `08`) - - ✅ Multi-letter values (e.g. `Aug`, `August`) + - ✅ Multi-letter values (for example `Aug`, `August`) - ❌ 1-letter values (e.g: `A`) because several months are represented with the same letter - The day of the month diff --git a/docs/data/date-pickers/base-concepts/base-concepts.md b/docs/data/date-pickers/base-concepts/base-concepts.md index 53befcef5c33..04ae6a33fa60 100644 --- a/docs/data/date-pickers/base-concepts/base-concepts.md +++ b/docs/data/date-pickers/base-concepts/base-concepts.md @@ -65,12 +65,12 @@ The demo below shows each one of them using their field component: Each _Picker_ is available in a responsive, desktop and mobile variant: -- The responsive component (e.g. `DatePicker`) which renders the desktop component or the mobile one depending on the device it runs on. +- The responsive component (for example `DatePicker`) which renders the desktop component or the mobile one depending on the device it runs on. -- The desktop component (e.g. `DesktopDatePicker`) which works best for mouse devices and large screens. +- The desktop component (for example `DesktopDatePicker`) which works best for mouse devices and large screens. It renders the views inside a popover and allows editing values directly inside the field. -- The mobile component (e.g. `MobileDatePicker`) which works best for touch devices and small screens. +- The mobile component (for example `MobileDatePicker`) which works best for touch devices and small screens. It renders the view inside a modal and does not allow editing values directly inside the field. {{"demo": "ResponsivePickers.js"}} @@ -151,7 +151,7 @@ Importing it from `@mui/x-date-pickers-pro` is enough. ### Responsive components :::info -Some test environments (i.e. `jsdom`) do not support media query. In such cases, components will be rendered in desktop mode. To modify this behavior you can fake the `window.matchMedia`. +Some test environments (for example `jsdom`) do not support media query. In such cases, components will be rendered in desktop mode. To modify this behavior you can fake the `window.matchMedia`. ::: Be aware that running tests in headless browsers might not pass the default mediaQuery (`pointer: fine`). diff --git a/docs/data/date-pickers/date-calendar/date-calendar.md b/docs/data/date-pickers/date-calendar/date-calendar.md index f8dfa6e61c3a..e17b9b09779e 100644 --- a/docs/data/date-pickers/date-calendar/date-calendar.md +++ b/docs/data/date-pickers/date-calendar/date-calendar.md @@ -91,7 +91,7 @@ You can select the whole week using the `day` component slot: ## Dynamic data Sometimes it may be necessary to display additional info right in the calendar. -The following demo shows how to add a badge on some day based on server side data: +The following demo shows how to add a badge on some day based on server-side data: {{"demo": "DateCalendarServerRequest.js"}} diff --git a/docs/data/date-pickers/date-picker/date-picker.md b/docs/data/date-pickers/date-picker/date-picker.md index 24099daa4407..3c56bd50b127 100644 --- a/docs/data/date-pickers/date-picker/date-picker.md +++ b/docs/data/date-pickers/date-picker/date-picker.md @@ -88,7 +88,7 @@ Use the `openTo` prop to change this behavior: :::success The views will appear in the order defined by the `views` array. If the view defined in `openTo` is not the first view, then the views before will not be included in the default flow -(e.g. view the default behaviors, the `year` is only accessible when clicking on the toolbar). +(for example view the default behaviors, the `year` is only accessible when clicking on the toolbar). ::: ## Landscape orientation diff --git a/docs/data/date-pickers/date-time-picker/date-time-picker.md b/docs/data/date-pickers/date-time-picker/date-time-picker.md index 1ffbfa0388d2..075ec25dd156 100644 --- a/docs/data/date-pickers/date-time-picker/date-time-picker.md +++ b/docs/data/date-pickers/date-time-picker/date-time-picker.md @@ -90,7 +90,7 @@ Use the `openTo` prop to change this behavior: :::success The views will appear in the order defined by the `views` array. If the view defined in `openTo` is not the first view, then the views before will not be included in the default flow -(e.g. view the default behaviors, the `year` is only accessible when clicking on the toolbar). +(for example view the default behaviors, the `year` is only accessible when clicking on the toolbar). ::: ## Landscape orientation diff --git a/docs/data/date-pickers/digital-clock/digital-clock.md b/docs/data/date-pickers/digital-clock/digital-clock.md index 535650aecf9c..4e3f2f39061c 100644 --- a/docs/data/date-pickers/digital-clock/digital-clock.md +++ b/docs/data/date-pickers/digital-clock/digital-clock.md @@ -52,7 +52,7 @@ Views will appear in the order they're included in the `views` array. ## 12h/24h format -The components use the hour format of the locale's time setting, i.e. the 12-hour or 24-hour format. +The components use the hour format of the locale's time setting, that is the 12-hour or 24-hour format. You can force a specific format using the `ampm` prop. @@ -77,7 +77,7 @@ The prop accepts: ## Skip rendering disabled options -With the `skipDisabled` prop, the components don't render options that are not available to the user (e.g. through `minTime`, `maxTime`, `shouldDisabledTime` etc.). +With the `skipDisabled` prop, the components don't render options that are not available to the user (for example through `minTime`, `maxTime`, `shouldDisabledTime` etc.). The following example combines these properties to customize which options are rendered. diff --git a/docs/data/date-pickers/time-clock/time-clock.md b/docs/data/date-pickers/time-clock/time-clock.md index 042a32a60af5..9f545b257e10 100644 --- a/docs/data/date-pickers/time-clock/time-clock.md +++ b/docs/data/date-pickers/time-clock/time-clock.md @@ -46,7 +46,7 @@ Views will appear in the order they're included in the `views` array. ## 12h/24h format -The component uses the hour format of the locale's time setting, i.e. the 12-hour or 24-hour format. +The component uses the hour format of the locale's time setting, that is the 12-hour or 24-hour format. You can force a specific format using the `ampm` prop. diff --git a/docs/data/introduction/installation/installation.md b/docs/data/introduction/installation/installation.md index 46f58f64c82f..2b47b9ea9802 100644 --- a/docs/data/introduction/installation/installation.md +++ b/docs/data/introduction/installation/installation.md @@ -11,6 +11,6 @@ MUI X components have a peer dependency on `@mui/material`: the installation [i ## Components -Note that you only need to install the packages corresponding to the components you're using—e.g., Data Grid users don't need to install the Date and Time Pickers. +Note that you only need to install the packages corresponding to the components you're using—for example Data Grid users don't need to install the Date and Time Pickers. {{"component": "modules/components/InstallationGrid.js"}} diff --git a/docs/data/introduction/licensing/licensing.md b/docs/data/introduction/licensing/licensing.md index 6764647c3953..13bd5aecba8c 100644 --- a/docs/data/introduction/licensing/licensing.md +++ b/docs/data/introduction/licensing/licensing.md @@ -221,7 +221,7 @@ While we recommend hard-coding the license key in git, you can also use an envir This method is required if your codebase is "source-available" (to hide the license key), and can be preferred if you want to granularly share the license key with your licensed developers. ::: -The license key is validated on the server and client side so you must expose the environment variable to the browser. +The license key is validated on the server and client-side so you must expose the environment variable to the browser. To do this, you need to prefix the environment variables with `NEXT_PUBLIC_` as explained in the [Next.js documentation](https://nextjs.org/docs/app/building-your-application/configuring/environment-variables#bundling-environment-variables-for-the-browser): ```tsx diff --git a/docs/data/migration/migration-data-grid-v4/migration-data-grid-v4.md b/docs/data/migration/migration-data-grid-v4/migration-data-grid-v4.md index 3f171622cafb..c3c64e54780c 100644 --- a/docs/data/migration/migration-data-grid-v4/migration-data-grid-v4.md +++ b/docs/data/migration/migration-data-grid-v4/migration-data-grid-v4.md @@ -31,8 +31,8 @@ Using Material UI v4 with v5 can be achieved with the following steps: import { createGenerateClassName } from '@material-ui/core/styles'; const generateClassName = createGenerateClassName({ - // By enabling this option, if you have non-MUI elements (e.g. `
`) - // using MUI classes (e.g. `.MuiButton`) they will lose styles. + // By enabling this option, if you have non-MUI elements (for example `
`) + // using MUI classes (for example `.MuiButton`) they will lose styles. // Make sure to convert them to use `styled()` or `` first. disableGlobal: true, // Class names will receive this seed to avoid name collisions. @@ -234,7 +234,7 @@ To use the v5 version of MUI X, you first need to update to the new package nam You can use the new `initialState` prop instead. Note that `initialState` only allows the `preferencePanel`, `filter.filterModel` and `sort.sortModel` keys. - To fully control the state, use the feature's model prop and change callback (e.g. `filterModel` and `onFilterModelChange`). + To fully control the state, use the feature's model prop and change callback (for example `filterModel` and `onFilterModelChange`). ```diff = { /** - * Name of the prop, e.g. 'children' + * Name of the prop, for example 'children' */ propName: Extract; /** diff --git a/docs/src/modules/utils/postProcessImport.ts b/docs/src/modules/utils/postProcessImport.ts index 9418831f9930..6366a0be16c0 100644 --- a/docs/src/modules/utils/postProcessImport.ts +++ b/docs/src/modules/utils/postProcessImport.ts @@ -21,7 +21,7 @@ export const ADAPTER_TO_LIBRARY: Record = { const PICKERS_ADAPTER_REGEX = /^@mui\/(lab|x-date-pickers(?:-pro)?)\/(?Adapter.*)/; export const postProcessImport = (importName: string): Record | null => { - // e.g. date-fns + // for example date-fns const dateAdapterMatch = PICKERS_ADAPTER_REGEX.exec(importName); if (dateAdapterMatch !== null) { /** diff --git a/docs/translations/api-docs/date-pickers/date-calendar/date-calendar.json b/docs/translations/api-docs/date-pickers/date-calendar/date-calendar.json index 7c2a6f4423f0..4fb2face3be8 100644 --- a/docs/translations/api-docs/date-pickers/date-calendar/date-calendar.json +++ b/docs/translations/api-docs/date-pickers/date-calendar/date-calendar.json @@ -78,7 +78,7 @@ "typeDescriptions": { "React.ReactNode": "The node to render when loading." } }, "shouldDisableDate": { - "description": "Disable specific date.
Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", + "description": "Disable specific date.
Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", "typeDescriptions": { "day": "The date to test.", "boolean": "If true the date will be disabled." diff --git a/docs/translations/api-docs/date-pickers/date-field/date-field.json b/docs/translations/api-docs/date-pickers/date-field/date-field.json index 8b90f9e6a9bf..e023b91557cb 100644 --- a/docs/translations/api-docs/date-pickers/date-field/date-field.json +++ b/docs/translations/api-docs/date-pickers/date-field/date-field.json @@ -89,7 +89,7 @@ "description": "The currently selected sections. This prop accepts four formats: 1. If a number is provided, the section at this index will be selected. 2. If a string of type FieldSectionType is provided, the first section with that name will be selected. 3. If "all" is provided, all the sections will be selected. 4. If null is provided, no section will be selected. If not provided, the selected sections will be handled internally." }, "shouldDisableDate": { - "description": "Disable specific date.
Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", + "description": "Disable specific date.
Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", "typeDescriptions": { "day": "The date to test.", "boolean": "If true the date will be disabled." diff --git a/docs/translations/api-docs/date-pickers/date-picker/date-picker.json b/docs/translations/api-docs/date-pickers/date-picker/date-picker.json index 3e108cea8718..b668d9cce6fa 100644 --- a/docs/translations/api-docs/date-pickers/date-picker/date-picker.json +++ b/docs/translations/api-docs/date-pickers/date-picker/date-picker.json @@ -116,7 +116,7 @@ "description": "The currently selected sections. This prop accepts four formats: 1. If a number is provided, the section at this index will be selected. 2. If a string of type FieldSectionType is provided, the first section with that name will be selected. 3. If "all" is provided, all the sections will be selected. 4. If null is provided, no section will be selected. If not provided, the selected sections will be handled internally." }, "shouldDisableDate": { - "description": "Disable specific date.
Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", + "description": "Disable specific date.
Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", "typeDescriptions": { "day": "The date to test.", "boolean": "If true the date will be disabled." diff --git a/docs/translations/api-docs/date-pickers/date-range-calendar/date-range-calendar.json b/docs/translations/api-docs/date-pickers/date-range-calendar/date-range-calendar.json index 818fb79cac8f..f8ea0bbeb6f7 100644 --- a/docs/translations/api-docs/date-pickers/date-range-calendar/date-range-calendar.json +++ b/docs/translations/api-docs/date-pickers/date-range-calendar/date-range-calendar.json @@ -94,7 +94,7 @@ "typeDescriptions": { "React.ReactNode": "The node to render when loading." } }, "shouldDisableDate": { - "description": "Disable specific date.
Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", + "description": "Disable specific date.
Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", "typeDescriptions": { "day": "The date to test.", "position": "The date to test, 'start' or 'end'.", diff --git a/docs/translations/api-docs/date-pickers/date-range-picker/date-range-picker.json b/docs/translations/api-docs/date-pickers/date-range-picker/date-range-picker.json index a13177b244d0..c611e6d21646 100644 --- a/docs/translations/api-docs/date-pickers/date-range-picker/date-range-picker.json +++ b/docs/translations/api-docs/date-pickers/date-range-picker/date-range-picker.json @@ -125,7 +125,7 @@ "description": "The currently selected sections. This prop accepts four formats: 1. If a number is provided, the section at this index will be selected. 2. If a string of type FieldSectionType is provided, the first section with that name will be selected. 3. If "all" is provided, all the sections will be selected. 4. If null is provided, no section will be selected. If not provided, the selected sections will be handled internally." }, "shouldDisableDate": { - "description": "Disable specific date.
Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", + "description": "Disable specific date.
Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", "typeDescriptions": { "day": "The date to test.", "position": "The date to test, 'start' or 'end'.", diff --git a/docs/translations/api-docs/date-pickers/date-time-field/date-time-field.json b/docs/translations/api-docs/date-pickers/date-time-field/date-time-field.json index bcabb346acaa..4e77982370d0 100644 --- a/docs/translations/api-docs/date-pickers/date-time-field/date-time-field.json +++ b/docs/translations/api-docs/date-pickers/date-time-field/date-time-field.json @@ -106,7 +106,7 @@ "description": "The currently selected sections. This prop accepts four formats: 1. If a number is provided, the section at this index will be selected. 2. If a string of type FieldSectionType is provided, the first section with that name will be selected. 3. If "all" is provided, all the sections will be selected. 4. If null is provided, no section will be selected. If not provided, the selected sections will be handled internally." }, "shouldDisableDate": { - "description": "Disable specific date.
Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", + "description": "Disable specific date.
Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", "typeDescriptions": { "day": "The date to test.", "boolean": "If true the date will be disabled." diff --git a/docs/translations/api-docs/date-pickers/date-time-picker/date-time-picker.json b/docs/translations/api-docs/date-pickers/date-time-picker/date-time-picker.json index 2b5be2cd1191..ed02c1200ef9 100644 --- a/docs/translations/api-docs/date-pickers/date-time-picker/date-time-picker.json +++ b/docs/translations/api-docs/date-pickers/date-time-picker/date-time-picker.json @@ -136,7 +136,7 @@ "description": "The currently selected sections. This prop accepts four formats: 1. If a number is provided, the section at this index will be selected. 2. If a string of type FieldSectionType is provided, the first section with that name will be selected. 3. If "all" is provided, all the sections will be selected. 4. If null is provided, no section will be selected. If not provided, the selected sections will be handled internally." }, "shouldDisableDate": { - "description": "Disable specific date.
Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", + "description": "Disable specific date.
Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", "typeDescriptions": { "day": "The date to test.", "boolean": "If true the date will be disabled." diff --git a/docs/translations/api-docs/date-pickers/date-time-range-picker/date-time-range-picker.json b/docs/translations/api-docs/date-pickers/date-time-range-picker/date-time-range-picker.json index 7a822c7ee04f..0f72e517db20 100644 --- a/docs/translations/api-docs/date-pickers/date-time-range-picker/date-time-range-picker.json +++ b/docs/translations/api-docs/date-pickers/date-time-range-picker/date-time-range-picker.json @@ -149,7 +149,7 @@ "description": "The currently selected sections. This prop accepts four formats: 1. If a number is provided, the section at this index will be selected. 2. If a string of type FieldSectionType is provided, the first section with that name will be selected. 3. If "all" is provided, all the sections will be selected. 4. If null is provided, no section will be selected. If not provided, the selected sections will be handled internally." }, "shouldDisableDate": { - "description": "Disable specific date.
Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", + "description": "Disable specific date.
Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", "typeDescriptions": { "day": "The date to test.", "position": "The date to test, 'start' or 'end'.", diff --git a/docs/translations/api-docs/date-pickers/desktop-date-picker/desktop-date-picker.json b/docs/translations/api-docs/date-pickers/desktop-date-picker/desktop-date-picker.json index e97a6a69024f..b79689614dc6 100644 --- a/docs/translations/api-docs/date-pickers/desktop-date-picker/desktop-date-picker.json +++ b/docs/translations/api-docs/date-pickers/desktop-date-picker/desktop-date-picker.json @@ -113,7 +113,7 @@ "description": "The currently selected sections. This prop accepts four formats: 1. If a number is provided, the section at this index will be selected. 2. If a string of type FieldSectionType is provided, the first section with that name will be selected. 3. If "all" is provided, all the sections will be selected. 4. If null is provided, no section will be selected. If not provided, the selected sections will be handled internally." }, "shouldDisableDate": { - "description": "Disable specific date.
Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", + "description": "Disable specific date.
Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", "typeDescriptions": { "day": "The date to test.", "boolean": "If true the date will be disabled." diff --git a/docs/translations/api-docs/date-pickers/desktop-date-range-picker/desktop-date-range-picker.json b/docs/translations/api-docs/date-pickers/desktop-date-range-picker/desktop-date-range-picker.json index 619d7999ae43..37f5382422fb 100644 --- a/docs/translations/api-docs/date-pickers/desktop-date-range-picker/desktop-date-range-picker.json +++ b/docs/translations/api-docs/date-pickers/desktop-date-range-picker/desktop-date-range-picker.json @@ -122,7 +122,7 @@ "description": "The currently selected sections. This prop accepts four formats: 1. If a number is provided, the section at this index will be selected. 2. If a string of type FieldSectionType is provided, the first section with that name will be selected. 3. If "all" is provided, all the sections will be selected. 4. If null is provided, no section will be selected. If not provided, the selected sections will be handled internally." }, "shouldDisableDate": { - "description": "Disable specific date.
Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", + "description": "Disable specific date.
Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", "typeDescriptions": { "day": "The date to test.", "position": "The date to test, 'start' or 'end'.", diff --git a/docs/translations/api-docs/date-pickers/desktop-date-time-picker/desktop-date-time-picker.json b/docs/translations/api-docs/date-pickers/desktop-date-time-picker/desktop-date-time-picker.json index 5b1bd9b0032a..31eb2d4af4ac 100644 --- a/docs/translations/api-docs/date-pickers/desktop-date-time-picker/desktop-date-time-picker.json +++ b/docs/translations/api-docs/date-pickers/desktop-date-time-picker/desktop-date-time-picker.json @@ -133,7 +133,7 @@ "description": "The currently selected sections. This prop accepts four formats: 1. If a number is provided, the section at this index will be selected. 2. If a string of type FieldSectionType is provided, the first section with that name will be selected. 3. If "all" is provided, all the sections will be selected. 4. If null is provided, no section will be selected. If not provided, the selected sections will be handled internally." }, "shouldDisableDate": { - "description": "Disable specific date.
Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", + "description": "Disable specific date.
Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", "typeDescriptions": { "day": "The date to test.", "boolean": "If true the date will be disabled." diff --git a/docs/translations/api-docs/date-pickers/desktop-date-time-range-picker/desktop-date-time-range-picker.json b/docs/translations/api-docs/date-pickers/desktop-date-time-range-picker/desktop-date-time-range-picker.json index 84238b6d79e3..0ab25ea155fd 100644 --- a/docs/translations/api-docs/date-pickers/desktop-date-time-range-picker/desktop-date-time-range-picker.json +++ b/docs/translations/api-docs/date-pickers/desktop-date-time-range-picker/desktop-date-time-range-picker.json @@ -146,7 +146,7 @@ "description": "The currently selected sections. This prop accepts four formats: 1. If a number is provided, the section at this index will be selected. 2. If a string of type FieldSectionType is provided, the first section with that name will be selected. 3. If "all" is provided, all the sections will be selected. 4. If null is provided, no section will be selected. If not provided, the selected sections will be handled internally." }, "shouldDisableDate": { - "description": "Disable specific date.
Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", + "description": "Disable specific date.
Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", "typeDescriptions": { "day": "The date to test.", "position": "The date to test, 'start' or 'end'.", diff --git a/docs/translations/api-docs/date-pickers/mobile-date-picker/mobile-date-picker.json b/docs/translations/api-docs/date-pickers/mobile-date-picker/mobile-date-picker.json index bec2bd8dfdde..1e0eaf91dca0 100644 --- a/docs/translations/api-docs/date-pickers/mobile-date-picker/mobile-date-picker.json +++ b/docs/translations/api-docs/date-pickers/mobile-date-picker/mobile-date-picker.json @@ -113,7 +113,7 @@ "description": "The currently selected sections. This prop accepts four formats: 1. If a number is provided, the section at this index will be selected. 2. If a string of type FieldSectionType is provided, the first section with that name will be selected. 3. If "all" is provided, all the sections will be selected. 4. If null is provided, no section will be selected. If not provided, the selected sections will be handled internally." }, "shouldDisableDate": { - "description": "Disable specific date.
Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", + "description": "Disable specific date.
Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", "typeDescriptions": { "day": "The date to test.", "boolean": "If true the date will be disabled." diff --git a/docs/translations/api-docs/date-pickers/mobile-date-range-picker/mobile-date-range-picker.json b/docs/translations/api-docs/date-pickers/mobile-date-range-picker/mobile-date-range-picker.json index 8f7d5c9375e2..030601daceb3 100644 --- a/docs/translations/api-docs/date-pickers/mobile-date-range-picker/mobile-date-range-picker.json +++ b/docs/translations/api-docs/date-pickers/mobile-date-range-picker/mobile-date-range-picker.json @@ -119,7 +119,7 @@ "description": "The currently selected sections. This prop accepts four formats: 1. If a number is provided, the section at this index will be selected. 2. If a string of type FieldSectionType is provided, the first section with that name will be selected. 3. If "all" is provided, all the sections will be selected. 4. If null is provided, no section will be selected. If not provided, the selected sections will be handled internally." }, "shouldDisableDate": { - "description": "Disable specific date.
Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", + "description": "Disable specific date.
Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", "typeDescriptions": { "day": "The date to test.", "position": "The date to test, 'start' or 'end'.", diff --git a/docs/translations/api-docs/date-pickers/mobile-date-time-picker/mobile-date-time-picker.json b/docs/translations/api-docs/date-pickers/mobile-date-time-picker/mobile-date-time-picker.json index d5ba4d1d7dad..0dec4b4e84de 100644 --- a/docs/translations/api-docs/date-pickers/mobile-date-time-picker/mobile-date-time-picker.json +++ b/docs/translations/api-docs/date-pickers/mobile-date-time-picker/mobile-date-time-picker.json @@ -133,7 +133,7 @@ "description": "The currently selected sections. This prop accepts four formats: 1. If a number is provided, the section at this index will be selected. 2. If a string of type FieldSectionType is provided, the first section with that name will be selected. 3. If "all" is provided, all the sections will be selected. 4. If null is provided, no section will be selected. If not provided, the selected sections will be handled internally." }, "shouldDisableDate": { - "description": "Disable specific date.
Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", + "description": "Disable specific date.
Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", "typeDescriptions": { "day": "The date to test.", "boolean": "If true the date will be disabled." diff --git a/docs/translations/api-docs/date-pickers/mobile-date-time-range-picker/mobile-date-time-range-picker.json b/docs/translations/api-docs/date-pickers/mobile-date-time-range-picker/mobile-date-time-range-picker.json index b2f99f529dbc..135c8a9594b2 100644 --- a/docs/translations/api-docs/date-pickers/mobile-date-time-range-picker/mobile-date-time-range-picker.json +++ b/docs/translations/api-docs/date-pickers/mobile-date-time-range-picker/mobile-date-time-range-picker.json @@ -143,7 +143,7 @@ "description": "The currently selected sections. This prop accepts four formats: 1. If a number is provided, the section at this index will be selected. 2. If a string of type FieldSectionType is provided, the first section with that name will be selected. 3. If "all" is provided, all the sections will be selected. 4. If null is provided, no section will be selected. If not provided, the selected sections will be handled internally." }, "shouldDisableDate": { - "description": "Disable specific date.
Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", + "description": "Disable specific date.
Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", "typeDescriptions": { "day": "The date to test.", "position": "The date to test, 'start' or 'end'.", diff --git a/docs/translations/api-docs/date-pickers/multi-input-date-range-field/multi-input-date-range-field.json b/docs/translations/api-docs/date-pickers/multi-input-date-range-field/multi-input-date-range-field.json index fde01a7e1b8d..3ca6292ec5f9 100644 --- a/docs/translations/api-docs/date-pickers/multi-input-date-range-field/multi-input-date-range-field.json +++ b/docs/translations/api-docs/date-pickers/multi-input-date-range-field/multi-input-date-range-field.json @@ -53,7 +53,7 @@ "description": "The currently selected sections. This prop accepts four formats: 1. If a number is provided, the section at this index will be selected. 2. If a string of type FieldSectionType is provided, the first section with that name will be selected. 3. If "all" is provided, all the sections will be selected. 4. If null is provided, no section will be selected. If not provided, the selected sections will be handled internally." }, "shouldDisableDate": { - "description": "Disable specific date.
Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", + "description": "Disable specific date.
Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", "typeDescriptions": { "day": "The date to test.", "position": "The date to test, 'start' or 'end'.", diff --git a/docs/translations/api-docs/date-pickers/multi-input-date-time-range-field/multi-input-date-time-range-field.json b/docs/translations/api-docs/date-pickers/multi-input-date-time-range-field/multi-input-date-time-range-field.json index c06fd6bdb261..f6be2a6546e2 100644 --- a/docs/translations/api-docs/date-pickers/multi-input-date-time-range-field/multi-input-date-time-range-field.json +++ b/docs/translations/api-docs/date-pickers/multi-input-date-time-range-field/multi-input-date-time-range-field.json @@ -70,7 +70,7 @@ "description": "The currently selected sections. This prop accepts four formats: 1. If a number is provided, the section at this index will be selected. 2. If a string of type FieldSectionType is provided, the first section with that name will be selected. 3. If "all" is provided, all the sections will be selected. 4. If null is provided, no section will be selected. If not provided, the selected sections will be handled internally." }, "shouldDisableDate": { - "description": "Disable specific date.
Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", + "description": "Disable specific date.
Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", "typeDescriptions": { "day": "The date to test.", "position": "The date to test, 'start' or 'end'.", diff --git a/docs/translations/api-docs/date-pickers/single-input-date-range-field/single-input-date-range-field.json b/docs/translations/api-docs/date-pickers/single-input-date-range-field/single-input-date-range-field.json index 04844904a07e..238caa628da9 100644 --- a/docs/translations/api-docs/date-pickers/single-input-date-range-field/single-input-date-range-field.json +++ b/docs/translations/api-docs/date-pickers/single-input-date-range-field/single-input-date-range-field.json @@ -89,7 +89,7 @@ "description": "The currently selected sections. This prop accepts four formats: 1. If a number is provided, the section at this index will be selected. 2. If a string of type FieldSectionType is provided, the first section with that name will be selected. 3. If "all" is provided, all the sections will be selected. 4. If null is provided, no section will be selected. If not provided, the selected sections will be handled internally." }, "shouldDisableDate": { - "description": "Disable specific date.
Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", + "description": "Disable specific date.
Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", "typeDescriptions": { "day": "The date to test.", "position": "The date to test, 'start' or 'end'.", diff --git a/docs/translations/api-docs/date-pickers/single-input-date-time-range-field/single-input-date-time-range-field.json b/docs/translations/api-docs/date-pickers/single-input-date-time-range-field/single-input-date-time-range-field.json index 61340a97f9b6..191ca78e1814 100644 --- a/docs/translations/api-docs/date-pickers/single-input-date-time-range-field/single-input-date-time-range-field.json +++ b/docs/translations/api-docs/date-pickers/single-input-date-time-range-field/single-input-date-time-range-field.json @@ -106,7 +106,7 @@ "description": "The currently selected sections. This prop accepts four formats: 1. If a number is provided, the section at this index will be selected. 2. If a string of type FieldSectionType is provided, the first section with that name will be selected. 3. If "all" is provided, all the sections will be selected. 4. If null is provided, no section will be selected. If not provided, the selected sections will be handled internally." }, "shouldDisableDate": { - "description": "Disable specific date.
Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", + "description": "Disable specific date.
Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", "typeDescriptions": { "day": "The date to test.", "position": "The date to test, 'start' or 'end'.", diff --git a/docs/translations/api-docs/date-pickers/static-date-picker/static-date-picker.json b/docs/translations/api-docs/date-pickers/static-date-picker/static-date-picker.json index 39559f2e8f02..b59bbd0f3453 100644 --- a/docs/translations/api-docs/date-pickers/static-date-picker/static-date-picker.json +++ b/docs/translations/api-docs/date-pickers/static-date-picker/static-date-picker.json @@ -88,7 +88,7 @@ "typeDescriptions": { "React.ReactNode": "The node to render when loading." } }, "shouldDisableDate": { - "description": "Disable specific date.
Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", + "description": "Disable specific date.
Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", "typeDescriptions": { "day": "The date to test.", "boolean": "If true the date will be disabled." diff --git a/docs/translations/api-docs/date-pickers/static-date-range-picker/static-date-range-picker.json b/docs/translations/api-docs/date-pickers/static-date-range-picker/static-date-range-picker.json index 97198fdef5c1..5c312fa77d83 100644 --- a/docs/translations/api-docs/date-pickers/static-date-range-picker/static-date-range-picker.json +++ b/docs/translations/api-docs/date-pickers/static-date-range-picker/static-date-range-picker.json @@ -93,7 +93,7 @@ "typeDescriptions": { "React.ReactNode": "The node to render when loading." } }, "shouldDisableDate": { - "description": "Disable specific date.
Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", + "description": "Disable specific date.
Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", "typeDescriptions": { "day": "The date to test.", "position": "The date to test, 'start' or 'end'.", diff --git a/docs/translations/api-docs/date-pickers/static-date-time-picker/static-date-time-picker.json b/docs/translations/api-docs/date-pickers/static-date-time-picker/static-date-time-picker.json index c50bd09bffb6..cda54bc81038 100644 --- a/docs/translations/api-docs/date-pickers/static-date-time-picker/static-date-time-picker.json +++ b/docs/translations/api-docs/date-pickers/static-date-time-picker/static-date-time-picker.json @@ -108,7 +108,7 @@ "typeDescriptions": { "React.ReactNode": "The node to render when loading." } }, "shouldDisableDate": { - "description": "Disable specific date.
Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", + "description": "Disable specific date.
Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.", "typeDescriptions": { "day": "The date to test.", "boolean": "If true the date will be disabled." diff --git a/docsTech/processing.md b/docsTech/processing.md index 600f63e9356d..bc39ac111e58 100644 --- a/docsTech/processing.md +++ b/docsTech/processing.md @@ -14,7 +14,7 @@ For each pattern, you will find a list of where such pattern is used, why it is - Pipe-processing - Plugin state enrichment - - Add custom behavior to an api method + - Add custom behavior to an API method - Feature limitation - Component children processing - Family-processing @@ -39,8 +39,8 @@ We can classify the pipe-processing into several categories: A few possible reasons could be to: -- Add some columns (eg: processor of the Selection plugin) -- Re-order the columns (eg: processor of the Column Pinning plugin). +- Add some columns (for example processor of the Selection plugin) +- Re-order the columns (for example processor of the Column Pinning plugin). **Example**: @@ -78,7 +78,7 @@ useGridRegisterPipeProcessor(apiRef, 'hydrateColumns', addCustomFeatureColumn); **Why register to this processing** -- Modify the base height of a row or add the height of some custom elements (eg: processor of the Detail Panel plugin increases the row height when the detail panel is open). +- Modify the base height of a row or add the height of some custom elements (for example processor of the Detail Panel plugin increases the row height when the detail panel is open). **Example**: @@ -107,7 +107,7 @@ useGridRegisterPipeProcessor(apiRef, 'rowHeight', addCustomFeatureHeight); **Publisher**: `useGridRows` plugin before updating `state.rows`. -**Why register to this processing**: Add some rows (eg: processor of the Aggregation plugin). +**Why register to this processing**: Add some rows (for example processor of the Aggregation plugin). **Example**: @@ -142,9 +142,9 @@ const addGroupFooterRows = React.useCallback>(( useGridRegisterPipeProcessor(apiRef, 'hydrateRows', addGroupFooterRows); ``` -### Add custom behavior to an api method +### Add custom behavior to an API method -**Goal**: To add some data on the value returned by an api method (eg: `exportState`) or to apply some custom behavior based on the input value of an api method (eg: `restoreState`) +**Goal**: To add some data on the value returned by an API method (for example `exportState`) or to apply some custom behavior based on the input value of an API method (for example `restoreState`) #### List @@ -238,7 +238,7 @@ useGridRegisterPipeProcessor(apiRef, 'scrollToIndexes', calculateScrollLeft); ### Feature limitation -**Goal**: To block the application of another plugin (eg: `canBeReorder`) +**Goal**: To block the application of another plugin (for example `canBeReorder`) #### List diff --git a/packages/x-data-grid-premium/src/hooks/features/clipboard/useGridClipboardImport.ts b/packages/x-data-grid-premium/src/hooks/features/clipboard/useGridClipboardImport.ts index fe95b6cc33d9..492be946bbf2 100644 --- a/packages/x-data-grid-premium/src/hooks/features/clipboard/useGridClipboardImport.ts +++ b/packages/x-data-grid-premium/src/hooks/features/clipboard/useGridClipboardImport.ts @@ -30,7 +30,7 @@ import type { DataGridPremiumProcessedProps } from '../../../models/dataGridPrem const missingOnProcessRowUpdateErrorWarning = buildWarning( [ 'MUI X: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.', - 'To handle the error pass a callback to the `onProcessRowUpdateError` prop, e.g. ` ...} />`.', + 'To handle the error pass a callback to the `onProcessRowUpdateError` prop, for example ` ...} />`.', 'For more detail, see https://mui.com/x/react-data-grid/editing/#server-side-persistence.', ], 'error', diff --git a/packages/x-data-grid-pro/src/hooks/features/columnPinning/useGridColumnPinning.tsx b/packages/x-data-grid-pro/src/hooks/features/columnPinning/useGridColumnPinning.tsx index feb20560b0f6..d64f7916d68f 100644 --- a/packages/x-data-grid-pro/src/hooks/features/columnPinning/useGridColumnPinning.tsx +++ b/packages/x-data-grid-pro/src/hooks/features/columnPinning/useGridColumnPinning.tsx @@ -278,16 +278,16 @@ export const useGridColumnPinning = ( * on must be moved to left or right to make room for it. The ^^^ below represents the column * which gave space to receive X. * - * | X | B | C | D | -> | B | C | D | X | (e.g. X moved to after D, so delta=1) + * | X | B | C | D | -> | B | C | D | X | (for example X moved to after D, so delta=1) * ^^^ ^^^ * - * | A | B | C | X | -> | X | A | B | C | (e.g. X moved before A, so delta=-1) + * | A | B | C | X | -> | X | A | B | C | (for example X moved before A, so delta=-1) * ^^^ ^^^ * * If column P is pinned, it will not move to provide space. However, it will jump to the next * non-pinned column. * - * | X | B | P | D | -> | B | D | P | X | (e.g. X moved to after D, with P pinned) + * | X | B | P | D | -> | B | D | P | X | (for example X moved to after D, with P pinned) * ^^^ ^^^ */ const siblingField = latestColumnFields[targetIndex - delta]; diff --git a/packages/x-data-grid-pro/src/hooks/features/detailPanel/useGridDetailPanel.ts b/packages/x-data-grid-pro/src/hooks/features/detailPanel/useGridDetailPanel.ts index b7e8fc2256cb..f618ffe20a7f 100644 --- a/packages/x-data-grid-pro/src/hooks/features/detailPanel/useGridDetailPanel.ts +++ b/packages/x-data-grid-pro/src/hooks/features/detailPanel/useGridDetailPanel.ts @@ -303,7 +303,7 @@ export const useGridDetailPanel = ( const heightCache = gridDetailPanelExpandedRowsHeightCacheSelector(apiRef); - initialValue.detail = heightCache[row.id] ?? 0; // Fallback to zero because the cache might not be ready yet (e.g. page was changed) + initialValue.detail = heightCache[row.id] ?? 0; // Fallback to zero because the cache might not be ready yet (for example page was changed) return initialValue; }, [apiRef, expandedRowIds, updateCachesIfNeeded], diff --git a/packages/x-data-grid-pro/src/models/dataSource.ts b/packages/x-data-grid-pro/src/models/dataSource.ts index 3818c77a7201..53bb071e6b4f 100644 --- a/packages/x-data-grid-pro/src/models/dataSource.ts +++ b/packages/x-data-grid-pro/src/models/dataSource.ts @@ -37,7 +37,7 @@ interface GetRowsResponse { rows: GridRowModel[]; /** * To reflect updates in total `rowCount` (optional). - * Useful when the `rowCount` is inaccurate (e.g. when filtering) or not available upfront. + * Useful when the `rowCount` is inaccurate (for example when filtering) or not available upfront. */ rowCount?: number; /** diff --git a/packages/x-data-grid-pro/src/tests/cellEditing.DataGridPro.test.tsx b/packages/x-data-grid-pro/src/tests/cellEditing.DataGridPro.test.tsx index d8f8c1505cd9..6c5ccec2e339 100644 --- a/packages/x-data-grid-pro/src/tests/cellEditing.DataGridPro.test.tsx +++ b/packages/x-data-grid-pro/src/tests/cellEditing.DataGridPro.test.tsx @@ -873,7 +873,7 @@ describe(' - Cell editing', () => { apiRef.current.subscribeEvent('cellEditStart', listener); const cell = getCell(0, 1); userEvent.mousePress(cell); - fireEvent.keyDown(cell, { key: 'a', [key]: true }); // e.g. Ctrl + A, copy + fireEvent.keyDown(cell, { key: 'a', [key]: true }); // for example Ctrl + A, copy expect(listener.callCount).to.equal(0); }); }); diff --git a/packages/x-data-grid-pro/src/tests/components.DataGridPro.test.tsx b/packages/x-data-grid-pro/src/tests/components.DataGridPro.test.tsx index 8827d24988ae..2b354aba0ec3 100644 --- a/packages/x-data-grid-pro/src/tests/components.DataGridPro.test.tsx +++ b/packages/x-data-grid-pro/src/tests/components.DataGridPro.test.tsx @@ -62,7 +62,7 @@ describe(' - Components', () => { const eventToFire = prop.replace(/^on([A-Z])/, (match) => match.slice(2).toLowerCase(), - ) as EventType; // e.g. onDoubleClick -> doubleClick + ) as EventType; // for example onDoubleClick -> doubleClick const cell = getCell(0, 0); if (event !== 'cellMouseUp') { @@ -111,7 +111,7 @@ describe(' - Components', () => { const eventToFire = prop.replace(/^on([A-Z])/, (match) => match.slice(2).toLowerCase(), - ) as EventType; // e.g. onDoubleClick -> doubleClick + ) as EventType; // for example onDoubleClick -> doubleClick fireEvent[eventToFire](getRow(0)); expect(propHandler.callCount).to.equal(1); diff --git a/packages/x-data-grid/src/components/cell/GridActionsCell.tsx b/packages/x-data-grid/src/components/cell/GridActionsCell.tsx index c3a64881b58a..9030408f0339 100644 --- a/packages/x-data-grid/src/components/cell/GridActionsCell.tsx +++ b/packages/x-data-grid/src/components/cell/GridActionsCell.tsx @@ -171,7 +171,7 @@ function GridActionsCell(props: GridActionsCellProps) { if (newIndex !== focusedButtonIndex) { event.preventDefault(); // Prevent scrolling - event.stopPropagation(); // Don't stop propagation for other keys, e.g. ArrowUp + event.stopPropagation(); // Don't stop propagation for other keys, for example ArrowUp setFocusedButtonIndex(newIndex); } }; diff --git a/packages/x-data-grid/src/components/panel/filterPanel/GridFilterInputBoolean.tsx b/packages/x-data-grid/src/components/panel/filterPanel/GridFilterInputBoolean.tsx index e9bdf86d06cc..1dc95b695313 100644 --- a/packages/x-data-grid/src/components/panel/filterPanel/GridFilterInputBoolean.tsx +++ b/packages/x-data-grid/src/components/panel/filterPanel/GridFilterInputBoolean.tsx @@ -11,7 +11,7 @@ export type GridFilterInputBooleanProps = GridFilterInputValueProps & clearButton?: React.ReactNode | null; /** * It is `true` if the filter either has a value or an operator with no value - * required is selected (e.g. `isEmpty`) + * required is selected (for example `isEmpty`) */ isFilterActive?: boolean; }; @@ -133,7 +133,7 @@ GridFilterInputBoolean.propTypes = { focusElementRef: refType, /** * It is `true` if the filter either has a value or an operator with no value - * required is selected (e.g. `isEmpty`) + * required is selected (for example `isEmpty`) */ isFilterActive: PropTypes.bool, item: PropTypes.shape({ diff --git a/packages/x-data-grid/src/components/panel/filterPanel/GridFilterInputDate.tsx b/packages/x-data-grid/src/components/panel/filterPanel/GridFilterInputDate.tsx index dcfef282d86b..a613c573a082 100644 --- a/packages/x-data-grid/src/components/panel/filterPanel/GridFilterInputDate.tsx +++ b/packages/x-data-grid/src/components/panel/filterPanel/GridFilterInputDate.tsx @@ -13,7 +13,7 @@ export type GridFilterInputDateProps = GridFilterInputValueProps & clearButton?: React.ReactNode | null; /** * It is `true` if the filter either has a value or an operator with no value - * required is selected (e.g. `isEmpty`) + * required is selected (for example `isEmpty`) */ isFilterActive?: boolean; }; @@ -135,7 +135,7 @@ GridFilterInputDate.propTypes = { ]), /** * It is `true` if the filter either has a value or an operator with no value - * required is selected (e.g. `isEmpty`) + * required is selected (for example `isEmpty`) */ isFilterActive: PropTypes.bool, item: PropTypes.shape({ diff --git a/packages/x-data-grid/src/components/panel/filterPanel/GridFilterInputSingleSelect.tsx b/packages/x-data-grid/src/components/panel/filterPanel/GridFilterInputSingleSelect.tsx index 5ee0b5e7226a..6836f735cb51 100644 --- a/packages/x-data-grid/src/components/panel/filterPanel/GridFilterInputSingleSelect.tsx +++ b/packages/x-data-grid/src/components/panel/filterPanel/GridFilterInputSingleSelect.tsx @@ -60,7 +60,7 @@ export type GridFilterInputSingleSelectProps = GridFilterInputValueProps & clearButton?: React.ReactNode | null; /** * It is `true` if the filter either has a value or an operator with no value - * required is selected (e.g. `isEmpty`) + * required is selected (for example `isEmpty`) */ isFilterActive?: boolean; type?: 'singleSelect'; @@ -184,7 +184,7 @@ GridFilterInputSingleSelect.propTypes = { ]), /** * It is `true` if the filter either has a value or an operator with no value - * required is selected (e.g. `isEmpty`) + * required is selected (for example `isEmpty`) */ isFilterActive: PropTypes.bool, item: PropTypes.shape({ diff --git a/packages/x-data-grid/src/components/panel/filterPanel/GridFilterInputValue.tsx b/packages/x-data-grid/src/components/panel/filterPanel/GridFilterInputValue.tsx index 6535b9420cfa..4ee1baf459bf 100644 --- a/packages/x-data-grid/src/components/panel/filterPanel/GridFilterInputValue.tsx +++ b/packages/x-data-grid/src/components/panel/filterPanel/GridFilterInputValue.tsx @@ -13,7 +13,7 @@ export type GridTypeFilterInputValueProps = GridFilterInputValueProps & clearButton?: React.ReactNode | null; /** * It is `true` if the filter either has a value or an operator with no value - * required is selected (e.g. `isEmpty`) + * required is selected (for example `isEmpty`) */ isFilterActive?: boolean; }; @@ -115,7 +115,7 @@ GridFilterInputValue.propTypes = { ]), /** * It is `true` if the filter either has a value or an operator with no value - * required is selected (e.g. `isEmpty`) + * required is selected (for example `isEmpty`) */ isFilterActive: PropTypes.bool, item: PropTypes.shape({ diff --git a/packages/x-data-grid/src/hooks/features/columnResize/useGridColumnResize.tsx b/packages/x-data-grid/src/hooks/features/columnResize/useGridColumnResize.tsx index 9f6ed9c817b6..c547c07b93e7 100644 --- a/packages/x-data-grid/src/hooks/features/columnResize/useGridColumnResize.tsx +++ b/packages/x-data-grid/src/hooks/features/columnResize/useGridColumnResize.tsx @@ -193,7 +193,7 @@ function excludeOutliers(inputValues: number[], factor: number) { const iqr = q3 - q1; // We make a small adjustment if `iqr < 5` for the cases where the IQR is - // very small (e.g. zero) due to very close by values in the input data. + // very small (for example zero) due to very close by values in the input data. // Otherwise, with an IQR of `0`, anything outside that would be considered // an outlier, but it makes more sense visually to allow for this 5px variance // rather than showing a cropped cell. diff --git a/packages/x-data-grid/src/hooks/features/editing/useGridCellEditing.ts b/packages/x-data-grid/src/hooks/features/editing/useGridCellEditing.ts index 79f51c6d850b..954b96ba8ee0 100644 --- a/packages/x-data-grid/src/hooks/features/editing/useGridCellEditing.ts +++ b/packages/x-data-grid/src/hooks/features/editing/useGridCellEditing.ts @@ -43,7 +43,7 @@ import { const missingOnProcessRowUpdateErrorWarning = buildWarning( [ 'MUI X: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.', - 'To handle the error pass a callback to the `onProcessRowUpdateError` prop, e.g. ` ...} />`.', + 'To handle the error pass a callback to the `onProcessRowUpdateError` prop, for example ` ...} />`.', 'For more detail, see https://mui.com/x/react-data-grid/editing/#server-side-persistence.', ], 'error', diff --git a/packages/x-data-grid/src/hooks/features/editing/useGridRowEditing.ts b/packages/x-data-grid/src/hooks/features/editing/useGridRowEditing.ts index e8180dd510b2..5fe365be8a4e 100644 --- a/packages/x-data-grid/src/hooks/features/editing/useGridRowEditing.ts +++ b/packages/x-data-grid/src/hooks/features/editing/useGridRowEditing.ts @@ -50,7 +50,7 @@ import { GRID_ACTIONS_COLUMN_TYPE } from '../../../colDef'; const missingOnProcessRowUpdateErrorWarning = buildWarning( [ 'MUI X: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.', - 'To handle the error pass a callback to the `onProcessRowUpdateError` prop, e.g. ` ...} />`.', + 'To handle the error pass a callback to the `onProcessRowUpdateError` prop, for example ` ...} />`.', 'For more detail, see https://mui.com/x/react-data-grid/editing/#server-side-persistence.', ], 'error', diff --git a/packages/x-data-grid/src/hooks/features/filter/gridFilterUtils.ts b/packages/x-data-grid/src/hooks/features/filter/gridFilterUtils.ts index 20d021178b45..e2988a3188d3 100644 --- a/packages/x-data-grid/src/hooks/features/filter/gridFilterUtils.ts +++ b/packages/x-data-grid/src/hooks/features/filter/gridFilterUtils.ts @@ -258,7 +258,7 @@ const buildAggregatedFilterItemsApplier = ( } // We generate a new function with `new Function()` to avoid expensive patterns for JS engines - // such as a dynamic object assignment, e.g. `{ [dynamicKey]: value }`. + // such as a dynamic object assignment, for example `{ [dynamicKey]: value }`. const filterItemCore = new Function( 'appliers', 'row', diff --git a/packages/x-data-grid/src/models/api/gridRowsMetaApi.ts b/packages/x-data-grid/src/models/api/gridRowsMetaApi.ts index 66c11093ada7..77e744b599aa 100644 --- a/packages/x-data-grid/src/models/api/gridRowsMetaApi.ts +++ b/packages/x-data-grid/src/models/api/gridRowsMetaApi.ts @@ -54,7 +54,7 @@ export interface GridRowsMetaPrivateApi { rowHasAutoHeight: (id: GridRowId) => boolean; /** * Returns the index of the last row measured. - * The value considers only the rows reachable by scroll, e.g. first row has index=0 in all pages. + * The value considers only the rows reachable by scroll, for example first row has index=0 in all pages. * @returns {number} The index of the last measured row. */ getLastMeasuredRowIndex: () => number; diff --git a/packages/x-data-grid/src/utils/createSelector.ts b/packages/x-data-grid/src/utils/createSelector.ts index 582c6fa696b6..c325c007ad19 100644 --- a/packages/x-data-grid/src/utils/createSelector.ts +++ b/packages/x-data-grid/src/utils/createSelector.ts @@ -40,7 +40,7 @@ const cache = new WeakMap>(); const missingInstanceIdWarning = buildWarning([ 'MUI X: A selector was called without passing the instance ID, which may impact the performance of the grid.', - 'To fix, call it with `apiRef`, e.g. `mySelector(apiRef)`, or pass the instance ID explicitly, e.g. `mySelector(state, apiRef.current.instanceId)`.', + 'To fix, call it with `apiRef`, for example `mySelector(apiRef)`, or pass the instance ID explicitly, for example `mySelector(state, apiRef.current.instanceId)`.', ]); function checkIsAPIRef(value: any) { diff --git a/packages/x-data-grid/src/utils/domUtils.ts b/packages/x-data-grid/src/utils/domUtils.ts index 29dc7bf8df3c..cbf4071ea77a 100644 --- a/packages/x-data-grid/src/utils/domUtils.ts +++ b/packages/x-data-grid/src/utils/domUtils.ts @@ -244,7 +244,7 @@ export function findGridCells(api: GridPrivateApiCommunity, field: string) { function queryRows(api: GridPrivateApiCommunity) { return api.virtualScrollerRef.current!.querySelectorAll( - // Use > to ignore rows from nested data grids (e.g. in detail panel) + // Use > to ignore rows from nested data grids (for example in detail panel) `:scope > div > div > .${gridClasses.row}`, ); } diff --git a/packages/x-data-grid/src/utils/keyboardUtils.ts b/packages/x-data-grid/src/utils/keyboardUtils.ts index 88e60807ddac..358005ebf306 100644 --- a/packages/x-data-grid/src/utils/keyboardUtils.ts +++ b/packages/x-data-grid/src/utils/keyboardUtils.ts @@ -10,7 +10,7 @@ export const isEscapeKey = (key: string): boolean => key === 'Escape'; */ export const isTabKey = (key: string): boolean => key === 'Tab'; -// Non printable keys have a name, e.g. "ArrowRight", see the whole list: +// Non printable keys have a name, for example "ArrowRight", see the whole list: // https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values // So event.key.length === 1 is often enough. // diff --git a/packages/x-date-pickers-pro/src/DateRangeCalendar/DateRangeCalendar.tsx b/packages/x-date-pickers-pro/src/DateRangeCalendar/DateRangeCalendar.tsx index 5657e124d039..328bd4358a57 100644 --- a/packages/x-date-pickers-pro/src/DateRangeCalendar/DateRangeCalendar.tsx +++ b/packages/x-date-pickers-pro/src/DateRangeCalendar/DateRangeCalendar.tsx @@ -762,7 +762,7 @@ DateRangeCalendar.propTypes = { /** * Disable specific date. * - * Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. + * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. * * @template TDate * @param {TDate} day The date to test. diff --git a/packages/x-date-pickers-pro/src/DateRangePicker/DateRangePicker.tsx b/packages/x-date-pickers-pro/src/DateRangePicker/DateRangePicker.tsx index 30bcf5403022..679515dd3ab2 100644 --- a/packages/x-date-pickers-pro/src/DateRangePicker/DateRangePicker.tsx +++ b/packages/x-date-pickers-pro/src/DateRangePicker/DateRangePicker.tsx @@ -296,7 +296,7 @@ DateRangePicker.propTypes = { /** * Disable specific date. * - * Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. + * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. * * @template TDate * @param {TDate} day The date to test. diff --git a/packages/x-date-pickers-pro/src/DateTimeRangePicker/DateTimeRangePicker.tsx b/packages/x-date-pickers-pro/src/DateTimeRangePicker/DateTimeRangePicker.tsx index 2f9d4dedd783..60b321c28d0f 100644 --- a/packages/x-date-pickers-pro/src/DateTimeRangePicker/DateTimeRangePicker.tsx +++ b/packages/x-date-pickers-pro/src/DateTimeRangePicker/DateTimeRangePicker.tsx @@ -331,7 +331,7 @@ DateTimeRangePicker.propTypes = { /** * Disable specific date. * - * Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. + * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. * * @template TDate * @param {TDate} day The date to test. diff --git a/packages/x-date-pickers-pro/src/DesktopDateRangePicker/DesktopDateRangePicker.tsx b/packages/x-date-pickers-pro/src/DesktopDateRangePicker/DesktopDateRangePicker.tsx index 53b40e695207..c3ae2ac5605d 100644 --- a/packages/x-date-pickers-pro/src/DesktopDateRangePicker/DesktopDateRangePicker.tsx +++ b/packages/x-date-pickers-pro/src/DesktopDateRangePicker/DesktopDateRangePicker.tsx @@ -331,7 +331,7 @@ DesktopDateRangePicker.propTypes = { /** * Disable specific date. * - * Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. + * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. * * @template TDate * @param {TDate} day The date to test. diff --git a/packages/x-date-pickers-pro/src/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.tsx b/packages/x-date-pickers-pro/src/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.tsx index 3d189efa0a04..0d6c6fa6d85c 100644 --- a/packages/x-date-pickers-pro/src/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.tsx +++ b/packages/x-date-pickers-pro/src/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.tsx @@ -489,7 +489,7 @@ DesktopDateTimeRangePicker.propTypes = { /** * Disable specific date. * - * Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. + * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. * * @template TDate * @param {TDate} day The date to test. diff --git a/packages/x-date-pickers-pro/src/MobileDateRangePicker/MobileDateRangePicker.tsx b/packages/x-date-pickers-pro/src/MobileDateRangePicker/MobileDateRangePicker.tsx index fbb6cc4ec78c..c65509df1c35 100644 --- a/packages/x-date-pickers-pro/src/MobileDateRangePicker/MobileDateRangePicker.tsx +++ b/packages/x-date-pickers-pro/src/MobileDateRangePicker/MobileDateRangePicker.tsx @@ -327,7 +327,7 @@ MobileDateRangePicker.propTypes = { /** * Disable specific date. * - * Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. + * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. * * @template TDate * @param {TDate} day The date to test. diff --git a/packages/x-date-pickers-pro/src/MobileDateTimeRangePicker/MobileDateTimeRangePicker.tsx b/packages/x-date-pickers-pro/src/MobileDateTimeRangePicker/MobileDateTimeRangePicker.tsx index 5346acf57445..4bce95d92d91 100644 --- a/packages/x-date-pickers-pro/src/MobileDateTimeRangePicker/MobileDateTimeRangePicker.tsx +++ b/packages/x-date-pickers-pro/src/MobileDateTimeRangePicker/MobileDateTimeRangePicker.tsx @@ -484,7 +484,7 @@ MobileDateTimeRangePicker.propTypes = { /** * Disable specific date. * - * Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. + * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. * * @template TDate * @param {TDate} day The date to test. diff --git a/packages/x-date-pickers-pro/src/MultiInputDateRangeField/MultiInputDateRangeField.tsx b/packages/x-date-pickers-pro/src/MultiInputDateRangeField/MultiInputDateRangeField.tsx index 4a4e615be45d..e8097c710643 100644 --- a/packages/x-date-pickers-pro/src/MultiInputDateRangeField/MultiInputDateRangeField.tsx +++ b/packages/x-date-pickers-pro/src/MultiInputDateRangeField/MultiInputDateRangeField.tsx @@ -314,7 +314,7 @@ MultiInputDateRangeField.propTypes = { /** * Disable specific date. * - * Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. + * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. * * @template TDate * @param {TDate} day The date to test. diff --git a/packages/x-date-pickers-pro/src/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.tsx b/packages/x-date-pickers-pro/src/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.tsx index cd0a2bc5e8f0..30283e239e2d 100644 --- a/packages/x-date-pickers-pro/src/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.tsx +++ b/packages/x-date-pickers-pro/src/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.tsx @@ -345,7 +345,7 @@ MultiInputDateTimeRangeField.propTypes = { /** * Disable specific date. * - * Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. + * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. * * @template TDate * @param {TDate} day The date to test. diff --git a/packages/x-date-pickers-pro/src/SingleInputDateRangeField/SingleInputDateRangeField.tsx b/packages/x-date-pickers-pro/src/SingleInputDateRangeField/SingleInputDateRangeField.tsx index d758ed6ea40f..a576e897b46e 100644 --- a/packages/x-date-pickers-pro/src/SingleInputDateRangeField/SingleInputDateRangeField.tsx +++ b/packages/x-date-pickers-pro/src/SingleInputDateRangeField/SingleInputDateRangeField.tsx @@ -279,7 +279,7 @@ SingleInputDateRangeField.propTypes = { /** * Disable specific date. * - * Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. + * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. * * @template TDate * @param {TDate} day The date to test. diff --git a/packages/x-date-pickers-pro/src/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.tsx b/packages/x-date-pickers-pro/src/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.tsx index 7b86fc27045b..86c93f642d88 100644 --- a/packages/x-date-pickers-pro/src/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.tsx +++ b/packages/x-date-pickers-pro/src/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.tsx @@ -312,7 +312,7 @@ SingleInputDateTimeRangeField.propTypes = { /** * Disable specific date. * - * Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. + * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. * * @template TDate * @param {TDate} day The date to test. diff --git a/packages/x-date-pickers-pro/src/StaticDateRangePicker/StaticDateRangePicker.tsx b/packages/x-date-pickers-pro/src/StaticDateRangePicker/StaticDateRangePicker.tsx index edc98f0a5ef8..bb3c4aa34ed7 100644 --- a/packages/x-date-pickers-pro/src/StaticDateRangePicker/StaticDateRangePicker.tsx +++ b/packages/x-date-pickers-pro/src/StaticDateRangePicker/StaticDateRangePicker.tsx @@ -237,7 +237,7 @@ StaticDateRangePicker.propTypes = { /** * Disable specific date. * - * Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. + * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. * * @template TDate * @param {TDate} day The date to test. diff --git a/packages/x-date-pickers-pro/src/internals/models/dateRange.ts b/packages/x-date-pickers-pro/src/internals/models/dateRange.ts index f1ac7d14580b..b9404d00d632 100644 --- a/packages/x-date-pickers-pro/src/internals/models/dateRange.ts +++ b/packages/x-date-pickers-pro/src/internals/models/dateRange.ts @@ -13,7 +13,7 @@ export interface DayRangeValidationProps { /** * Disable specific date. * - * Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. + * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. * * @template TDate * @param {TDate} day The date to test. diff --git a/packages/x-date-pickers/src/DateCalendar/DateCalendar.tsx b/packages/x-date-pickers/src/DateCalendar/DateCalendar.tsx index 069f668edd36..b14728935e28 100644 --- a/packages/x-date-pickers/src/DateCalendar/DateCalendar.tsx +++ b/packages/x-date-pickers/src/DateCalendar/DateCalendar.tsx @@ -549,7 +549,7 @@ DateCalendar.propTypes = { /** * Disable specific date. * - * Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. + * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. * * @template TDate * @param {TDate} day The date to test. diff --git a/packages/x-date-pickers/src/DateField/DateField.tsx b/packages/x-date-pickers/src/DateField/DateField.tsx index 61abeceed5ca..131d6f5ed987 100644 --- a/packages/x-date-pickers/src/DateField/DateField.tsx +++ b/packages/x-date-pickers/src/DateField/DateField.tsx @@ -276,7 +276,7 @@ DateField.propTypes = { /** * Disable specific date. * - * Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. + * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. * * @template TDate * @param {TDate} day The date to test. diff --git a/packages/x-date-pickers/src/DatePicker/DatePicker.tsx b/packages/x-date-pickers/src/DatePicker/DatePicker.tsx index e84f5887a9c4..65f36dbf7537 100644 --- a/packages/x-date-pickers/src/DatePicker/DatePicker.tsx +++ b/packages/x-date-pickers/src/DatePicker/DatePicker.tsx @@ -285,7 +285,7 @@ DatePicker.propTypes = { /** * Disable specific date. * - * Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. + * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. * * @template TDate * @param {TDate} day The date to test. diff --git a/packages/x-date-pickers/src/DateTimeField/DateTimeField.tsx b/packages/x-date-pickers/src/DateTimeField/DateTimeField.tsx index ef7fe6f7229c..7f9cf35580d1 100644 --- a/packages/x-date-pickers/src/DateTimeField/DateTimeField.tsx +++ b/packages/x-date-pickers/src/DateTimeField/DateTimeField.tsx @@ -309,7 +309,7 @@ DateTimeField.propTypes = { /** * Disable specific date. * - * Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. + * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. * * @template TDate * @param {TDate} day The date to test. diff --git a/packages/x-date-pickers/src/DateTimePicker/DateTimePicker.tsx b/packages/x-date-pickers/src/DateTimePicker/DateTimePicker.tsx index 0056962d249a..68edc264b00f 100644 --- a/packages/x-date-pickers/src/DateTimePicker/DateTimePicker.tsx +++ b/packages/x-date-pickers/src/DateTimePicker/DateTimePicker.tsx @@ -323,7 +323,7 @@ DateTimePicker.propTypes = { /** * Disable specific date. * - * Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. + * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. * * @template TDate * @param {TDate} day The date to test. diff --git a/packages/x-date-pickers/src/DesktopDatePicker/DesktopDatePicker.tsx b/packages/x-date-pickers/src/DesktopDatePicker/DesktopDatePicker.tsx index 922a22b3f23c..9f75443212d8 100644 --- a/packages/x-date-pickers/src/DesktopDatePicker/DesktopDatePicker.tsx +++ b/packages/x-date-pickers/src/DesktopDatePicker/DesktopDatePicker.tsx @@ -330,7 +330,7 @@ DesktopDatePicker.propTypes = { /** * Disable specific date. * - * Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. + * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. * * @template TDate * @param {TDate} day The date to test. diff --git a/packages/x-date-pickers/src/DesktopDateTimePicker/DesktopDateTimePicker.tsx b/packages/x-date-pickers/src/DesktopDateTimePicker/DesktopDateTimePicker.tsx index 65ab6975bd82..785d032f92a3 100644 --- a/packages/x-date-pickers/src/DesktopDateTimePicker/DesktopDateTimePicker.tsx +++ b/packages/x-date-pickers/src/DesktopDateTimePicker/DesktopDateTimePicker.tsx @@ -418,7 +418,7 @@ DesktopDateTimePicker.propTypes = { /** * Disable specific date. * - * Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. + * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. * * @template TDate * @param {TDate} day The date to test. diff --git a/packages/x-date-pickers/src/MobileDatePicker/MobileDatePicker.tsx b/packages/x-date-pickers/src/MobileDatePicker/MobileDatePicker.tsx index 33c402bfe9c3..24a8915df648 100644 --- a/packages/x-date-pickers/src/MobileDatePicker/MobileDatePicker.tsx +++ b/packages/x-date-pickers/src/MobileDatePicker/MobileDatePicker.tsx @@ -327,7 +327,7 @@ MobileDatePicker.propTypes = { /** * Disable specific date. * - * Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. + * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. * * @template TDate * @param {TDate} day The date to test. diff --git a/packages/x-date-pickers/src/MobileDateTimePicker/MobileDateTimePicker.tsx b/packages/x-date-pickers/src/MobileDateTimePicker/MobileDateTimePicker.tsx index 0573711c4893..4291fcc31893 100644 --- a/packages/x-date-pickers/src/MobileDateTimePicker/MobileDateTimePicker.tsx +++ b/packages/x-date-pickers/src/MobileDateTimePicker/MobileDateTimePicker.tsx @@ -377,7 +377,7 @@ MobileDateTimePicker.propTypes = { /** * Disable specific date. * - * Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. + * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. * * @template TDate * @param {TDate} day The date to test. diff --git a/packages/x-date-pickers/src/StaticDatePicker/StaticDatePicker.tsx b/packages/x-date-pickers/src/StaticDatePicker/StaticDatePicker.tsx index a52fa76e9736..b0e540e89879 100644 --- a/packages/x-date-pickers/src/StaticDatePicker/StaticDatePicker.tsx +++ b/packages/x-date-pickers/src/StaticDatePicker/StaticDatePicker.tsx @@ -228,7 +228,7 @@ StaticDatePicker.propTypes = { /** * Disable specific date. * - * Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. + * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. * * @template TDate * @param {TDate} day The date to test. diff --git a/packages/x-date-pickers/src/StaticDateTimePicker/StaticDateTimePicker.tsx b/packages/x-date-pickers/src/StaticDateTimePicker/StaticDateTimePicker.tsx index 7c86a187e96d..1262583a39fe 100644 --- a/packages/x-date-pickers/src/StaticDateTimePicker/StaticDateTimePicker.tsx +++ b/packages/x-date-pickers/src/StaticDateTimePicker/StaticDateTimePicker.tsx @@ -277,7 +277,7 @@ StaticDateTimePicker.propTypes = { /** * Disable specific date. * - * Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. + * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. * * @template TDate * @param {TDate} day The date to test. diff --git a/packages/x-date-pickers/src/internals/components/PickersPopper.tsx b/packages/x-date-pickers/src/internals/components/PickersPopper.tsx index 993294c4157c..5e472471459b 100644 --- a/packages/x-date-pickers/src/internals/components/PickersPopper.tsx +++ b/packages/x-date-pickers/src/internals/components/PickersPopper.tsx @@ -246,7 +246,7 @@ function useClickAwayListener( // TODO This behavior is not tested automatically // It's unclear whether this is due to different update semantics in test (batched in act() vs discrete on click). // Or if this is a timing related issues due to different Transition components - // Once we get rid of all the manual scheduling (e.g. setTimeout(update, 0)) we can revisit this code+test. + // Once we get rid of all the manual scheduling (for example setTimeout(update, 0)) we can revisit this code+test. if (active) { const doc = ownerDocument(nodeRef.current); diff --git a/packages/x-date-pickers/src/internals/hooks/useOpenState.ts b/packages/x-date-pickers/src/internals/hooks/useOpenState.ts index f733e60b7d28..558814e5be26 100644 --- a/packages/x-date-pickers/src/internals/hooks/useOpenState.ts +++ b/packages/x-date-pickers/src/internals/hooks/useOpenState.ts @@ -11,7 +11,7 @@ export const useOpenState = ({ open, onOpen, onClose }: OpenStateProps) => { const [openState, setIsOpenState] = React.useState(false); // It is required to update inner state in useEffect in order to avoid situation when - // Our component is not mounted yet, but `open` state is set to `true` (e.g. initially opened) + // Our component is not mounted yet, but `open` state is set to `true` (for example initially opened) React.useEffect(() => { if (isControllingOpenProp) { if (typeof open !== 'boolean') { diff --git a/packages/x-date-pickers/src/internals/models/validation.ts b/packages/x-date-pickers/src/internals/models/validation.ts index aee8f2a3833e..2488416d7848 100644 --- a/packages/x-date-pickers/src/internals/models/validation.ts +++ b/packages/x-date-pickers/src/internals/models/validation.ts @@ -76,7 +76,7 @@ export interface DayValidationProps { /** * Disable specific date. * - * Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. + * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance. * * @template TDate * @param {TDate} day The date to test. diff --git a/scripts/README.md b/scripts/README.md index 3af251267578..e810994e0d2b 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -23,7 +23,7 @@ yarn release:changelog --release The branch to release (default: master) ``` -You can also provide the github token by setting `process.env.GITHUB_TOKEN` variable. +You can also provide the GitHub token by setting `process.env.GITHUB_TOKEN` variable. In case of a problem, another method to generate the changelog is available at the end of this page. diff --git a/scripts/l10n.ts b/scripts/l10n.ts index bd2111526458..50a8db878650 100644 --- a/scripts/l10n.ts +++ b/scripts/l10n.ts @@ -142,7 +142,7 @@ function extractTranslations(translationsPath: string): [TranslationsByGroup, Tr (property.key as babelTypes.Identifier).name || `'${(property.key as babelTypes.StringLiteral).value}'`; - // Ignore translations for MUI Core components, e.g. MuiTablePagination + // Ignore translations for MUI Core components, for example MuiTablePagination if (key.startsWith('Mui')) { return; }