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(breadcrumb): sm size #18665

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

ariellalgilmore
Copy link
Member

@ariellalgilmore ariellalgilmore commented Feb 21, 2025

Closes #18356

worked with @Gururajj77 !

Add new prop size to breadcrumb

Changelog

New

  • sm breadcrumb option
  • new styles for sm breadcrumb
  • web component need to pass down size prop to breadcrumb-item otherwise wouldn't be able to change breadcrumb-overflow-menu size
  • new tests for react

Changed

  • tooltip styles
    • added a text wrap because if you added a definition tooltip inside breadcrumb then it wouldn't wrap and just get cut off

Testing / Reviewing

Go to breadcrumb stories for both react and wc. Change the control size to sm and compare to specs

Copy link

netlify bot commented Feb 21, 2025

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

Name Link
🔨 Latest commit acce2eb
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-web-components/deploys/67bf8c0aa4a14700082bffd1
😎 Deploy Preview https://deploy-preview-18665--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 Feb 21, 2025

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit acce2eb
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/67bf8c0a31592d0008a8ba31
😎 Deploy Preview https://deploy-preview-18665--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 Feb 21, 2025

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit acce2eb
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/67bf8c0ac0ff940008f35e8c
😎 Deploy Preview https://deploy-preview-18665--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 Feb 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.34%. Comparing base (1d57a3a) to head (acce2eb).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #18665   +/-   ##
=======================================
  Coverage   84.34%   84.34%           
=======================================
  Files         408      408           
  Lines       14645    14645           
  Branches     4791     4791           
=======================================
  Hits        12352    12352           
  Misses       2131     2131           
  Partials      162      162           

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

Copy link

@sunny-babbar sunny-babbar left a comment

Choose a reason for hiding this comment

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

@ariellalgilmore

Thank you to work on this and it is looking really great!

Here are some things I noticed:

Deploy preview for web-components:
Screenshot 2025-02-24 at 9 53 51 AM

  1. Overflow - open state:
  • Currently if you open the overflow the drop down is missing a caret and does not look like the drop down component
  • The hover state is missing the tooltip of "Options"

Example:
Screenshot 2025-02-24 at 9 54 07 AM

Screenshot 2025-02-24 at 10 04 12 AM

Deploy preview for React:
Screenshot 2025-02-24 at 9 56 52 AM

  1. Overflow icon color
  • Currently the icon color is $text-primary and should be at #link-primary
Screenshot 2025-02-24 at 9 57 01 AM

Example:
Screenshot 2025-02-24 at 10 11 20 AM

  1. Hover tooltip placement
  • Currently the hover tooltip placement is top aligned to the overflow icon, it should be bottom aligned under the overflow icon

Example:
Screenshot 2025-02-24 at 10 04 12 AM

FYI @laurenmrice

@ariellalgilmore
Copy link
Member Author

@sunny-babbar thanks for the review! just pushed some fixes! React should be updated at the next deploy preview. For web components the caret/hover issue should be fixed as part of the parity work here: #18414.

@sunny-babbar
Copy link

@ariellalgilmore Great thank you for the update on bug fixes!

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.

Super cool that you were able to include react & wc updates here in one PR 🔥

Comment on lines +48 to +50
.#{$prefix}--breadcrumb--sm .#{$prefix}--breadcrumb-item {
margin-inline-end: $spacing-02;
}
Copy link
Member

Choose a reason for hiding this comment

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

This and the other size-related styling is fine as-is but just as a heads up we'll eventually want this component to take advantage of the contextual layout tokens, #13923

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.

Could we add a react VRT test for the small breadcrumb? We should be able to pass controls/args to the snapshot helper function(s) to set size to sm

ariellalgilmore and others added 2 commits February 25, 2025 12:13
…test.js

Co-authored-by: Taylor Jones <tay1orjones@users.noreply.github.com>
@laurenmrice
Copy link
Member

Hey @ariellalgilmore this is looking really good, I also saw a small bug here:

Breadcrumb With Overflow Menu story

  • The focus border around the “…” should have a 1px stroke and not 2px stroke.
  • The focus box should be the same height as when the focus is on a text breadcrumb.

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.

Spoke with Ari, and we will make a separate issue for the overflow bugs because it is unrelated to the small breadcrumb changes. Looks good to me!

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.

[Small breadcrumb] React Implementation
5 participants