carbon-design-system / carbon-for-ibm-dotcom

Carbon for IBM.com is based on the Carbon Design System for IBM
https://www.ibm.com/standards/carbon/
Apache License 2.0
269 stars 156 forks source link

Investigate Expressive theme + Carbon for IBM.com components: Target 20-25 #4341

Closed oliviaflory closed 3 years ago

oliviaflory commented 4 years ago

User Story

As a DDS designer and developer:

I need to:

investigate how the expressive theme might affect the Carbon for IBM.com components

so that I can:

make a plan to resolve any issues.

Additional information

Type token list

Acceptance criteria

RobertaJHahn commented 3 years ago

Added to the Nov 23 engineering meeting agenda for review and assignment.

oliviaflory commented 3 years ago

Anna and I reviewed the tokens used within the Carbon for IBM.com components on Monday, Dec 7th. Documented potential tokens and components that would be affected in Box note

Next steps: Anna is going to investigate:

oliviaflory commented 3 years ago
  • if the expressive theme is being applied to our React and Web component story books
  • why the expressive theme type scales don't seem to be changing visually in the storybook

Answer from Anna: we do have the expressive theme enabled in storybook

however when developing we used the productive-zoning mixin that we created a couple months ago when we were going through the megamenu design specs

so for the components using body-long-01 we also used the use-carbon-productive-tokens() mixin which reverts the value back to the productive value

.#{$prefix}--content-item-horizontal__item--eyebrow {
    color: $text-05;
    padding-bottom: $spacing-03;
    @include use-carbon-productive-tokens();
    @include carbon--type-style('body-long-01');
  }

even if the adopters apply the expressive theme, the productive value is being used for that instance we apply the mixin to


Proposal:

Anna and I agreed that it would be more beneficial to our adopters if we used a single scale and moved everything to use expressive so there aren’t multiple values for one token like $body-short-01 = 14px sometimes and 16px sometimes.

We plan to:

oliviaflory commented 3 years ago

WIP

Will be updating with pros + cons to each approach and examples of what tokens would look like in specs

Anna and I shared our proposal in Huddle Dec 10th and discussed a few different approaches and the pros and cons associated with them.

Option 1

Change all components to expressive tokens, and add new token to accommodate mega menu heading style need option 1

Option 2

Change all components to expressive tokens, and mega menu gets a hard coded heading style option 2

Option 3

Change all components to expressive tokens, and mega menu maintains productive-mixin option 3

Option 4

Leave components as they are with productive tokens, hard coding productive moments where we need to and using productive-mixin option 4


Consolidated list of all approaches IBM-dotcom-Carbon-components--with--Expressive-theme--explorations

oliviaflory commented 3 years ago

Met with Anna, Jeff and Wonil, we determined that Option 3: Change all components to expressive tokens, and mega menu maintains productive-mixin is the best approach.

I will create a dev story and design story identifying which tokens need to be swapped out in our code and design specs to wrap up this issue.