Butter v0.2 and Popcorn v1.2

Two weeks ago the Popcorn team released Butter v0.2 and Cornfield v0.2, and this week we’ll be releasing Popcorn v1.2.

Butter v0.2

My two main contributions to Butter in this release was scrolling in the timeline and Cornfield. We use a custom scroll bar implementation in Butter, so Bobby wrote the initial scrolling implementation. It worked pretty well, except for how horizontal scrolling was initiated by the user. As a bourgeois MacBook Pro user, I expect two-finger scrolling to work in two dimensions, not just vertically. Imagine my disappointment when I found that I had to hold down control to horizontally scroll the timeline. Preposterous! This was not difficult to fix, but two code paths are needed: DOMMouseScroll for Firefox, and mousescroll for everyone else. Ah, standards.

Developing Cornfield and the Butter integration for it took up most of my time on this release. I decided to start small with Cornfield and create a REST API in Node.js, authenticated against BrowserID that stores data directly on the file system. Writing the REST API and the code to interact with file storage was not difficult, but integrating BrowserID took a few days. This is because BrowserID has a completely different authentication flow from normal server-based authentication:

As you can see, it’s a fair bit more complex. Fortunately, someone has written a Node.js library for handling steps 6-10, meaning that I only had to handle 4 and 5 (1-3 is handled by the JavaScript file that you include from browserid.org). I highly recommend reading the documentation on MDN if you want to add BrowserID to your own site.

Popcorn.js v1.2

Most of my fixes here all were based around finding and fixing breakage in our test suite. We decided to upgrade to Qunit v1.3, which meant that we needed to rewrite many of our test harnesses to be completely asynchronous, rather than synchronous with a timeout. There were also some fixes made to the Vimeo and SoundCloud tests as we’ve been neglecting them pretty badly. This put us in a great position for our project for the next two weeks:

This entry was posted in Open Source. Bookmark the permalink.