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: added $layer token in the background-color #14726

Merged

Conversation

guidari
Copy link
Contributor

@guidari guidari commented Sep 27, 2023

Closes #5410

Added the $layer token to the background-color, so the user can override the background using tokens.

Changelog

New

  • New stories created to cover @vrt testing

Testing / Reviewing

Make sure the change is right. You can inspect the code to see the layer in the background

@guidari guidari requested a review from a team as a code owner September 27, 2023 18:35
@netlify
Copy link

netlify bot commented Sep 27, 2023

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 59f0c5e
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/651475e27e552300089b5b4a
😎 Deploy Preview https://deploy-preview-14726--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Sep 27, 2023

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 59f0c5e
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/651475e2bc7d0400086db223
😎 Deploy Preview https://deploy-preview-14726--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Sep 27, 2023

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit 963c5cc
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/655407992728ad0008322478
😎 Deploy Preview https://deploy-preview-14726--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Sep 27, 2023

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 462e33a
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/65539c18e541f9000788bcc4
😎 Deploy Preview https://deploy-preview-14726--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@guidari guidari marked this pull request as draft September 28, 2023 12:02
@guidari guidari marked this pull request as ready for review October 3, 2023 14:10
@guidari
Copy link
Contributor Author

guidari commented Oct 3, 2023

Hey @tay1orjones

I put this to review, but I'm not sure if the storybook looks good enough. I mean, everything works fine, the thing is that I couldn't rewrite the token. I was trying to rewrite the packages/styles/scss/components/structured-list/_structured-list.scss file in a similiar way like this example, but I had no lucky:

Looks like we can't rewrite since the module was already loaded, so it can't be configured using "with".

Not sure if the helper function you mentioned was something like that.

@use '@carbon/react/scss/theme' with (
$theme: (
// add a completely new token
custom-token: #bada44,
// redefine existing tokens to new values
text-error: rebeccapurple,
focus: pink,
)
);

Copy link
Member

@tay1orjones tay1orjones left a comment

Choose a reason for hiding this comment

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

Sorry I missed this @guidari, based on what you're saying I think we're actually okay here. To rewrite this background, you'd need to globally redefine the $layer token when @useing the @carbon/react/scss/theme the first time.

I think once this is merged we could create a stackblitz example that redefines $layer, it's sort-of difficult to override the tokens for testing within storybook

@sstrubberg sstrubberg requested a review from thyhmdo October 30, 2023 20:33
Copy link
Member

@tay1orjones tay1orjones left a comment

Choose a reason for hiding this comment

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

Nice! This looks correct, but the changes to typescript-config-carbon and the d.ts files shouldn't be in here. If these are from a yarn build, I'm not sure why they're not ignored and were included here 🤔

…-list-background' of github.com:guidari/carbon into 5410-structured-list-background
@guidari guidari enabled auto-merge November 14, 2023 19:38
@guidari guidari added this pull request to the merge queue Nov 14, 2023
@andreancardona andreancardona removed this pull request from the merge queue due to a manual request Nov 14, 2023
@andreancardona andreancardona added this pull request to the merge queue Nov 14, 2023
Merged via the queue into carbon-design-system:main with commit 0f090f0 Nov 15, 2023
18 checks passed
danoro96 pushed a commit to danoro96/carbon that referenced this pull request Jan 18, 2024
…m#14726)

* feat: added layer toke in the background color

* fix: remove scss

* fix: fixed vrt test name

* fix: added background style

* fix: removed storybook and vrt testing

* fix: added layer stories

* fix: removed wrong files

---------

Co-authored-by: Taylor Jones <tay1orjones@users.noreply.github.com>
Co-authored-by: Andrea N. Cardona <cardona.n.andrea@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[structured list] add background option
4 participants