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(Tabs): allow dismissable tabs to have descriptive icons #13830

Conversation

francinelucca
Copy link
Collaborator

@francinelucca francinelucca commented May 18, 2023

Closes #12845

Changelog

New

-Dismissable tabs with icons story + VRT

  • Test cases for dismissable tabs with icons
  • CSS for new $prefix}--tabs__nav-item--icon-left class

Changed

  • Render tab icon to the left when tab is dismissable

Testing / Reviewing

Check that deployment story matches spec
*Added a temporary "contained" toggle to switch between line/contained tabs for review purposes

TODO:

  • remove contained control in dismissable with icons story

@francinelucca francinelucca requested a review from a team as a code owner May 18, 2023 21:25
@netlify
Copy link

netlify bot commented May 18, 2023

Deploy Preview for carbon-components-react ready!

Name Link
🔨 Latest commit ea2f4cb
🔍 Latest deploy log https://app.netlify.com/sites/carbon-components-react/deploys/646697bb333c500008fa7b46
😎 Deploy Preview https://deploy-preview-13830--carbon-components-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 settings.

@netlify
Copy link

netlify bot commented May 18, 2023

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit ea2f4cb
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/646697bb13b5000007b75f5d
😎 Deploy Preview https://deploy-preview-13830--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 settings.

@netlify
Copy link

netlify bot commented May 18, 2023

Deploy Preview for carbon-components-react ready!

Name Link
🔨 Latest commit 5e2f535
🔍 Latest deploy log https://app.netlify.com/sites/carbon-components-react/deploys/6479016f28030f00086c3238
😎 Deploy Preview https://deploy-preview-13830--carbon-components-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 settings.

@netlify
Copy link

netlify bot commented May 18, 2023

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 5e2f535
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/6479016f21651a00089eedec
😎 Deploy Preview https://deploy-preview-13830--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 settings.

@francinelucca francinelucca requested review from a team, aubrey-oneal, kingtraceyj and laurenmrice and removed request for a team and aubrey-oneal May 18, 2023 21:44
Copy link
Member

@kingtraceyj kingtraceyj 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 to go! 💥

…845-tabs-provide-dismissable-tabs-with-descriptive-icon-tab-layout-helpercomponent
…on-tab-layout-helpercomponent' of github.com:francinelucca/carbon into 12845-tabs-provide-dismissable-tabs-with-descriptive-icon-tab-layout-helpercomponent
Copy link
Member

@laurenmrice laurenmrice 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 to me. Unrelated, but I noticed that on the disabled state for dismissable tabs, the close icon still gets a pointer mouse cursor. It should be the disabled mouse cursor. I can open a separate issue for this if you want.

@francinelucca
Copy link
Collaborator Author

Looks good to me. Unrelated, but I noticed that on the disabled state for dismissable tabs, the close icon still gets a pointer mouse cursor. It should be the disabled mouse cursor. I can open a separate issue for this if you want.

@laurenmrice I made the cursos a pointer since the close button is actually clickable because disabled tabs are dismissable (Ref: #13529 (comment))
image

I can definitely change the cursor to a disabled mouse if that's the intended behavior though 🤔

guidari

This comment was marked as duplicate.

Copy link
Contributor

@guidari guidari left a comment

Choose a reason for hiding this comment

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

I tested locally and LGTM!

Copy link
Member

@tw15egan tw15egan left a comment

Choose a reason for hiding this comment

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

LGTM 👍 ✅

@laurenmrice
Copy link
Member

laurenmrice commented May 31, 2023

@francinelucca Yes, it is the intended behavior that if a dismissable tab is disabled, you can not actively close that tab by using the close icon, so the mouse indicator should be the disabled one. I would say if someone has a different use case for this they could change it on their end.

@francinelucca
Copy link
Collaborator Author

@francinelucca Yes, it is the intended behavior that if a dismissable tab is disabled, you can not actively close that tab by using the close icon, so the mouse indicator should be the disabled one. I would say if someone has a different use case for this they could change it on their end.

#13897

@kodiakhq kodiakhq bot merged commit ad1031b into carbon-design-system:main Jun 1, 2023
@francinelucca francinelucca deleted the 12845-tabs-provide-dismissable-tabs-with-descriptive-icon-tab-layout-helpercomponent branch June 1, 2023 21:07
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.

Tabs: provide dismissable tabs with descriptive icon tab layout helper/component
5 participants