Conversation
git-subtree-dir: packages/core git-subtree-split: 18a77139405f204b74aaa9f814ebc17215856c5b
git-subtree-dir: packages/widgets git-subtree-split: 70b0228
The commits from the original branch were lost, so here are the breakings changes listed to make sure they show up in the changelog. BREAKING CHANGE: Rename the Constrictor component to Box, which is shorter and thus easier to type. This also expands the capabilities of Box to make it more Box-like. BREAKING CHANGE: Replace SwitchGroupField, RadioGroupField, CheckboxGroupField with ToggleGroupField. BREAKING CHANGE: Replace SwitchGroup, RadioGroup, CheckboxGroup with ToggleGroup. BREAKING CHANGE: The exports: colors, theme, layers, spacers, spacersNum, and elevations, have been moved from @dhis2/ui-core to @dhis2/ui-constants for better code reuse.
|
I think it'd be good to give the icons unique names, they don't need to be easily "human" readable, as long as they're unique (e. g. This way we can add as many "arrow" as we want and re-use very specific types in our components, just like we re-use the But that's something we'd have to discuss with @cooper-joe as well |
|
@Mohammer5 Interesting. Icons have been requested to be externally available too, e.g. from Apps. Does that change anything or do you still think the non-human readable icon names is the way to go? |
I don't really have an opinion on this. I think for us it doesn't really matter (a descriptive name could be easier to others though). Maybe it's generally better to have descriptive names (like I'm used to generic names so people don't interpret too much, but rather look at the styleguide for when to use which icon (i. e. when looking for an arrow pointing right and there are several available but the styleguide has rules for them as they should only be used in a certain context) |
Good point, we have "cryptic naming schemes" for spacers ( |
|
Right now, this will expose our - as of now - internal shared prop types. Is that intentional? |
Yes. Not through the |
Maybe it'd then makes sense to bundle them with I'm not sure we should expose them though as keeping them internal allows us to change them without "breaking" changes as they could be used elsewhere (and totally out of context) when exposed |
Hmm. The reason they are in I don't know if we want to make those a part of the |
If we change a components prop-types, that changes the API, and is a breaking change anyway. Or am I missing something here? |
I agree. My personal preference would be to keep them internal until request to expose them come in.
Yeah, if they're misused. Let's say we add a status to the |
|
OK. To be frank I've disliked the Adding a new status to the internal shared prop-types will still cause it to be applied everywhere that shared prop-type definition is used, and thus may cause breaking changes. It would just be limited to our library and not external devs using it. |
|
🎉 This PR is included in version 5.0.0-alpha.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 5.0.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
I recommend cloning this branch and exploring locally.
This supersedes dhis2/ui-core#822. This approach uses Git subtrees to enable us to pull in changes that are happening in ui-core and ui-widgets without having to rebase everything.
To do
@dhis2/ui-core@dhis2/ui-widgets@dhis2/ui-forms@dhis2/ui-icons(holds all the icons used in UI)@dhis2/ui-constants(holds the constants, e.g. theme, spacers, elevation, etc) that are reused in UI@dhis2/uiwhich is a metapackage that enables a consistent import path for everything