X

Twitch:

SergeiBrokofiev

YouTube:

Dave Conway Piano

Twitter:

@SergeiBrokofiev

Email:

me@daveconway.net

Guild Wars 2:

Tomato Yesterday

Battle.net

Brokofiev#1654

daveconway.net/blog

Request page updates, mobile page coming soon!

30 November 2015 06:39 EST under
Development, Site, Twitch

In an attempt to make my sheet music library a little easier to search on my stream's request page, I've removed the disgustingly long, poorly sorted composer/arranger dropdown fields and put auto-complete fields in their place (and on the title search field, as well):

I probably could've implemented an existing autocomplete library in fifteen minutes, but I figured I'd spend part of the Thanksgiving weekend rolling my own for fun (and JavaScript practice) while watching Kate play Xenosaga. If you stop typing for half a second (after entering three or more characters), all potential matches for the search query pop up, and you can navigate them with the mouse or arrow keys, etc.: pretty standard stuff. The "smart" filtering that minimizes server hits needs a little optimization, but other than that, I'm happy with the results. And it's really easy to pop one onto any text input field, which will be nice in the future.

It is, however, being a little finicky on mobile: tapping a suggestion closes the results pane but doesn't actually fill in the control it's attached to with the value that was selected. No idea why, but the page blows for mobile users as a whole, so my next project is to create an entirely separate mobile page for making requests. The number of people watching the stream on mobile seems relatively high, so it's the next obvious move.

Kate has plenty of hours of Xenosaga left to play, so...hopefully it won't be too far in the future before it's here!