Skip to content
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

feat: [M3-7579] - Design Tokens (CDS 2.0) #10022

Merged

Conversation

jaalah-akamai
Copy link
Contributor

@jaalah-akamai jaalah-akamai commented Dec 27, 2023

Description 📝

Initial pass to replace the hard-coded styles in the light.ts theme file with their corresponding design tokens, so that we can achieve consistency in styling and facilitate future theming. We will be doing more structural changes to the theme files in the near future. These design tokens are in sync with Core Design System (CDS) 2.0 decisions being made for Akamai.

Benefits:

  • Single source of truth for design decisions
  • Autocompletion
  • Type Checking / Inference
  • Design consistency across Akamai projects

Changes 🔄

  • New dependency "@linode/design-language-system": "^1.0.0"
  • Updated some of our status colors in the app to use the equivalent design token
  • Storybook color palettes have been updated automatically.

Preview 📷

Before After
Screenshot 2024-06-04 at 5 34 24 PM Screenshot 2024-06-04 at 5 33 24 PM
Screenshot 2024-06-04 at 5 30 44 PM Screenshot 2024-06-04 at 5 30 30 PM

How to test 🧪

Prerequisites

  • Checkout branch
  • yarn install && yarn build && yarn dev

Reproduction steps

Verification steps

As an Author I have considered 🤔

Check all that apply

  • 👀 Doing a self review
  • ❔ Our contribution guidelines
  • 🤏 Splitting feature into small PRs
  • ➕ Adding a changeset
  • 🧪 Providing/Improving test coverage
  • 🔐 Removing all sensitive information from the code and PR description
  • 🚩 Using a feature flag to protect the release
  • 👣 Providing comprehensive reproduction steps
  • 📑 Providing or updating our documentation
  • 🕛 Scheduling a pair reviewing session
  • 📱 Providing mobile support
  • ♿ Providing accessibility support

@jaalah-akamai jaalah-akamai added Ready for Review Design Tokens Laying the groundwork for Design Tokens labels Dec 27, 2023
@jaalah-akamai jaalah-akamai self-assigned this Dec 27, 2023
@jaalah-akamai jaalah-akamai requested a review from a team as a code owner December 27, 2023 18:52
@jaalah-akamai jaalah-akamai requested review from coliu-akamai and tyler-akamai and removed request for a team December 27, 2023 18:52
@@ -6,45 +6,47 @@
* I'll create a tech debt ticket in jira to keep track of this issue.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This entire file was untouched - I just ran ESLINT against it.

@@ -75,8 +75,8 @@ const useStyles = makeStyles<void, 'linkItem'>()(
opacity: 1,
},
'& svg': {
color: theme.color.teal,
fill: theme.color.teal,
Copy link
Contributor Author

@jaalah-akamai jaalah-akamai Dec 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Teal was green in production, whereas it's actually teal with new design tokens. I just updated this to use our new status color for success (green).

@jaalah-akamai jaalah-akamai marked this pull request as draft December 28, 2023 15:41
Copy link
Member

@bnussman-akamai bnussman-akamai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat! It's gonna take me a bit to get use to all of the new colors, but things look solid!

The table header looks much different, and slightly less appealing now in my opinion. Is this change to bring us into alignment with Akamai's tables?

@jaalah-akamai
Copy link
Contributor Author

The table header looks much different, and slightly less appealing now in my opinion. Is this change to bring us into alignment with Akamai's tables?

Yes! The table will look much different once we actually apply the Table tokens. We can either decide to make that change now or in an upcoming PR. I was hesitant in doing anything drastic with this first PR and was more trying to do a 1:1 mapping.

@jaalah-akamai jaalah-akamai requested a review from a team as a code owner June 4, 2024 21:29
@jaalah-akamai jaalah-akamai requested review from jdamore-linode and removed request for a team June 4, 2024 21:29
borderColor: Select.Default.Border,
// TODO: designTokens - figure out why:
// - Select.Default.Text and Select.Focus.Text would be different colors
// - Why Select.Default.Text (#a3a3ab) looks like a disabled color (maybe that's just the discrepancy)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaalah-akamai any idea about this one? I changed it for now but using Select.Default.Text looks like a disabled style then color changes on focus which is not what we want

@dwiley-akamai dwiley-akamai self-requested a review June 18, 2024 21:31
Copy link
Contributor

@dwiley-akamai dwiley-akamai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Visually audited the app in light and dark mode ✅

Nice work, I like some aspects of this better than the current design, such as the blue hover/selection state for primary nav items instead of green.

Screenshots & Questions

Screenshot 2024-06-20 at 12 44 13 PM

  1. Do we expect to keep the jet black background? It feels a bit jarring. And it looks like we have some stray miscoloration in the bottom left.
  2. Do we expect to keep the light gray borders/outlines on the elements? It makes the app look busier than the current dark gray borders/outlines IMO.

Screenshot 2024-06-20 at 12 36 15 PM

Copy link
Member

@bnussman-akamai bnussman-akamai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

List of things I've noticed. Looks great!

Note

I might keep adding stuff to this comment so keep an eye out for new items added

Popovers/Menus have no contrast I feel like popovers/menus should have a different background color than the app's background color.
Top Nav icon colors inconsistant Can we make the hamburger icon the same color as the other ones?

Screenshot 2024-06-20 at 3 25 32 PM

Random black in the bottom left on smaller viewports Can this be fixed?

Screenshot 2024-06-20 at 3 27 34 PM

Can we add a contrasting background color to the footer? Previously, we only had contrast in dark mode. I'd personally like to see the footer have a contrasting background color it in both themes

Screenshot 2024-06-20 at 3 28 59 PM

Can we make entity icons not green? I'm not sure if these were intentionally kept green. Can we make then blue, gray, or white?

Screenshot 2024-06-20 at 3 33 10 PM

@abailly-akamai
Copy link
Contributor

Addressed some of the feedback from @dwiley-akamai & @bnussman-akamai which I will list here (dark theme only, did not touch light theme):

Do we expect to keep the jet black background? It feels a bit jarring. And it looks like we have some stray miscoloration in the bottom left.

  • miscoloration (also mentioned by Banks) has been fixed
  • i had to re-work the jet-black/primary nav/top nav handling cause styling was a bit broken - eventually the jet black will be our top bar bg (CDS styles) but we will have to rework how the primary nav is built to make them work together. for now i lightened it some to transition over smoothly to the future CDS styles and kept the sidebar somewhat similar to what it is now (darker) to minimize impact and keep experience nice

Do we expect to keep the light gray borders/outlines on the elements? It makes the app look busier than the current dark gray borders/outlines IMO.

yes, these are the styles for CDS 2.0 which Cloud Manager is adopting now and will increase adoption in the next major update

Popovers/Menus have no contrast

yeah i agree this isn't the best experience so I added contrast back

Top Nav icon colors inconsistent

fixed!

Can we add a contrasting background color to the footer?

leaving this one out cause the light theme does not have it and i don't think we need to in the dark mode either (trying to keep themes consistent in terms of main elements)

Can we make entity icons not green?

That will be coming in the future but for now marketing/product styling is out of scope.

@abailly-akamai abailly-akamai merged commit fc680a6 into linode:develop Jun 24, 2024
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Multiple approvals and ready to merge! Design Tokens Laying the groundwork for Design Tokens Ready for Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants