pstanoev / simple-svelte-autocomplete

Simple Autocomplete / typeahead component for Svelte
http://simple-svelte-autocomplete.surge.sh/
MIT License
468 stars 79 forks source link

[WIP] Animate dropdown opening #169

Closed azmeuk closed 2 years ago

azmeuk commented 2 years ago

I added a simple sliding animation on the dropdown opening.

The main change is that instead of using the hidden CSS class, the list is simply not displayed at all. This was required to get the animations functioning.

As animations are mainly about subjective taste, I am open to discuss if you prefer something else, or nothing at all :)

Peek 23-04-2022 20-12 Peek 23-04-2022 20-13

pstanoev commented 2 years ago

Looks good from UX perspective. I am not sure how animation would fit with multiple usecases that the component is used. If there is a way to make them optional and not influencing the HTML layout too much, they would be nice.

pstanoev commented 2 years ago

@azmeuk I am not sure we should merge this to the component. I am not a big fan of animations. The component is far from "simple" contrary to what the name suggest, but my initial plan was for it to be simple.

azmeuk commented 2 years ago

I am ok to close this for now. However I would like to tackle this in the future. Maybe we can make this an option?