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

chore(cards): rename aiLabel to decorator #6509

Conversation

sangeethababu9223
Copy link
Member

Closes #6452

Rename aiLabel prop to decorator in ExpressiveCard / ProductiveCard

What did you change?

Updated the prop name aiLabel in Expressive Card, Productive Card and Card files to decorator.
Updated the card style to only show gradient styling when AILabel component is passed.

How did you test and verify your work?

Storybook

Copy link

netlify bot commented Nov 26, 2024

Deploy Preview for ibm-products-web-components ready!

Name Link
🔨 Latest commit 1b5513e
🔍 Latest deploy log https://app.netlify.com/sites/ibm-products-web-components/deploys/6745ba60dcf4c4000891d01d
😎 Deploy Preview https://deploy-preview-6509--ibm-products-web-components.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

netlify bot commented Nov 26, 2024

Deploy Preview for carbon-for-ibm-products ready!

Name Link
🔨 Latest commit 1b5513e
🔍 Latest deploy log https://app.netlify.com/sites/carbon-for-ibm-products/deploys/6745ba60f75aa30008b226a1
😎 Deploy Preview https://deploy-preview-6509--carbon-for-ibm-products.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

netlify bot commented Nov 26, 2024

Deploy Preview for ibm-products-web-components ready!

Name Link
🔨 Latest commit bdf626c
🔍 Latest deploy log https://app.netlify.com/sites/ibm-products-web-components/deploys/675135ce8104110008be8112
😎 Deploy Preview https://deploy-preview-6509--ibm-products-web-components.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

netlify bot commented Nov 26, 2024

Deploy Preview for carbon-for-ibm-products ready!

Name Link
🔨 Latest commit bdf626c
🔍 Latest deploy log https://app.netlify.com/sites/carbon-for-ibm-products/deploys/675135ce09c89f0008f40bca
😎 Deploy Preview https://deploy-preview-6509--carbon-for-ibm-products.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

codecov bot commented Nov 26, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 79.98%. Comparing base (f432ae4) to head (bdf626c).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6509      +/-   ##
==========================================
+ Coverage   79.91%   79.98%   +0.06%     
==========================================
  Files         394      394              
  Lines       12888    12894       +6     
  Branches     4267     4273       +6     
==========================================
+ Hits        10300    10313      +13     
+ Misses       2588     2581       -7     
Components Coverage Δ
ibm-products ∅ <ø> (∅)
ibm-products-web-components ∅ <ø> (∅)

@sangeethababu9223 sangeethababu9223 marked this pull request as ready for review November 27, 2024 09:12
@sangeethababu9223 sangeethababu9223 requested a review from a team as a code owner November 27, 2024 09:12
@sangeethababu9223 sangeethababu9223 requested review from elycheea and amal-k-joy and removed request for a team November 27, 2024 09:12
Copy link
Contributor

@elycheea elycheea left a comment

Choose a reason for hiding this comment

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

Made some suggestions to have the default decorator styles be set without the AI styles and only add them when there’s an --ai-label or --slug present, similar to the implementation we see in Core.

packages/ibm-products/src/components/Card/Card.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@amal-k-joy amal-k-joy left a comment

Choose a reason for hiding this comment

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

Can we add some tests for decorator?

@sangeethababu9223
Copy link
Member Author

Can we add some tests for decorator?

I've added a basic test case for the decorator.

amal-k-joy
amal-k-joy previously approved these changes Dec 3, 2024
Copy link
Contributor

@amal-k-joy amal-k-joy left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -185,7 +199,8 @@ $block-class: #{c4p-settings.$pkg-prefix}--card;
}

.#{$block-class}__clickable.#{$block-class}--has-slug::before,
.#{$block-class}__clickable.#{$block-class}--has-ai-label::before {
.#{$block-class}__clickable.#{$block-class}--has-ai-label::before,
.#{$block-class}__clickable.#{$block-class}--has-decorator::before {
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
.#{$block-class}__clickable.#{$block-class}--has-decorator::before {
.#{$block-class}__clickable.#{$block-class}--has-decorator::before {

I think for has--decorator, we don’t want to tie this to the popover styles since this could be separate.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks @elycheea,
This is updated.

@sangeethababu9223 sangeethababu9223 added this pull request to the merge queue Dec 9, 2024
Merged via the queue into carbon-design-system:main with commit 6e58e9d Dec 9, 2024
31 checks passed
@sangeethababu9223 sangeethababu9223 deleted the chore/card-rename-ailabel-to-decorator branch December 9, 2024 05:59
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.

Rename aiLabel prop to decorator in ExpressiveCard / ProductiveCard
3 participants