hmrc / component-library-template

Template files for HMRC's component library
1 stars 16 forks source link

Ordering of subsections within a page #11

Open benaveryee opened 8 years ago

benaveryee commented 8 years ago

Subsections are alphabetically ordered, which is not necessarily the order that you want them to be listed. Can and should we specify the order? We might be able to do this with weight: https://github.com/kss-node/kss/blob/spec/SPEC.md#the-weight-property

feedmypixel commented 8 years ago

It would be nice to order the items alphabetically in the .scss files themselves but I am concerned about potential side effects. Maybe something to do once everything has been sorted and we have Visual regression tests. Having different weights may make things harder for devs to find in .scss files and I would question if having items not in alphabetical order in the comp lib menu would make items harder to find in the component library.

rpowis commented 8 years ago

Having different weights may make things harder for devs to find in .scss files

I agree that the order of the components in the files should reflect the order in the comp-lib nav but...

It would be nice to order the items alphabetically in the .scss files themselves

I'd argue they should be listed in the way pages tend to be built out, starting with layout (grids, typography, etc.) through more commonly used components (buttons, forms, etc.) to components with more specific use-case (accordian, side-nav, etc.).

The addition of search might help negate the issue anyway.