carbon-design-system / carbon

A design system built by IBM
https://www.carbondesignsystem.com
Apache License 2.0
7.87k stars 1.82k forks source link

[Status indicators] Implement Icon indicator #17539

Open thyhmdo opened 2 months ago

thyhmdo commented 2 months ago

Specs + Storybook implementation

Final icon specs

sstrubberg commented 1 month ago

Devs need to meet and create a strategy on how to go about implementing this.

tay1orjones commented 1 month ago

Tokens

Requirements

<IconIndicator kind="error" label="my label" size={20}>

Props

Styles

Storybook

Open questions

tay1orjones commented 1 month ago

Open questions

  • When will $status-accessibility-background be used? In what components?
  • Warning status has a dark background behind it, which kinda looks like the fill of some icons
  • In the white theme, we need another $status-accessibility-background-inverted to cover the caution icons that need a gray 100 "fill"
  • Would caution minor/major need a different token value for $status-accessibility-background?
  • Why do some status-blue and status-gray ones not use the $status-accessibility-background
  • For the ones without, they should have a transparent background for the non-color area
  • Does this mean the transparent ones need values for the tokens on each layer to maintain a11y contrast.
  • We can set the background for all of them if we need to
  • Thy will get back to us on this aspect
  • Tooltip

    • If hideLabel, tooltip needs a trigger, which needs to be interactive, but there's no interaction, it's just for the tooltip. Is that okay a11y-wise? Or what would be a better approach?

    • This will mean that text/label is not optional

    • Does it need to be a ToggleTip?

    • Surely the first ask we'll get for this is to have a link inside the tooltip to direct the user to more information somewhere or an action to take.

    • If we either need a node prop for the content or revise the whole API to be more composable and accept children.

  • Should this support the density contextual layout tokens and shrink the margin between the two from 8px to 4px? Or always 8px?

In storybook, just do datatable for now.

tay1orjones commented 1 week ago

Discussed today, we could start with react and styles, then branch off that to do web components. 2PRs total