ic-ui-kit icon indicating copy to clipboard operation
ic-ui-kit copied to clipboard

Divider component

Open MI6-255 opened this issue 2 years ago • 7 comments

Summary

Expose a divider component to be used to divide up content on a page with a thin line

💰 User value

Reduce the need for end developers to re invent the wheel

AC

Config Given that a divider component is being configured When setting its properties Then the following suggested properties can be set: • Appearance – Default (default), Light, Dark, Theme • Style – Solid (default), Dashed • Weight – Very thin (default), Thin, Medium, Thick, Very thick • Orientation – Horizontal (default), Vertical • Label position – No label (default), Left-aligned, Centred, Right-aligned, Top, Bottom (Label could be a Boolean with true/ false. And then these options are uncovered).

Sizing Given that a divider component is being implemented When configuring it Then its width can be set to a custom value And any text labels should wrap onto multiple lines if then required

Given that a divider component is being implemented When configuring it Then its height can be set to a custom value

Given that a divider component is being implemented When configuring it Then its weight can be set to a value of either 1px, 2px, 4px, 8px, 12px And any text labels should wrap onto multiple lines if then required And the width of the label is constant (default – 1px)

Given that a divider component is being implemented When configuring it Then its orientation can be set to Horizontal or Vertical And its width can be set to a custom value

Given that a divider component is being implemented When configuring it Then its padding can be set to a custom value

Content Given that a divider component is being implemented with a label When configuring it Then the label text should wrap.

Given that a vertical divider component is being implemented with a label When configuring it Then the label text should be on the left side of the divider And can be set to Top, Centre, Bottom.

Accessibility – (How we want it to be announced by a screen reader)

Given that a divider component is being implemented with a label When configuring it Then the rendered element should be changed to a plain

using the component prop And the setting should be changed to role= ‘presentation’ to ensure that it is not announced by screen readers while still preserving the semantics of the elements inside it.

Given that a divider component is being implemented with an accessible label When configuring it Then additional context to a label that is not displayed visually should be provided And the additional context should be announced by a screen reader

MI6-255 avatar Dec 19 '23 11:12 MI6-255

Assuming this does not need a component page, however, any ideas on how the developers are made aware of its availability?

jd239 avatar Jan 03 '24 16:01 jd239

I think for that reason, it'd need a component page, even if it is very basic

MI6-255 avatar Jan 04 '24 09:01 MI6-255

This ticket needs ACs (acceptance criteria) @GCHQ-Designer-777

GCHQ-Developer-112 avatar Jul 29 '24 14:07 GCHQ-Developer-112

Added now ^

GCHQ-Designer-777 avatar Jul 29 '24 14:07 GCHQ-Designer-777

Design still have a bit of work to do on this, they'll hand it back when they're done

GCHQ-Developer-299 avatar Aug 08 '24 09:08 GCHQ-Developer-299

Handed over to engineering, outstanding questions addressed.

GCHQ-Developer-094 avatar Aug 13 '24 13:08 GCHQ-Developer-094

Theme tokens created in branch 2527

gd2910 avatar Oct 03 '24 15:10 gd2910