From ff937c0e4023a31ae6966f63d06d121a969b1b81 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Sat, 28 Mar 2020 21:53:45 +0100 Subject: [PATCH 1/6] [blog] Use dedicated class name --- docs/pages/blog/2019-developer-survey-results.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pages/blog/2019-developer-survey-results.md b/docs/pages/blog/2019-developer-survey-results.md index 3a99245328d022..7aa05bab39ead9 100644 --- a/docs/pages/blog/2019-developer-survey-results.md +++ b/docs/pages/blog/2019-developer-survey-results.md @@ -320,4 +320,4 @@ We will run a similar survey next year to keep track of our progress. If you want to continue to influence our roadmap, please upvote 👍 the issues you are the most interested in on GitHub. How to upvote on GitHub -
Help us prioritize by upvoting.
+

Help us prioritize by upvoting.

From 1bb395885bb2d7a9ea684e6692b795636a9d8805 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Sat, 28 Mar 2020 21:55:08 +0100 Subject: [PATCH 2/6] [docs] Fix leaking prop on DOM node --- docs/src/pages/landing/Steps.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/pages/landing/Steps.js b/docs/src/pages/landing/Steps.js index c3a893997d0aa6..2618d97ef61372 100644 --- a/docs/src/pages/landing/Steps.js +++ b/docs/src/pages/landing/Steps.js @@ -87,7 +87,7 @@ function HomeSteps() { const t = useSelector((state) => state.options.t); return ( - +
From e320f46afe0e26f09ae20a4d7fc029d7b94285b4 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Sat, 28 Mar 2020 21:56:42 +0100 Subject: [PATCH 3/6] [docs] Increase spacing to help readability --- docs/src/modules/components/AppContainer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/modules/components/AppContainer.js b/docs/src/modules/components/AppContainer.js index 46cda5318851da..e4d41a36c2d577 100644 --- a/docs/src/modules/components/AppContainer.js +++ b/docs/src/modules/components/AppContainer.js @@ -8,8 +8,8 @@ const useStyles = makeStyles((theme) => ({ root: { paddingTop: 80 + 16, [theme.breakpoints.up('lg')]: { - paddingLeft: theme.spacing(5), - paddingRight: theme.spacing(5), + paddingLeft: theme.spacing(6), + paddingRight: theme.spacing(6), }, }, })); From 16d38b9b155dd5f4c1e3c95b33dd153c7e0a8599 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Sat, 28 Mar 2020 22:00:17 +0100 Subject: [PATCH 4/6] [docs] Fix Duplicate ID demo-null For instance: https://validator.w3.org/nu/?doc=https%3A%2F%2Fmaterial-ui.com%2Fcomponents%2Fbuttons. --- docs/src/modules/components/Demo.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/modules/components/Demo.js b/docs/src/modules/components/Demo.js index 1b84e2441116a2..a465b4dd013c76 100644 --- a/docs/src/modules/components/Demo.js +++ b/docs/src/modules/components/Demo.js @@ -153,12 +153,12 @@ function getDemoData(codeVariant, demo, githubLocation) { // TODO: replace with React.useOpaqueReference if it is released function useUniqueId(prefix) { // useOpaqueReference - const [id, setDemoId] = React.useState(null); + const [id, setDemoId] = React.useState(undefined); React.useEffect(() => { setDemoId(Math.random().toString(36).slice(2)); }, []); - return `${prefix}${id}`; + return id ? `${prefix}${id}` : id; } function Demo(props) { From 445361db766df21b7f6a8162755e24594ff02b6a Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Sat, 28 Mar 2020 22:10:18 +0100 Subject: [PATCH 5/6] [docs] Fix Duplicate ID limit-tags https://validator.w3.org/nu/?doc=https%3A%2F%2Fmaterial-ui.com%2Fcomponents%2Fautocomplete%2F --- docs/src/pages/components/autocomplete/LimitTags.js | 2 +- docs/src/pages/components/autocomplete/LimitTags.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/pages/components/autocomplete/LimitTags.js b/docs/src/pages/components/autocomplete/LimitTags.js index 7f2bd393679983..f3c666b2bdb83d 100644 --- a/docs/src/pages/components/autocomplete/LimitTags.js +++ b/docs/src/pages/components/autocomplete/LimitTags.js @@ -21,7 +21,7 @@ export default function LimitTags() { option.title} defaultValue={[top100Films[13], top100Films[12], top100Films[11]]} diff --git a/docs/src/pages/components/autocomplete/LimitTags.tsx b/docs/src/pages/components/autocomplete/LimitTags.tsx index e4dfbb476a8ce6..2cb6a86a4a1619 100644 --- a/docs/src/pages/components/autocomplete/LimitTags.tsx +++ b/docs/src/pages/components/autocomplete/LimitTags.tsx @@ -23,7 +23,7 @@ export default function LimitTags() { option.title} defaultValue={[top100Films[13], top100Films[12], top100Films[11]]} From 1460f3c438f7f574f8c97023d278361ad5791366 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Sat, 28 Mar 2020 22:14:37 +0100 Subject: [PATCH 6/6] closer logic to what we do in the core components with setDefaultId --- docs/src/modules/components/Demo.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/modules/components/Demo.js b/docs/src/modules/components/Demo.js index a465b4dd013c76..5a6a5161d6d761 100644 --- a/docs/src/modules/components/Demo.js +++ b/docs/src/modules/components/Demo.js @@ -153,9 +153,9 @@ function getDemoData(codeVariant, demo, githubLocation) { // TODO: replace with React.useOpaqueReference if it is released function useUniqueId(prefix) { // useOpaqueReference - const [id, setDemoId] = React.useState(undefined); + const [id, setId] = React.useState(); React.useEffect(() => { - setDemoId(Math.random().toString(36).slice(2)); + setId(Math.random().toString(36).slice(2)); }, []); return id ? `${prefix}${id}` : id;