[lab] Create lab package, add SpeedDial#10288
Conversation
| reactAPI.pagesMarkdown = pagesMarkdown; | ||
| reactAPI.src = src; | ||
|
|
||
| // if (reactAPI.name !== 'Backdrop') { |
There was a problem hiding this comment.
This comment is very useful for debugging, more than useful.
There was a problem hiding this comment.
Comment? Looks like commented out dead code. Perhaps the "comment" needs a comment. 😄
| const name = page.pathname.replace(/.*\//, ''); | ||
|
|
||
| if (page.pathname.indexOf('/api') === 0) { | ||
| if (page.pathname.indexOf('/api') !== -1) { |
There was a problem hiding this comment.
This is less restrictive, why?
There was a problem hiding this comment.
To pick up /lab/api, but I can make it more verbose.
| - **[Trigger](https://material.io/guidelines/components/buttons-floating-action-button.html#buttons-floating-action-button-transitions) ✓** | ||
| - [Toolbar](https://material.io/guidelines/components/buttons-floating-action-button.html#buttons-floating-action-button-transitions) | ||
| - [Speed dial](https://material.io/guidelines/components/buttons-floating-action-button.html#buttons-floating-action-button-transitions) | ||
| - **[Speed dial](https://material.io/guidelines/components/buttons-floating-action-button.html#buttons-floating-action-button-transitions) ✓** |
There was a problem hiding this comment.
Is a component in the lab makes it supported?
It doesn't even mean it will reach core. We might decide to kill one lab component for some reason.
There was a problem hiding this comment.
Is a component in the lab makes it supported?
Legacy change - don't forget SpeedDial was written before Lab.
We might decide to kill one lab component for some reason.
Sure. But not this one. 😉
| @@ -0,0 +1 @@ | |||
| ../../.gitignore No newline at end of file | |||
There was a problem hiding this comment.
Apparently not! (Can't repro whatever might have inspired having a package-local .gitignore before...)
| @@ -0,0 +1 @@ | |||
| Note: Not active, just a placeholder for the SpeedDial regression test. | |||
There was a problem hiding this comment.
Should the regression tests be shared between different packages?
There was a problem hiding this comment.
SpeedDial was originally written to go into material-ui/src, so a regression test was written. Rather than throw that code away, I've put it here. Nothing more, nothing less.
| modal: 1300, | ||
| snackbar: 1400, | ||
| tooltip: 1500, | ||
| speedDial: 1100, |
There was a problem hiding this comment.
This is replicated in the .md, to update.
It's a breaking change and a dangerous one as can have large impact without people noticing.
|
I'm making the lab/core packages my priority for this weekend. Let's scale :). |
| let pathname = itemPath.replace(new RegExp(`\\${path.sep}`, 'g'), '/').replace(/^.*\/pages/, '').replace('.md', ''); | ||
|
|
||
| if (pathname.indexOf('/demos') === 0) { | ||
| if (pathname.indexOf('/demos') === 0 || pathname.indexOf('/lab') === 0 || pathname.indexOf('/utils') === 0 ) { |
There was a problem hiding this comment.
I will try to find a better approach than having to explicit the folders that follow a different structure in order to fix #10337.
This reverts commit 6f9eecf.
No description provided.