WIP: Quick Reading mode, in which entries are marked as read as soon as they are scrolled past the top of the page.
WIP: mark entries as read as soon as they leave the effective viewport.

The app has a fixed navbar which covers the top of the actual viewport. We want to mark entries as read as soon as they "slide" under the navbar, at which point they are still in the actual viewport but above the effective viewport (which extends down from the bottom of the navbar).

Jquery-viewport.js has been modified inspired by this commit:

	https://github.com/theluk/jquery_viewport/commit/d7ed501b5eac2bed90253c134df611cd2d843112

(the only difference is I have applied the changes directly on the minified library instead of the source code).

With this change, the viewport selectors added by jquery-viewport.js accept an offset parameter. With this offset we can detect entries that have slid under the navbar.
For performance reasons, launch scroll event handler function only 500ms after user has finished scrolling.
WIP: Quick Reading mode. Replaced jquery-viewport library with within-viewport library.

The viewport-selectors Jquery plugin:

	http://www.appelsiini.net/projects/viewport

did what I wanted, but it performs horribly. When scrolling, the page froze for a few instants.

Instead now I use within-viewport JS library (and its JQuery plugin):

	https://github.com/patik/within-viewport

It makes the code a bit more complex (because I'm not interested in entries within the viewport but rather outside it, which forces me to select all entries and then do a jquery "not" with the entries returned by within-viewport), but it has noticeably better performance. The library author seems to think about performance, because the library can be told to watch only one viewport edge (top, in my case) for better performance. Also it allows setting a top-offset to the viewport (in my case to account for the navbar) which fits my needs nicely.
WIP: Quick Reading mode. Entries are marked as read as soon as they are scrolled above the viewport.

Not yet implemented: make this behavior dependant on a per-user config option.
Added quick_reading boolean attribute to the User model and db table.

It will control whether a user has Quick Reading mode enabled or not.
Added checkbox to the Edit Registration form, so that the user can change his own quick_reading attribute.
While in Quick Reading mode, reduce the time after user has finished scrolling from 500ms to 250ms.
Improved jquery filtering when marking entries as read in Quick Reading mode.

This way less jquery calls are performed and the set of affected entries is filtered as soon as possible.
Added not-null constraints and default values for many database columns.
Added new controller and route to retrieve configuration data for the currently authenticated user.

Currently we only return the quick_reading attribute for the user, but in the future other values will likely be returned.
When loading the read view, user configuration is requested via AJAX. Quick Reading mode (mark entries as read as soon as they are scrolled past the viewport) is enabled only if the user has the quick_reading attribute set to true.

This means that the Quick Reading mode is feature-complete (user can enable or disable it in his registration edit view).

Not yet implemented: some acceptance tests, or at least smoke tests, for this functionality.
Add not-null restrictions to the automatically created created_at and updated_at database columns.
WIP: acceptance tests for the Quick Reading mode feature.
FactoryGirl factory for User model gives a default value of false to quick_reading attribute.
Added acceptance tests for the Quick Reading mode feature.

These are not very exhaustive, just smoke tests. Also testing functionality related to scrolling with capybara is a pain in the ass; I get the feeling these tests will prove to be brittle. For now it's enough to consider the feature implemented and tested, but I'll keep an eye on improving tests.