-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[docs] Fix 404 links #15575
[docs] Fix 404 links #15575
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,9 @@ In `package.json`, change the version of the date pickers package to `next`. | |
```diff | ||
-"@mui/x-date-pickers": "7.x.x", | ||
+"@mui/x-date-pickers": "next", | ||
|
||
-"@mui/x-date-pickers-pro": "7.x.x", | ||
+"@mui/x-date-pickers-pro": "next", | ||
``` | ||
|
||
Using `next` ensures that it will always use the latest v8 pre-release version, but you can also use a fixed version, like `8.0.0-alpha.0`. | ||
|
@@ -352,34 +355,34 @@ The following variables were renamed to have a coherent `Picker` / `Pickers` pre | |
- `usePickersTranslations` | ||
|
||
```diff | ||
- import { usePickersTranslations } from '@mui/x-date-pickers/hooks'; | ||
- import { usePickersTranslations } from '@mui/x-date-pickers'; | ||
- import { usePickersTranslations } from '@mui/x-date-pickers-pro'; | ||
-import { usePickersTranslations } from '@mui/x-date-pickers/hooks'; | ||
-import { usePickersTranslations } from '@mui/x-date-pickers'; | ||
-import { usePickersTranslations } from '@mui/x-date-pickers-pro'; | ||
Comment on lines
357
to
+360
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix git diff format There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a way to lint such cases to avoid introducing incorrect diffs in the first place? 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's possible yes. I did a first pass a long time ago https://github.com/mui/material-ui/blob/master/packages/markdownlint-rule-mui/git-diff.js. We could do another, I didn't think about this case. We can simply make sure that each diff resets the spacing, in a way that there is is no visual spacing offsets, e.g. - foo() {}
- bar;
+foo() {}
+ bar; @samuelsycamore if you are looking for some small writing code + some algorithmic exercises, up for grab 😄. I can allocate time to review it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moved to an issue mui/mui-public#249. |
||
|
||
+ import { usePickerTranslations } from '@mui/x-date-pickers/hooks'; | ||
+ import { usePickerTranslations } from '@mui/x-date-pickers'; | ||
+ import { usePickerTranslations } from '@mui/x-date-pickers-pro'; | ||
+import { usePickerTranslations } from '@mui/x-date-pickers/hooks'; | ||
+import { usePickerTranslations } from '@mui/x-date-pickers'; | ||
+import { usePickerTranslations } from '@mui/x-date-pickers-pro'; | ||
|
||
- const translations = usePickersTranslations(); | ||
+ const translations = usePickerTranslations(); | ||
-const translations = usePickersTranslations(); | ||
+const translations = usePickerTranslations(); | ||
``` | ||
|
||
- `usePickersContext` | ||
- `usePickersContext` | ||
|
||
```diff | ||
- import { usePickersContext } from '@mui/x-date-pickers/hooks'; | ||
- import { usePickersContext } from '@mui/x-date-pickers'; | ||
- import { usePickersContext } from '@mui/x-date-pickers-pro'; | ||
-import { usePickersContext } from '@mui/x-date-pickers/hooks'; | ||
-import { usePickersContext } from '@mui/x-date-pickers'; | ||
-import { usePickersContext } from '@mui/x-date-pickers-pro'; | ||
|
||
+ import { usePickerContext } from '@mui/x-date-pickers/hooks'; | ||
+ import { usePickerContext } from '@mui/x-date-pickers'; | ||
+ import { usePickerContext } from '@mui/x-date-pickers-pro'; | ||
+import { usePickerContext } from '@mui/x-date-pickers/hooks'; | ||
+import { usePickerContext } from '@mui/x-date-pickers'; | ||
+import { usePickerContext } from '@mui/x-date-pickers-pro'; | ||
|
||
- const pickersContext = usePickersContext(); | ||
+ const pickerContext = usePickerContext(); | ||
-const pickersContext = usePickersContext(); | ||
+const pickerContext = usePickerContext(); | ||
``` | ||
|
||
- `FieldValueType` | ||
- `FieldValueType` | ||
|
||
```diff | ||
-import { FieldValueType } from '@mui/x-date-pickers/models'; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import * as React from 'react'; | ||
import ApiPage from 'docs/src/modules/components/ApiPage'; | ||
import mapApiPageTranslations from 'docs/src/modules/utils/mapApiPageTranslations'; | ||
import jsonPageContent from './heatmap-tooltip.json'; | ||
|
||
export default function Page(props) { | ||
const { descriptions, pageContent } = props; | ||
return <ApiPage descriptions={descriptions} pageContent={pageContent} />; | ||
} | ||
|
||
Page.getInitialProps = () => { | ||
const req = require.context( | ||
'docsx/translations/api-docs/charts/heatmap-tooltip', | ||
false, | ||
/\.\/heatmap-tooltip.*.json$/, | ||
); | ||
const descriptions = mapApiPageTranslations(req); | ||
|
||
return { | ||
descriptions, | ||
pageContent: jsonPageContent, | ||
}; | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
{ | ||
"props": { | ||
"anchorEl": { | ||
"type": { | ||
"name": "union", | ||
"description": "(props, propName) => {\n if (props[propName] == null) {\n return new Error(`Prop '${propName}' is required but wasn't specified`);\n }\n if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {\n return new Error(`Expected prop '${propName}' to be of type Element`);\n }\n return null;\n}<br>| func<br>| { contextElement?: (props, propName) => {\n if (props[propName] == null) {\n return null;\n }\n if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {\n return new Error(`Expected prop '${propName}' to be of type Element`);\n }\n return null;\n}, getBoundingClientRect: func }" | ||
LukasTy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
}, | ||
"classes": { "type": { "name": "object" }, "additionalInfo": { "cssApi": true } }, | ||
"component": { "type": { "name": "elementType" } }, | ||
"components": { | ||
"type": { "name": "shape", "description": "{ Root?: elementType }" }, | ||
"default": "{}" | ||
}, | ||
"componentsProps": { | ||
"type": { "name": "shape", "description": "{ root?: func<br>| object }" }, | ||
"default": "{}" | ||
}, | ||
"container": { | ||
"type": { | ||
"name": "union", | ||
"description": "(props, propName) => {\n if (props[propName] == null) {\n return new Error(`Prop '${propName}' is required but wasn't specified`);\n }\n if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {\n return new Error(`Expected prop '${propName}' to be of type Element`);\n }\n return null;\n}<br>| func" | ||
} | ||
}, | ||
"disablePortal": { "type": { "name": "bool" }, "default": "false" }, | ||
"keepMounted": { "type": { "name": "bool" }, "default": "false" }, | ||
"modifiers": { | ||
"type": { | ||
"name": "arrayOf", | ||
"description": "Array<{ data?: object, effect?: func, enabled?: bool, fn?: func, name?: any, options?: object, phase?: 'afterMain'<br>| 'afterRead'<br>| 'afterWrite'<br>| 'beforeMain'<br>| 'beforeRead'<br>| 'beforeWrite'<br>| 'main'<br>| 'read'<br>| 'write', requires?: Array<string>, requiresIfExists?: Array<string> }>" | ||
} | ||
}, | ||
"open": { "type": { "name": "bool" } }, | ||
"placement": { | ||
"type": { | ||
"name": "enum", | ||
"description": "'auto-end'<br>| 'auto-start'<br>| 'auto'<br>| 'bottom-end'<br>| 'bottom-start'<br>| 'bottom'<br>| 'left-end'<br>| 'left-start'<br>| 'left'<br>| 'right-end'<br>| 'right-start'<br>| 'right'<br>| 'top-end'<br>| 'top-start'<br>| 'top'" | ||
}, | ||
"default": "'bottom'" | ||
}, | ||
"popperOptions": { | ||
"type": { | ||
"name": "shape", | ||
"description": "{ modifiers?: array, onFirstUpdate?: func, placement?: 'auto-end'<br>| 'auto-start'<br>| 'auto'<br>| 'bottom-end'<br>| 'bottom-start'<br>| 'bottom'<br>| 'left-end'<br>| 'left-start'<br>| 'left'<br>| 'right-end'<br>| 'right-start'<br>| 'right'<br>| 'top-end'<br>| 'top-start'<br>| 'top', strategy?: 'absolute'<br>| 'fixed' }" | ||
}, | ||
"default": "{}" | ||
}, | ||
"popperRef": { | ||
"type": { | ||
"name": "union", | ||
"description": "func<br>| { current?: { destroy: func, forceUpdate: func, setOptions: func, state: { attributes: object, elements: object, modifiersData: object, options: object, orderedModifiers: Array<object>, placement: 'auto-end'<br>| 'auto-start'<br>| 'auto'<br>| 'bottom-end'<br>| 'bottom-start'<br>| 'bottom'<br>| 'left-end'<br>| 'left-start'<br>| 'left'<br>| 'right-end'<br>| 'right-start'<br>| 'right'<br>| 'top-end'<br>| 'top-start'<br>| 'top', rects: object, reset: bool, scrollParents: object, strategy: 'absolute'<br>| 'fixed', styles: object }, update: func } }" | ||
} | ||
}, | ||
"slotProps": { "type": { "name": "object" }, "default": "{}" }, | ||
"slots": { | ||
"type": { "name": "object" }, | ||
"default": "{}", | ||
"additionalInfo": { "slotsApi": true } | ||
}, | ||
"sx": { | ||
"type": { | ||
"name": "union", | ||
"description": "Array<func<br>| object<br>| bool><br>| func<br>| object" | ||
}, | ||
"additionalInfo": { "sx": true } | ||
}, | ||
"transition": { "type": { "name": "bool" }, "default": "false" } | ||
}, | ||
"name": "HeatmapTooltip", | ||
"imports": [ | ||
"import { HeatmapTooltip } from '@mui/x-charts-pro/Heatmap';", | ||
"import { HeatmapTooltip } from '@mui/x-charts-pro';" | ||
], | ||
"classes": [ | ||
{ | ||
"key": "cell", | ||
"className": "MuiHeatmapTooltip-cell", | ||
"description": "Styles applied to the cell element.", | ||
"isGlobal": false | ||
}, | ||
{ | ||
"key": "labelCell", | ||
"className": "MuiHeatmapTooltip-labelCell", | ||
"description": "Styles applied to the labelCell element.", | ||
"isGlobal": false | ||
}, | ||
{ | ||
"key": "mark", | ||
"className": "MuiHeatmapTooltip-mark", | ||
"description": "Styles applied to the mark element.", | ||
"isGlobal": false | ||
}, | ||
{ | ||
"key": "markCell", | ||
"className": "MuiHeatmapTooltip-markCell", | ||
"description": "Styles applied to the markCell element.", | ||
"isGlobal": false | ||
}, | ||
{ | ||
"key": "paper", | ||
"className": "MuiHeatmapTooltip-paper", | ||
"description": "Styles applied to the paper element.", | ||
"isGlobal": false | ||
}, | ||
{ | ||
"key": "root", | ||
"className": "MuiHeatmapTooltip-root", | ||
"description": "Styles applied to the root element.", | ||
"isGlobal": false | ||
}, | ||
{ | ||
"key": "row", | ||
"className": "MuiHeatmapTooltip-row", | ||
"description": "Styles applied to the row element.", | ||
"isGlobal": false | ||
}, | ||
{ | ||
"key": "table", | ||
"className": "MuiHeatmapTooltip-table", | ||
"description": "Styles applied to the table element.", | ||
"isGlobal": false | ||
}, | ||
{ | ||
"key": "valueCell", | ||
"className": "MuiHeatmapTooltip-valueCell", | ||
"description": "Styles applied to the valueCell element.", | ||
"isGlobal": false | ||
} | ||
], | ||
"muiName": "MuiHeatmapTooltip", | ||
"filename": "/packages/x-charts-pro/src/Heatmap/HeatmapTooltip.tsx", | ||
"inheritance": null, | ||
"demos": "<ul><li><a href=\"/x/react-charts/heatmap/\">Charts - Heatmap <a href=\"/x/introduction/licensing/#pro-plan\" title=\"Pro plan\"><span class=\"plan-pro\"></span></a></a></li></ul>", | ||
"cssComponent": false | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The correct name