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(ChatButton): add,utilize chat button tokens for quick action button #15923

Merged
merged 4 commits into from
Mar 11, 2024

Conversation

tw15egan
Copy link
Collaborator

@tw15egan tw15egan commented Mar 8, 2024

Closes #15920

Adds in 6 new ChatButton specific tokens, and styles to apply these tokens

Note: these will only style the isQuickAction variant. Normal button tokens can be used to style the different kinds of ChatButton.

Changelog

New

  • New Tokens:
    • $chat-button
    • $chat-button-hover
    • $chat-button-text-hover
    • $chat-button-selected
    • $chat-button-active
    • $chat-button-text-selected
  • Styles to ensure these tokens are applied correctly

Changed

  • Replaced generic tokens with ChatButton specific tokens

Testing / Reviewing

To test, replace the normal styles import in ./storybook/styles.scss with the following:

@use '../index.scss' as styles with (
  $theme: (
    chat-button: crimson,
    chat-button-hover: coral,
    chat-button-text-hover: rebeccapurple,
    chat-button-active: chartreuse,
    chat-button-selected: darkorange,
    chat-button-text-selected: limegreen,
  )
);

:root {
  @include styles.theme();
}

and ensure that only the quick action ChatButton variant has its token values changed. Ensure all states are styled properly

Copy link

netlify bot commented Mar 8, 2024

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit e61a733
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/65eb80adb38cf20008d3dce3
😎 Deploy Preview https://deploy-preview-15923--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.

Copy link
Member

@aagonzales aagonzales left a comment

Choose a reason for hiding this comment

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

On the selected ones, the text shouldn't change color on hover (top one). It should stay "$chat-button-text-selected:
image

@tw15egan tw15egan force-pushed the chat-button-tokens branch from f697621 to c760c5d Compare March 8, 2024 21:17
@tw15egan
Copy link
Collaborator Author

tw15egan commented Mar 8, 2024

@aagonzales fixed 👍

@tw15egan tw15egan added this pull request to the merge queue Mar 11, 2024
Merged via the queue into carbon-design-system:main with commit 23c0998 Mar 11, 2024
20 checks passed
@tw15egan tw15egan deleted the chat-button-tokens branch March 11, 2024 14:47
@carbon-automation
Copy link
Contributor

Hey there! v11.53.0 was just released that references this issue/PR.

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.

[AI] Add white-labeling tokens for the chat quick action button
4 participants