Open tay1orjones opened 1 month ago
Thank you for submitting a feature request. Your proposal is open and will soon be triaged by the Carbon team.
If your proposal is accepted and the Carbon team has bandwidth they will take on the issue, or else request you or other volunteers from the community to work on this issue.
One additional suggestion:
Just have docs explain every way you can import smtn like myColor can either be imported by
import @carbon/react
,import @carbon/color||style
, or use@carbon/color||style/scss/myColor
The landscape of our elements packages leads to a lot of confusion.
Click to expand a chart of the current landscape
```mermaid graph LR CarbonReact("@carbon/react") CarbonStyles("@carbon/styles") OnlyStyles(("Only includes styles/sass modules from these packages, no js exports")) CarbonIcons("@carbon/icons") CarbonIconsReact("@carbon/icons-react") CarbonElements("@carbon/elements") subgraph ""Elements" packages" CarbonColors("@carbon/colors") CarbonGrid("@carbon/grid") CarbonLayout("@carbon/layout") CarbonMotion("@carbon/motion") CarbonThemes("@carbon/themes") CarbonType("@carbon/type") end CarbonStyles --> CarbonReact CarbonColors --> OnlyStyles CarbonGrid --> OnlyStyles CarbonLayout --> OnlyStyles CarbonMotion --> OnlyStyles CarbonThemes --> OnlyStyles CarbonType --> OnlyStyles OnlyStyles --> CarbonStyles CarbonColors --> CarbonElements CarbonGrid --> CarbonElements CarbonLayout --> CarbonElements CarbonMotion --> CarbonElements CarbonThemes --> CarbonElements CarbonType --> CarbonElements CarbonIconsReact --> CarbonReact CarbonIcons --> CarbonIconsReact ``` This does not include the additional complexity of what types of assets are provided through each package. Elements packages for instance sometimes contain js and/or sass exports. What exactly they export is not well documented.
Points of confusion
@carbon/elements
?@carbon/colors
or@carbon/grid
or ... etc. for all elements packages@carbon/colors
? When/why do I use@carbon/themes
with/instead of@carbon/colors
@carbon/styles
?@carbon/colors
(or any other elements package) alongside@carbon/styles
?@carbon/react
play into all of this?@carbon/colors
(or any other elements package) alongside@carbon/react
?Proposal
To try and improve this situation I think we could explore the following ideas to be more clear in the documentation.