-
Notifications
You must be signed in to change notification settings - Fork 321
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(Search): new Search component #2064
feat(Search): new Search component #2064
Conversation
…add className for wrapper
6998d21
to
0481fcc
Compare
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.
Looks really good! See comments
packages/core/src/components/AttentionBox/__stories__/attentionBox.stories.js
Show resolved
Hide resolved
...eActiveDescendantListFocus/__stories__/hooksDummyComponents/UseActiveDescendantListFocus.jsx
Show resolved
Hide resolved
searchIconName = SearchIcon, | ||
clearIconName = CloseSmallIcon, | ||
clearIconLabel = "Clear", |
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.
WDYT about giving a single prop for these? e.g. clearIcon: SubIcon
And I wonder if we should allow changing the searchIcon
, it can be done in the TextField, why do we need it in both components?
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.
in TextField the icon is not on the left, here you can have both icons simultaneously.
you have a good point since design also asked if we can avoid it
the thing is that we have cases where people changed the search icon and clear icon
and not sure about the single prop? I need to be able to pass label (as people would probably want to translate the label)
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.
I mean clearIcon={<Icon icon={Clear} aria-label="clear" />}
and not sure if possible but we can use the SubIcon type but making the aria-label required in this case.
Plus if designers don't want it and we don't want to support it we can decide here to avoid 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.
It should be an IconButton
, though
and it can add complexity
in my best scenario it is removed, but it might be used by current consumers, making it require codemod and to remove ability
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.
I don't think codemod should prevent us from doing anything
You can use a render prop (e.g. renderClearIcon
and provide props like we did in some other component. Just think about a case where users will want to add a onClearIconClick
to trigger analytics for example, you'll have to add a prop for it
…se class for wrapper
…earch from Search /next path
0481fcc
to
49a3f53
Compare
39bf6ec
to
6f0d691
Compare
6f0d691
to
1f7d460
Compare
…---New-design-Dev-6249458445 # Conflicts: # packages/core/src/components/BaseInput/BaseInput.tsx # packages/core/src/components/BaseInput/BaseInput.types.ts # packages/core/src/components/BaseInput/__tests__/BaseInput.jest.tsx
https://monday.monday.com/boards/3532714909/pulses/6249458445