-
Notifications
You must be signed in to change notification settings - Fork 4.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
Rename plural group components (Fields) -> Group #203
Comments
If standardising across groupable components, should Group be component agnostic? |
Could you give an example @jamiehill? |
@davezuko suggested in the inital comment that "group is standardized across all components", and as such I wondered whether a generic Group Class was what he was thinking, or just a standardised api for such grouped components |
Initially, this would just be a standardized API. This issue was partly raised as we've decided to first build out our components with a sub-component approach. Example, Consider a group of buttons. In SUI we need a div with class <div class="ui buttons">
<button class="ui button">One</button>
<button class="ui button">Two</button>
<button class="ui button">Three</button>
</div> We currently handle this pattern in Stardust like this: import { Buttons, Button } from 'stardust'
const group = (
<Buttons>
<Button>One</Button>
<Button>Two</Button>
<Button>Three</Button>
</Buttons>
) Every component that can be grouped (which is most) has a component with the plural form of the name for grouping. Button / Buttons, Statistic / Statistics, etc. This issue is proposing that we do two things:
The above would then become: import { Button } from 'stardust'
const group = (
<Button.Group>
<Button>One</Button>
<Button>Two</Button>
<Button>Three</Button>
</Button.Group>
) |
That was exactly my query. I've been looking through |
This might be a good area to hit, but I think we need to update all the components to the v1 API first. Right now, many components still use I'd like to update all the old components to use this new API as our next step. I'll get a doc together on how to do this soon. I'll also create issues for upgrading the old components. If you'd like to update some of the other components, use the Label component for reference. |
Any suggestion of a good one to get started with, to get me upto speed? |
The Divider element is a pretty minimal component. That might be a good start. The docs are already in place for the Divider as well, so you'll have something to reference as you develop the API. You'll be looking to update I'll also rework one of the old component APIs and write a doc as I go. This should help clear things up as well. |
Just shipped buttons #295, that's a wrap! |
We would like to nest groupings under the component (as static properties), so that:
This changes the naming of
Fields
->Group
since it is standardized across all components and is more intuitive overall.Todo
feat(Form): update to v1 API #400 Fieldsfeat(Button): support all features, update to v1 API #295 ButtonsIcon Component updated to v1 API (bad merge) #279 IconsSegment: update to v1 API #287 SegmentsItem: Update to v1 API #431 ItemsUpdate Statistic to v1 API #334 StatisticsThe text was updated successfully, but these errors were encountered: