cozy / cozy-ui

React components and CSS styles for Cozy apps
https://cozy.github.io/cozy-ui/react/
MIT License
48 stars 37 forks source link

Simplification des imports #1665

Open ptbrowne opened 3 years ago

ptbrowne commented 3 years ago

Plusieurs points font que les imports de cozy-ui sont plus compliqués que nécessaire.

- import Button from 'cozy-ui/transpiled/react/Button
+ import Button from '@cozy/ui/Button`
- import ExpansionPanel from 'cozy-ui/transpiled/react/MuiCozyTheme/ExpansionPanel
+ import ExpansionPanel from '@cozy/ui/ExpansionPanel'
- import withBreakpoints from 'cozy-ui/transpiled/react/helpers/withBreakpoints'
+ import withBreakpoints from '@cozy/ui/withBreakpoints'
- import useBreakpoints from 'cozy-ui/transpiled/react/hooks/useBreakpoints'
+ import useBreakpoints from '@cozy/ui/useBreakpoints'
- import Button from 'cozy-ui/react/Button'
+ import Button from '@cozy/ui/src/react/Button'

Bien sûr, il y aurait un codemod pour migrer. Qu'en pensez vous ? A mon avis ca n'est pas urgent mais ca irait dans la bonne direction.

EDIT: Used @cozy/ui instead of cozy-ui

JF-Cozy commented 5 months ago

lié à la carte https://github.com/cozy/cozy-ui/issues/2363