muan/emoji — pull request #113 by wenqinYe (2014-12-24 18:18:26+00:00)
Title: Improve Search Box Speed to make it more "buttery" + type anywhere to search.

The live emoji search was great, expect for one problem; it slowed down the system as it made a search for every character the user typed. Thus, when a user types in to the search field, they will notice significant lag (depending on type of computer, I personally used a MBP 2012 and noticed a lot of lag when typing).
So what I did was put a delay on the search so that the search is performed when the user is done typing. This way, there are no useless (and expensive) search calls per character; instead, there is only one call at the end when the user finished typing.

Of course, one thing that live search was great at doing was giving the feeling of instantaneous search results. I wanted to keep this illusion of "instant" search by making the results disappear to give the user the sense that their search is being instantly acknowledged. Without this, the user is stuck on the previous results page until they finish typing, which can give a feeling of sluggishness from the system.

-------

As a side, you can now type anywhere to search; I removed the feature of having to type in a slash first. I don't think people want to type in an arbitrary command when there intent is to find some awesome emojis :smile:.

Cheers
:beers: