mwmbl / front-end-original

A front-end for the mwmbl search engine written in vanilla javascript
https://mwmbl.github.io/front-end/
GNU Affero General Public License v3.0
13 stars 3 forks source link

Refactor to clarify flow of search-bar component #24

Closed sarayourfriend closed 2 years ago

sarayourfriend commented 2 years ago

This is a slight refactor to help clarify the flow of the search-bar component and how it works. It was previously relying on dispatching the submit event to initialize the search when the component was connected, but this allows it to do so in a more typical non-event bus driven way.

It also moves certain things into their own methods like the search event dispatch and the layout change. This makes it easier to read the flow of the handle search routine.

This PR should not result in any change of behavior, with or without reduced motion.

ColinEspinas commented 2 years ago

Just read the code and it seems good, will test and merge if okay later today.