Description
Through out the existence of ui-core
and ui-widgets
there's always been a question what should go into which library exactly.
I think we decided on:
- "dumb" components go into
ui-core
- "smart" components go into
ui-widgets
@HendrikThePendric and I were talking about file input components and we agreed that we need two different components:
- One that is being used for simple file uploads (like in the Import-Export App)
- One that's fetching a new id which will then be used to upload the file via the
fileResource
api
While the first one should go to ui-core
, the second one should definitely go to ui-widgets
, which feels a bit weird.
To me it would feel a lot more natural if we merged ui-core
, ui-widgets
and the design-system
into one repo and organize components based on their category (atoms, molecules, etc). Then we'd have docs coupled with components and everything in one place.
It doesn't necessarily have to be a monorepo which will result in different npm packages.
As long as we get tree-shaking and dead code elimination working it should be fine to have something like @dhis2/components
right?
@amcgee mentioned at one point he wouldn't like it if there were new releases in ui-core
when ui-widgets
updates (and vice versa), so I think keeping it as one repo/package would work around this issue (as there'd be no nothing-releases).
Upsides
- No more questions where to put what
- No separation between smart/dumb
- Putting docs and components together
- components between categories can be used without having to wait for a release
- no more release chains until a change in
ui-core
throughtui-widgets
can be used in apps that depend on that release