-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
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
[unstyled] Create package and move SliderUnstyled there #23270
[unstyled] Create package and move SliderUnstyled there #23270
Conversation
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.
What do you think of making @material-ui/unstyled
a dependency of @material-ui/core
? This was we don't have to duplicate the utils but move them?
"react-is": "^16.8.0" | ||
}, | ||
"devDependencies": { | ||
"@material-ui/types": "^5.1.0" |
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.
Dev dependency?
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.
It is dev dependency
} | ||
|
||
/** | ||
* @deprecated Not used in this library. |
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.
I have added https://trello.com/c/V43vShGf/2455-remove-deprecated-in-typescript so we can have the peace of mind that we won't forget about it in the future.
Every complaint I hear about docs:api always sounds like this is a purely technical discussion and you just battling with code. How does this look from a user perspective in the documentation? The API nav list is currently flat so we can't just put two Slider in there. Naming it "SliderUnstyled" in the nav and then naming it something different in the package is also confusing. I'm also not convinced by "/unstyled/Slider" in the nav since that probably only makes sense to maintainers. I think it makes sense to keep separate names following the discoverability argumentation of "avoid default exports". So we should setup the documentation for styled and unstyled components first (API only as an MVP) before we complain about docs:api again. This came up in the last meeting and I think we wanted to experiment with a second nav menu that switches between styled and unstyled. More navigation menus is always a bit problematic since you add more navigation "dimensions" but I'd like to see the docs for that first. To summarize: docs:api doesn't cause problems (I haven't seen any so far). It only highlights unsolved issues. |
I am not saying we have problems with the docs:api, I said
and this is causing problems with docs:api. It's basically what both you and Olivier said. Based on the comments so far on the PR, I will rename the components to
Agree, that's why we will rename the component to This PR is just creating the |
@eps1lon seems like in the end we do have a problem with docs:api. After moving the |
@mnajdova I would start the investigation with: https://github.com/mui-org/material-ui/blob/beb9b0c23011ae53962bb12b9568af5efbb7819f/package.json#L11 The script only looks for components in the core and lab packages. |
@oliviertassinari thanks for the suggestion. I've already updated this scripts as well as the script for the |
Found the issue with the docs generation. In the |
…at-self Add compat for usage in utils itself
@oliviertassinari I've merge the #23264 PR here, so we don't need to add the |
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.
Going to lookup over the types after the merge. It's not viable to review in this PR. In the future, please keep PRs focused on one task. Here: move files.
The PR is based on #23264 that's why it contains that many files, will rebase once that one is merged, plan to merge it soon (I've replaced there to just move the files .js and .d.ts). Will open after this one separate PRs for converting the utilities one by one to typescript. |
This PR creates the
@material-ui/unstyled
package and moves theSliderUnstyled
to this package. The new package is currently added as a dependency in the@material-ui/lab
and used inside theSliderStyled
component.It is based on #23264