Closed frederikhors closed 2 years ago
Good points all. Will tackle them as time permits.
Tailwind released Comboboxes today! https://tailwindui.com/components/application-ui/forms/comboboxes.
I think we need to be inspired by them.
They charge money for that? But sure, let's take what good ideas we can from them.
They charge money for that? But sure, let's take what good ideas we can from them.
Yes, they do charge. But I don't mean we have to pay. Just get the best out of their work. Inspiration.
Yes, they do charge. But I don't mean we have to pay. Just get the best out of their work. Inspiration.
I know, I understood that. I'm just surprised people pay £119 for a UI framework.
I'm just surprised people pay £119 for a UI framework.
😄
Anyway this is for inspiration too: https://headlessui.dev/react/combobox.
Here the svelte version: https://github.com/rgossiaux/svelte-headlessui, the Combobox porting is coming, only the select is available now.
- As you can see from the picture here: the font of the "placeholder" is very bad. Too big compared to other selects I am using right now.
Just for later reference, this was due to
which was added to stop Safari from zooming in on this component when user focuses the input. People who encounter this problem and want to prevent Safari's zoom behavior will have to increase font size themselves, I guess.
- When you select an item and then delete it you can see that the seelct increases in height, even if only by 1px is very annoying.
Can you post a GIF of this? I can't reproduce it.
- The rounded border is too much.
Default border-radius changed from 5 to 3 pt.
- border-radius: var(--sms-border-radius, 5pt);
+ border-radius: var(--sms-border-radius, 3pt);
- If I click on a label for that select each time I click the dropdown is faded away... I think this is useless.
This is hard to fix. The component closes itself when it detects the user clicked anywhere outside itself. The form label is outside but then default browser behavior is focus associate input of form label so MultiSelect immediately regains focus and calls setOptionsVisible(true)
, triggering the animation. We would have to check the click was outside and not on a form label with the same ID. Can be done but seems brittle and asking for trouble.
- I would like to have another (more classical) animation for hover on list voices. Not the actual which is not really suitable for those with vision problems because it moves every single item to the right. I think a simple background color on:hover is enough.
I agree. Thought about making this change a few times myself but wasn't quite motivated enough. It's done now.
- As you can see in the same gif the gray background is not aligned in the select content.
I think this is fixed already, no? If not could you share another screenshot of what you mean?
I think #52 fixes all the points here except 5 which I'm marking as wontfix unless someone knows a good way of not triggering focusout
callbacks if the click event target is the form label belonging to the input that just lost focus.
@frederikhors If there's anything I missed here besides 4, feel free to open a new issue.
You mean 4, right?
Oops, typo. Yes, I meant 4.
What do you think about having a more generic/standard UX like https://primer.style/design/components/autocomplete?
In this issue I can summarize all the graphic quirks that are ugly to look at and require manual labor in each project:
As you can see from the picture here: the font of the "placeholder" is very bad. Too big compared to other selects I am using right now.
When you select an item and then delete it you can see that the seelct increases in height, even if only by 1px is very annoying.
The rounded border is too much.
If I click on a label for that select each time I click the dropdown is faded away... I think this is useless.
I would like to have another (more classical) animation for hover on list voices. Not the actual which is not really suitable for those with vision problems because it moves every single item to the right. I think a simple background color on:hover is enough.
As you can see in the same gif the gray background is not aligned in the select content.