josefarias / hotwire_combobox

An accessible autocomplete for Ruby on Rails.
https://hotwirecombobox.com
MIT License
436 stars 26 forks source link

Clear button flexibility #141

Closed dixpac closed 4 months ago

dixpac commented 4 months ago

This is not a bug, just an idea.

Currently clear button(x) and carrot(or custom icon) are interchangeable

https://github.com/josefarias/hotwire_combobox/assets/7427365/e681c314-3cf8-404f-aa30-803888a46124

While this looks clean I think it has drawbacks, for example what if I want to have search magnifier icon as a prefix and clear button at the end, something like this:

Screenshot 2024-04-08 at 13 37 30
Screenshot 2024-04-08 at 13 37 43

I feel like ti would be more flexible to have these 2 buttons/actions as a separate "concept".

Here is how this looks on shoelace select component

Screenshot 2024-04-08 at 13 40 53
josefarias commented 4 months ago

Hey @dixpac! Good idea. I'd be open to a PR for this as long as the code is concise and simple.

Let's move this to the discussions forum, though. To keep issues constrained to bugs. Thanks!

dixpac commented 4 months ago

Ahhh sorry wasn't aware there is a forum :)

Great, I'll give it a shot and see where it goes

josefarias commented 4 months ago

No worries! Not all repos use that GH feature.

Awesome! Thanks Dino