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(components): Add semantic colors to typography on mobile [97200] #2033

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

Conversation

Aiden-Brine
Copy link

Motivations

All of the semantic colors should be available for Typography on mobile

Changes

Adds missing semantic colors to Typography.style.ts. Also reorganizes the colors to make it easier to find the color you need in the future and makes deprecated colors clear.

Added

Missing semantic colors for mobile typography

Changed

Re-organizes the colors

Deprecated

Groups various colors to be deprecated in the near future

Removed

No colors were removed

Fixed

N/A

Security

N/A

Testing

Open up storybook via the pre-release branch and locally tp play around with new colors/existing colors to ensure they all work

Changes can be
tested via Pre-release


In Atlantis we use Github's built in pull request reviews.

Random photo of Atlantis

@Aiden-Brine Aiden-Brine force-pushed the JOB-97200/typography-semantic-colours-mobile branch from eb4fd95 to 92d378a Compare September 18, 2024 01:47
Copy link

cloudflare-workers-and-pages bot commented Sep 18, 2024

Deploying atlantis with  Cloudflare Pages  Cloudflare Pages

Latest commit: 18920a7
Status: ✅  Deploy successful!
Preview URL: https://5182a717.atlantis.pages.dev
Branch Preview URL: https://job-97200-typography-semanti-lp2y.atlantis.pages.dev

View logs

@Aiden-Brine Aiden-Brine force-pushed the JOB-97200/typography-semantic-colours-mobile branch 4 times, most recently from 84d9132 to 93b7a3c Compare September 19, 2024 01:37
@Aiden-Brine Aiden-Brine force-pushed the JOB-97200/typography-semantic-colours-mobile branch from 93b7a3c to b043da6 Compare September 19, 2024 01:39
color: tokens["color-brand"],
},

// Deprecated
Copy link
Author

Choose a reason for hiding this comment

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

I did check all of these deprecated colors and unfortunately all of them are being used. I wrote up this issue to remove them

color: tokens["color-heading"],
},

base: {
Copy link
Author

Choose a reason for hiding this comment

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

I could see the argument that we don't want to deprecate base and baseReverse even though they are duplicates. I think we should strive to have no duplicates to cut down on confusion and make things clearer when comparing code but if folks think removing base is a step too far I can remove it from this section

Copy link
Contributor

@chris-at-jobber chris-at-jobber left a comment

Choose a reason for hiding this comment

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

Just a small typo and one suggestion to remove a value!

color: tokens["color-critical"],
},

base: {
color: tokens["color-text"],
criticalSurace: {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
criticalSurace: {
criticalSurface: {

Copy link
Author

Choose a reason for hiding this comment

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

🤦 Nice catch

color: tokens["color-informative--onSurface"],
},

critical: {
// To be uncommented once success in Deprecated is removed
// success: {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should just roll this particular change out and get rid of the one in the deprecated section. It's a fairly low-risk change and probably not worth the complexity of maintaining a present and future version side-by-side? (I know we'll need to with some of the other colors, but making the change to success now means one less duplicate at least)

Copy link
Author

Choose a reason for hiding this comment

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

The reason why I left this out is that currently success is "color-success--onSurface" so in order to set success to "color-success" as it should be I will need to go through the mobile code and set all uses of success to successOnSurface so there is no color change and then remove the old success.

Copy link
Author

Choose a reason for hiding this comment

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

Since successOnSurface isn't available yet this will need to be done in 3 steps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants