-
Notifications
You must be signed in to change notification settings - Fork 112
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
refactor: old array conversion #712
Conversation
@muratcorlu Are we sure that we want to support the search input type that way? We haven't discussed the UI/UX decisions of this component. I'd say avoid the effort before the discussion. |
@AykutSarac Good question. I'm not sure. What kind of consequences do you predict? Do you mean considering to use a relevant icon while we use search input? |
There are two CSS tags we can use for "search" One is for the search input, and the other is for the search results. Additionally, if this matter is important, you might consider evaluating this situation for other types as well. https://developer.mozilla.org/en-US/docs/Web/CSS/::-webkit-search-cancel-button Like this; Others; |
We need to show our own icons, so we have to create the functionality for displaying and clearing them. However, this component might be more complicated than we think. It's important to decide what we expect from a search input, as new modifications later could cause problems with the architecture. |
MDN says:
Currently we use <bl-input type="text" icon="search" ...></bl-input> Since technically there is no behavioral diffierence between <bl-input type="search"></bl-input> <!-- comes with search icon by default --> But, with the multiple icon registry support, this may be more confusing and tricky. Because search icon can be named differently in other icon libraries. (It's magnifying-glass on fontawesome icons, for example) But on the other hand, we already use default icons in many other places (info icon on tab component and alert component, exclamation icon on input error states, etc.) so this needs to be addressed anyway for other places as well. So, considering we already have |
#713 will bring the icons for input types so we don't need to cover here. Do we have any TODO(s) for this PR anymore? @muratcorlu |
Perhaps you can consider this part. |
Yeah, we can consider this as a refactor proposal. @0o001 If you can rollback the input type addition from this PR, we can consider and merge this separately. |
This reverts commit 9001c6f.
Thanks for your contribution @0o001 🚀 |
I decided that'd be a good idea to display icons depending on the type of the input. > `icon` attribute overrides the default icon. <img width="844" alt="image" src="https://github.com/Trendyol/baklava/assets/47941171/3025aee8-5357-45c1-946f-01ab7fa5b680"> ```html <bl-input type="search" /> <bl-input type="date" /> <bl-input type="date" icon="academy" /> <bl-input type="time" /> ``` Additionally, this PR adds input type of `search`, it could be good idea to review #712 first. --------- Co-authored-by: Aykut Saraç <aykut.sarac@trendyol.com>
🎉 This PR is included in version 2.3.0-beta.8 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 2.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
https://stackoverflow.com/a/54793076
https://www.measurethat.net/Benchmarks/ShowResult/464484