Skip to content

feat(Pill): add new PillButton variant#1303

Merged
eszthoff merged 14 commits intomasterfrom
oneui-438-enhanced-pill-button
Nov 11, 2024
Merged

feat(Pill): add new PillButton variant#1303
eszthoff merged 14 commits intomasterfrom
oneui-438-enhanced-pill-button

Conversation

@eszthoff
Copy link
Contributor

@eszthoff eszthoff commented Nov 1, 2024

Story: ONEUI-438

@vercel
Copy link

vercel bot commented Nov 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
oneui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 8, 2024 2:35pm

@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-unnecessary-type-constraint */
import React from 'react';
Copy link
Contributor

Choose a reason for hiding this comment

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

Priority is not aligned well:
Screenshot 2024-11-08 at 11 25 55

Copy link
Contributor

@AnastasiiaMP AnastasiiaMP Nov 8, 2024

Choose a reason for hiding this comment

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

The clear Icon also doesn't seem to be perfectly align, but it is really minor thing. What is noticeable is that all the icons are too small, especially priority icon which is 12x12 ox and in design 20x20. The arrow one has onle 2 px difference
Screenshot 2024-11-08 at 13 34 11

Screenshot 2024-11-08 at 13 31 37 Screenshot 2024-11-08 at 13 31 44

Copy link
Contributor

Choose a reason for hiding this comment

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

the Clear one also should be 16x16
<Clear aria-label={clearLabel} viewBox="0 0 24 24" height="14px" width="14px" />

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The Prioirty button icon is coming from IconButton. I used the small, since the normal size is bigger then the pill button all together. Not sure where to go with it. Dima needs to align his designs :-D
I'll change the rest

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screenshot 2024-11-08 at 15 26 01

after making the icons 16px, I think the alignment is now ok, no?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it should be some space between to button and text:
Screenshot 2024-11-08 at 15 29 39

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, with 16px, looks great. And agree with @mukiienko , some space would be nice 😊

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will ask Dima to make a design proper with the priority icon, using the actual button icon. I didn't add the space, because... whatever, I'm not the designer, and I don't like to make up things :-D

@@ -25,6 +24,7 @@ export interface Props<PriorityItemValue> extends DropdownMenuCheckboxItemProps
const { block } = bem('MultiSelectItem', styles);
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be nice to have story with new pill and content dropdown to see how it works together.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

there is a story. you just have to choose the variant in the controls. Or is there something else?

Copy link
Contributor

Choose a reason for hiding this comment

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

I meant when we click on the pill we show the dropdown:
Screenshot 2024-11-08 at 11 59 06

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, I also mean that :D
Screenshot 2024-11-08 at 12 07 59

Copy link
Contributor

@mukiienko mukiienko Nov 8, 2024

Choose a reason for hiding this comment

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

hmm, it's strange. Maybe something wrong on my machine. I have an error:
Screenshot 2024-11-08 at 12 20 29
@AnastasiiaMP could you please check if it works for you?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added the missing argument to the stories

Copy link
Contributor

@mukiienko mukiienko Nov 8, 2024

Choose a reason for hiding this comment

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

I still have the same error. Does it work for you in stories PillButtonEnhansed? @eszthoff

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you try now, I think you were looking before I pushed the changes.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't have the errors now, but I still don't see the dropdown. Could you please check @AnastasiiaMP ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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


export const MultiSelectItem = React.forwardRef(
/* eslint-disable-next-line @typescript-eslint/no-unnecessary-type-constraint */
<PriorityItemValue extends unknown>(
Copy link
Contributor

Choose a reason for hiding this comment

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

The design looks different from the implementation; at least the cross icon has a different color:
Screenshot 2024-11-08 at 11 55 28

Copy link
Contributor Author

Choose a reason for hiding this comment

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

where do you have these colors? In Figma that is linked to the ticket they are grey.
https://www.figma.com/design/TlGOOkoCGSyDtrnMwmjnAl/OneUI-Components-v2?node-id=2649-6726&node-type=canvas&t=ZUTjsP5MwXspO6NW-0

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

🤯

@@ -25,6 +24,7 @@ export interface Props<PriorityItemValue> extends DropdownMenuCheckboxItemProps
const { block } = bem('MultiSelectItem', styles);
Copy link
Contributor

Choose a reason for hiding this comment

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

I meant when we click on the pill we show the dropdown:
Screenshot 2024-11-08 at 11 59 06

@eszthoff eszthoff deleted the oneui-438-enhanced-pill-button branch November 11, 2024 15:53
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.

3 participants