Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1353,7 +1353,7 @@ We'd like to offer a big thanks to the 15 contributors who made this release pos

- The clipboard related exports `ignoreValueFormatterDuringExport` and `splitClipboardPastedText` are no longer prefixed with `unstable_`.

- The deprecated constants `SUBMIT_FILTER_STROKE_TIME` and `SUBMIT_FILTER_DATE_STROKE_TIME` have been removed from the `DataGrid` exports. Use the [`filterDebounceMs`](https://next.mui.com/x/api/data-grid/data-grid/#DataGrid-prop-filterDebounceMs) prop to customize filter debounce time.
- The deprecated constants `SUBMIT_FILTER_STROKE_TIME` and `SUBMIT_FILTER_DATE_STROKE_TIME` have been removed from the `DataGrid` exports. Use the [`filterDebounceMs`](https://next.mui.com/x/api/data-grid/data-grid/#data-grid-prop-filterDebounceMs) prop to customize filter debounce time.

- The `slots.preferencesPanel` slot and the `slotProps.preferencesPanel` prop were removed. Use `slots.panel` and `slotProps.panel` instead.

Expand Down
16 changes: 0 additions & 16 deletions docs/.link-check-errors.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,2 @@
Broken links found by `yarn docs:link-check` that exist:

- https://mui.com/base-ui/react-autocomplete/hooks-api/#use-autocomplete
- https://mui.com/base-ui/react-portal/components-api/
- https://mui.com/material-ui/api/button/#props
- https://mui.com/material-ui/api/input-base/#InputBase-prop-disableInjectingGlobalStyles
- https://mui.com/material-ui/api/menu-item/#css
Comment on lines -6 to -7
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are fixed in mui/material-ui#41185

- https://mui.com/material-ui/api/popper/#props
- https://mui.com/material-ui/guides/api/#native-properties
- https://mui.com/system/styles/api/#creategenerateclassname-options-class-name-generator
- https://mui.com/system/styles/api/#serverstylesheets
- https://mui.com/system/styles/api/#stylesprovider
- https://mui.com/system/styles/api/#themeprovider
- https://mui.com/x/api/charts/gauge/#classes
- https://mui.com/x/api/data-grid/data-grid/#DataGrid-prop-filterDebounceMs
- https://mui.com/x/api/data-grid/data-grid/#props
- https://mui.com/x/api/data-grid/data-grid/#slots
- https://mui.com/x/api/date-pickers/date-picker/#slots
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ See the [Direct state access](/x/react-data-grid/state/#direct-selector-access)
```

- The deprecated constants `SUBMIT_FILTER_STROKE_TIME` and `SUBMIT_FILTER_DATE_STROKE_TIME` are no longer exported.
Use the [`filterDebounceMs`](/x/api/data-grid/data-grid/#DataGrid-prop-filterDebounceMs) prop to customize filter debounce time.
Use the [`filterDebounceMs`](/x/api/data-grid/data-grid/#data-grid-prop-filterDebounceMs) prop to customize filter debounce time.

- The `GridPreferencesPanel` component is not exported anymore as it wasn't meant to be used outside of the Data Grid.

Expand Down
25 changes: 13 additions & 12 deletions docs/scripts/reportBrokenLinks.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ function save(lines) {
}

const UNSUPPORTED_PATHS = ['/careers/', '/store/'];
const UNSUPPORTED_ANCHORS_PATHS = ['/api/'];

const buffer = [];

Expand All @@ -36,26 +35,28 @@ parseDocFolder(
);

function getPageUrlFromLink(link) {
// Determine if the link is an API path
// e.g. /x/api/data-grid/, /material-ui/api/button/, /system/api/box/
const isApiPath = link.match(/^\/[\w-]+\/api\//);
if (!isApiPath) {
return link;
}
const [rep] = link.split('/#');
return rep;
// if the link actually includes a hash, we need to re-add the necessary `/` at the end
return link.includes('/#') ? `${rep}/` : rep;
}

const usedLinks = { ...usedLinksCore, ...usedLinksX };
const availableLinks = { ...availableLinksCore, ...availableLinksX };

const removeUnsupportedHash = (link) => {
const doNotSupportAnchors = UNSUPPORTED_ANCHORS_PATHS.some((unsupportedPath) =>
link.includes(unsupportedPath),
);
const rep = doNotSupportAnchors ? getPageUrlFromLink(link) : link;
return rep;
};
write('Broken links found by `yarn docs:link-check` that exist:\n');
Object.keys(usedLinks)
.filter((link) => link.startsWith('/'))
.filter((link) => !availableLinks[removeUnsupportedHash(link)])
// unstyled sections are added by scripts (cannot be found in markdown)
.filter((link) => !link.includes('#unstyled'))
.filter((link) => !availableLinks[getPageUrlFromLink(link)])
// these url segments are specific to Base UI and added by scripts (can not be found in markdown)
.filter((link) =>
['components-api', 'hooks-api', '#unstyled'].every((str) => !link.includes(str)),
)
.filter((link) => UNSUPPORTED_PATHS.every((unsupportedPath) => !link.includes(unsupportedPath)))
.sort()
.forEach((linkKey) => {
Expand Down