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
[CL-221] Add chip-select component #9021
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9021 +/- ##
========================================
Coverage 28.15% 28.15%
========================================
Files 2369 2375 +6
Lines 70028 70220 +192
Branches 13160 13172 +12
========================================
+ Hits 19718 19773 +55
- Misses 48751 48882 +131
- Partials 1559 1565 +6 ☔ View full report in Codecov by Sentry. |
This comment was marked as off-topic.
This comment was marked as off-topic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For an initial commit this looks good.
In Figma I have the chip text-size as body2
. We might want to update that now since it doesn't rely on any new styles. But I'll leave that up to you @willmartian if you'd prefer to tackle it in the follow up one.
We should address the following in a followup PR:
- chip focus state
- chip styles for hover, pressed, and focused states
- keyboard navigation and SR announcements
- style updates that will happen as part of updates to the
bit-menu
Thanks @danielleflinn! I went ahead and added a focus ring and updated the font size to use |
@willmartian I just noticed in the menu the list focus is only on the top of the item, but in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ty for such beautiful work ✨ Here are a couple of questions!
type="button" | ||
[attr.aria-label]="'removeItem' | i18n: label" | ||
[disabled]="disabled" | ||
class="tw-bg-transparent hover:tw-bg-transparent tw-outline-none tw-rounded-full tw-p-1 tw-my-1 tw-mr-1 tw-text-[inherit] tw-border-solid tw-border tw-border-text-muted hover:tw-border-text-contrast hover:disabled:tw-border-transparent tw-aspect-square tw-flex tw-items-center tw-justify-center tw-h-fit focus-visible:tw-ring-2 tw-ring-text-contrast focus-visible:hover:tw-border-transparent" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, I am not seeing that in FF, but I am on Chrome. Will solve that in the follow up PR for CL-291.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That screenshot is from Chrome 😭
@danielleflinn I believe this is a style bug with the menu component itself. I would like to care of that when we update menu styles in CL-237 if that is cool? (Also, the focus rings in the menu component are also not up to spec on main.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ This is me symbolically approving the PR because I can't actually approve it since I own it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, amazing work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh actually, it looks like the menu changes here introduces a regression in the product switcher. Gonna fix this real quick.
edit: fixed in 4bd0d15
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Width changes look good
Type of change
Objective
This PR adds a new CL component:
bit-chip-select
Non-goals: full compliance with Figma design spec--further design and a11y changes will occur in a separate PR off of #8696
Code changes
Screenshots
See Storybook for more
Screen.Recording.2024-05-21.at.10.04.12.PM.mov
Before you submit