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(Slug): implement AI Slug #14998

Merged
merged 21 commits into from
Oct 26, 2023
Merged

Conversation

tw15egan
Copy link
Collaborator

@tw15egan tw15egan commented Oct 23, 2023

Closes #14947

Adds in the unstable__slug component

Changelog

New

  • unstable__Slug component with default, hollow, and inline variants
  • added a few more "temporary" AI tokens to handle light v dark mode (we can change these later)

Testing / Reviewing

Go to unstable__Slug under the experimental section at the bottom and verify against the spec

@netlify
Copy link

netlify bot commented Oct 23, 2023

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit cccb87a
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/653a746f61462a000880888f
😎 Deploy Preview https://deploy-preview-14998--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 Oct 23, 2023

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit cccb87a
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/653a746f9a2b5d00080f8f6c
😎 Deploy Preview https://deploy-preview-14998--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.

@tw15egan tw15egan marked this pull request as ready for review October 24, 2023 20:51
@tw15egan tw15egan requested review from a team as code owners October 24, 2023 20:51
@tw15egan
Copy link
Collaborator Author

tw15egan commented Oct 24, 2023

@aagonzales pushed this up to get some feedback, spacing is definitely off on inline variants but are easy fixes. Wanted to get it up ASAP so we can iterate

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.

I'm still reviewing but want to go ahead and post things as I see them.

Adjustments needed for the inline slug:

  • corner radius: 1px
  • padding top/bottom: 4px
  • padding left/right: 8px

(top to be, bottom as-is)
image

@aagonzales
Copy link
Member

A couple more tweaks for the inline with text: @tw15egan

  • the padding top/bottom is still too big, can you take it down to 2px
  • padding between AI and Text should be 4px not 8px
image

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.

Incredible work, looks great to me! 🏆

packages/react/src/components/Slug/Slug.js Outdated Show resolved Hide resolved
Copy link
Contributor

@andreancardona andreancardona left a comment

Choose a reason for hiding this comment

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

looks good on my end!

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.

woo-hoo! TJ these look awesome. Only two small things and the second isn't even that important.

  1. Its inline slug again, the hollow dot on the two smaller sizes are misaligned by 1px. Can you move the hollow dot over 1px to the left.
image
  1. Ok this one probably doesn't matter too much but if its easy would we adjust the text colors of the content inside the example callout (very low priority for Thursday release)
image

Other than that I its good for the first release tomorrow 🎉

@tw15egan
Copy link
Collaborator Author

@aagonzales updated 👍🏻

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.

Looks good for v1, ship it! 👍 ✅

@tw15egan tw15egan enabled auto-merge October 26, 2023 14:42
@tw15egan tw15egan added this pull request to the merge queue Oct 26, 2023
Merged via the queue into carbon-design-system:main with commit b1c721c Oct 26, 2023
14 checks passed
@tw15egan tw15egan deleted the ai-slug branch October 26, 2023 15:12
@carbon-automation
Copy link
Contributor

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

Tomahaawk pushed a commit to Tomahaawk/carbon that referenced this pull request Oct 31, 2023
* feat(Slug): scaffold out AI Slug component

* feat(slug): add gradient tokens to themes, hover styles

* feat(slug): add focus styles, cleanup storybook

* fix(Theme): adjust small slug hover tokens

* feat(Slug): add hollow slug

* feat(Slug): initial inline styles

* chore(snapshot): update snapshots

* feat(Slug): add inline styles

* fix(Slug): refactor inline variant

* style(Slug): tweak inline styles

* style(Slug): add hover styles to inline variant

* style(Slug): add initial callout styles

* style(Slug): tokenize gradients

* style(Slug): adjust padding

* chore: udpate snapshots

* style(Slug): adjust padding with hollow dot, fix text colors

* fix(Slug): fix hover styles when focused

* refactor(Slug): remove ai from prefix

---------

Co-authored-by: Andrea N. Cardona <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

C4AI Slug: Implement the interactive Slug component in @carbon/react
4 participants