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(icon-indicator): new component #18191

Merged

Conversation

ariellalgilmore
Copy link
Member

Closes #17539

worked on with @preetibansalui and @2nikhiltom! 🎉

New Icon indicator component

Changelog

New

  • new Icon indicator component, stories, tests, readme for react and web components
  • new icon indicator styles
  • new status tokens in themes packags

Changes

  • update data-table dynamic story to include the icon-indicator component in the status column

Testing / Reviewing

confirm icon indicators look good in react and web component storybooks
confirm tests and coverage are passing

Copy link

netlify bot commented Dec 3, 2024

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit 2951971
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-web-components/deploys/677c058cffdf49000832f744
😎 Deploy Preview https://deploy-preview-18191--v11-carbon-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 Dec 3, 2024

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 2951971
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/677c058cdc76f500086a857e
😎 Deploy Preview https://deploy-preview-18191--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.

Copy link

netlify bot commented Dec 3, 2024

Deploy Preview for v11-carbon-react ready!

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

codecov bot commented Dec 3, 2024

Codecov Report

Attention: Patch coverage is 95.23810% with 1 line in your changes missing coverage. Please review.

Project coverage is 84.16%. Comparing base (b7906ad) to head (2951971).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...kages/react/src/components/IconIndicator/index.tsx 91.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #18191      +/-   ##
==========================================
+ Coverage   84.15%   84.16%   +0.01%     
==========================================
  Files         406      408       +2     
  Lines       14407    14428      +21     
  Branches     4690     4688       -2     
==========================================
+ Hits        12124    12144      +20     
- Misses       2118     2119       +1     
  Partials      165      165              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

This looks awesome! Two main points to call out, plus a few addl things in comments

  • The react component needs to be exported from the entrypoint packages/react/src/index.js and packages/react/src/index.ts
    • The exports should be marked unstable/experimental for now so we have space to get feedback and alter the API if necessary
    • export { IconIndicator as unstable__IconIndicator } from './components/IconIndicator';
  • Could the story be updated to align the icons into two uniform columns?

packages/react/src/components/IconIndicator/index.tsx Outdated Show resolved Hide resolved
packages/react/src/components/IconIndicator/index.tsx Outdated Show resolved Hide resolved
packages/react/src/components/IconIndicator/index.tsx Outdated Show resolved Hide resolved
e2e/components/IconIndicator/IconIndicator-test.avt.e2e.js Outdated Show resolved Hide resolved
e2e/components/IconIndicator/IconIndicator-test.e2e.js Outdated Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

Could put an example of these in the custom-theme example if you'd like, alongside the button override.

// override a component token
@use '@carbon/react/scss/components/button/tokens' as button-tokens with (
$button-primary: #3f51b5
);

Copy link
Member Author

Choose a reason for hiding this comment

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

i added it to this PR, but since the styles/component hasn't been released yet it's causing the build to fail. I will remove for now and make a PR once this is in the next release.

@tay1orjones
Copy link
Member

Overall I think this is in good shape for a visual review @thyhmdo 👍

@thyhmdo
Copy link
Member

thyhmdo commented Jan 2, 2025

@ariellalgilmore This looks great! There's only one thing and this is on my that I didn't check on the name update. But these two status icons' names need tobe updated:

Error --> Failed
Information --> Informative

Copy link
Member

@thyhmdo thyhmdo left a comment

Choose a reason for hiding this comment

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

Looks great!

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.

LGTM!

@ariellalgilmore ariellalgilmore added this pull request to the merge queue Jan 6, 2025
Merged via the queue into carbon-design-system:main with commit 03ec6cb Jan 6, 2025
37 checks passed
@ariellalgilmore ariellalgilmore deleted the feat/icon-indicators branch January 6, 2025 17:39
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.

[Status indicators] Implement Icon indicator
5 participants