Skip to content

Release v0.2.0

Latest
Compare
Choose a tag to compare
@lauris lauris released this 12 Mar 10:50
· 1 commit to master since this release

Sensei Anywhere has received both visual and functional updates. Data source can now contain objects instead of plain old flat arrays. Custom formatting callback and customizable setting for display field were added to provide better use of said objects. A new fuzzy search algorithm was introduced to better filter and order search results. The algorithm comes from string_score open source project (Licensed MIT).

An example and live demo on how to use objects with Sensei Anywhere can be found here: example/objects.html. Regular demo is still here: example/index.html

Visual changes were not huge, just adjustments of several minor details. Apart from that Sensei Anywhere now has a fixed height and shows a scrollbar when needed. To give users smooth experience when using arrows to navigate through items, Sensei Anywhere calculates the needed offset and scrolls the viewport just a bit so the item is visible at the bottom of the list. We wanted to avoid jumping half the viewport like it is usually implemented in JavaScript apps.

screenshot 2015-03-12 11 36 24

The lack of documentation is currently the biggest pain point. Until updated and expanded docs are published, the best option to get familiar with the project is to skim through the source code and the two examples linked above. The code is just 375 lines long, the actual logic being much less.