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

refactor: [M3-9031] - Replace one-off hardcoded color values with color tokens pt5 #11488

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

hasyed-akamai
Copy link
Contributor

Description 📝

  • Replace one-off hardcoded color values with color tokens - Part 5
  • colorTokens are global tokens, and they are theme-agnostic.

Note

The new colors are based on design tokens and have been selected to closely match the existing colors.

Changes 🔄

  • Replaced #aaa with theme.tokens.color.Neutrals[50] #a3a3ab
  • Replaced #243142 with ttheme.tokens.color.Brand[100] #00314d
  • Replaced gray with theme.tokens.color.Neutrals[60] #83838c
  • Replaced #6e6e6e with theme.tokens.color.Neutrals[70] #696970
  • Replaced #979797 with theme.tokens.color.Neutrals[60] #83838c
  • Replaced #3683dc with theme.tokens.color.Ultramarine[80] #3a5ccc
  • Replaced blue with theme.graphs.blue
  • Replaced darkGreen with theme.graphs.darkGreen
  • Replaced lightGreen with theme.graphs.lightGreen
  • Replaced purple with theme.graphs.purple
  • Replaced yellow with theme.graphs.yellow
  • Replaced red with theme.graphs.red

Target release date 🗓️

N/A

Preview 📷

  • Slight change in the colors.
  • The new colors are based on design tokens and have been selected to closely match the existing colors.

How to test 🧪

  • Ensure everything builds properly
  • Use colorpicker to differentiate between the two colors

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

@hasyed-akamai hasyed-akamai self-assigned this Jan 8, 2025
@hasyed-akamai hasyed-akamai added the Design Tokens Laying the groundwork for Design Tokens label Jan 8, 2025
@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🔺 24 failing tests on test run #2 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
24 Failing449 Passing2 Skipped80m 27s

Details

Failing Tests
SpecTest
clone-linode.spec.tsclone linode » can clone a Linode from Linode details page
rescue-linode.spec.tsRescue Linodes » Can reboot a Linode into rescue mode
update-firewall.spec.tsupdate firewall » updates a firewall's linodes and rules
update-firewall.spec.tsupdate firewall » updates a firewall's status
update-firewall.spec.tsupdate firewall » updates a firewall's label
rebuild-linode.spec.tsrebuild linode » rebuilds a linode from Image
rebuild-linode.spec.tsrebuild linode » rebuilds a linode from Community StackScript
smoke-delete-linode.spec.tsdelete linode » deletes linode from linode details page
smoke-delete-linode.spec.tsdelete linode » deletes linode from setting tab in linode details page
smoke-delete-linode.spec.tsdelete linode » deletes linode from linode landing page
smoke-delete-linode.spec.tsdelete linode » deleting multiple linodes with action menu
create-stackscripts.spec.tsCreate stackscripts » creates a StackScript with Any/All target image
create-firewall.spec.tscreate firewall » creates a firewall assigned to a linode
create-linode-region-select.spec.tsLinode Create Region Select » region select
create-volume.spec.tsvolume create flow » creates an attached volume
create-volume.spec.tsvolume create flow » displays a warning notice on Volume Create page re: rebooting for client library updates under the appropriate conditions
create-volume.spec.tsvolume create flow » displays a warning notice re: rebooting for client library updates under the appropriate conditions in Create/Attach Volume drawer
create-volume.spec.tsvolume create flow » creates a volume from an existing Linode
migrate-linode-with-firewall.spec.tsMigrate Linode With Firewall » migrates linode with firewall - real data
service-transfer.spec.tsAccount service transfers » can initiate and cancel a service transfer
backup-linode.spec.tslinode backups » can enable backups
backup-linode.spec.tslinode backups » can capture a manual snapshot
attach-volume.spec.tsvolume attach and detach flows » attaches a volume to a Linode
search-images.spec.tsSearch Images » creates two images and make sure they show up in the table and are searchable

Troubleshooting

Use this command to re-run the failing tests:

yarn cy:run -s "cypress/e2e/core/linodes/clone-linode.spec.ts,cypress/e2e/core/linodes/rescue-linode.spec.ts,cypress/e2e/core/firewalls/update-firewall.spec.ts,cypress/e2e/core/firewalls/update-firewall.spec.ts,cypress/e2e/core/firewalls/update-firewall.spec.ts,cypress/e2e/core/linodes/rebuild-linode.spec.ts,cypress/e2e/core/linodes/rebuild-linode.spec.ts,cypress/e2e/core/linodes/smoke-delete-linode.spec.ts,cypress/e2e/core/linodes/smoke-delete-linode.spec.ts,cypress/e2e/core/linodes/smoke-delete-linode.spec.ts,cypress/e2e/core/linodes/smoke-delete-linode.spec.ts,cypress/e2e/core/stackscripts/create-stackscripts.spec.ts,cypress/e2e/core/firewalls/create-firewall.spec.ts,cypress/e2e/core/linodes/create-linode-region-select.spec.ts,cypress/e2e/core/volumes/create-volume.spec.ts,cypress/e2e/core/volumes/create-volume.spec.ts,cypress/e2e/core/volumes/create-volume.spec.ts,cypress/e2e/core/volumes/create-volume.spec.ts,cypress/e2e/core/firewalls/migrate-linode-with-firewall.spec.ts,cypress/e2e/core/account/service-transfer.spec.ts,cypress/e2e/core/linodes/backup-linode.spec.ts,cypress/e2e/core/linodes/backup-linode.spec.ts,cypress/e2e/core/volumes/attach-volume.spec.ts,cypress/e2e/core/images/search-images.spec.ts"

@hasyed-akamai hasyed-akamai marked this pull request as ready for review January 8, 2025 07:52
@hasyed-akamai hasyed-akamai requested a review from a team as a code owner January 8, 2025 07:52
@hasyed-akamai hasyed-akamai requested review from dwiley-akamai and harsh-akamai and removed request for a team January 8, 2025 07:52
@dwiley-akamai dwiley-akamai changed the title refactor: [9031] - Replace one-off hardcoded color values with color tokens pt5 refactor: [M3-9031] - Replace one-off hardcoded color values with color tokens pt5 Jan 8, 2025
@@ -39,7 +39,7 @@ const getFlagClass = (country: Country | string) => {

const StyledFlag = styled(Box, { label: 'StyledFlag' })(({ theme }) => ({
boxShadow:
theme.palette.mode === 'light' ? `0px 0px 0px 1px #00000010` : undefined,
theme.palette.mode === 'light' ? `0px 0px 0px 1px #000000` : undefined,
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't have a suitable color token that can be used in place of #000000?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dwiley-akamai, we have a global token for black color: theme.tokens.color.Neutrals.Black with the value #232326. This is slightly different from #000000. If this is what we are expecting, we can go ahead and make the replacement.

Copy link
Contributor Author

@hasyed-akamai hasyed-akamai Jan 10, 2025

Choose a reason for hiding this comment

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

@jaalah , could you please provide your thoughts on the comment above ? 😊

@hasyed-akamai hasyed-akamai added the Add'tl Approval Needed Waiting on another approval! label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Add'tl Approval Needed Waiting on another approval! Design Tokens Laying the groundwork for Design Tokens
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants