Unity Lenses and Books

One key focus of work in the Ubuntu 11.10 cycle was getting the lenses functionality in Unity in shape. 11.10 brings a series of stability and usability improvements to the lenses functionality.

One thing you will notice is that at the bottom of the dash, which you can see by clicking on the Ubuntu button in the launcher, you will see a series of different icons for the different lenses:

These lenses provide a consistent way of viewing different types of content on your computer. For example, available applications:

Click to see full size.

…and here is the music lens; it shows the albums on your computer, and you can search your music and then click on albums or songs to play them:

Click to see full size.

Aside from being generally excited about the improvements made to the lenses in Ubuntu 11.10, I do have an ulterior motive for writing this post, and a great story to share too.

In the Ubuntu 11.10 cycle there has also been a series of improvements to the Ubuntu Software Center and we are also now selling magazine content there. I can see a bright future where more magazines, books, and periodicals are also available. While the content is coming, it struck me that there wasn’t a consistent interface for viewing and reading this content.

What initially sprung to mind was a Kindle-like helper application. When you buy a magazine it puts the PDF into ~/Documents, so it seemed as simple writing an app that just reads in content and displays it in a nice UI.

It then struck me that this is exactly what lenses are for. I shared these thoughts with some members of the design team, and someone pointed me to the work going on on the books lens by David Callé. I emailed David to share these thoughts about providing a means to view these purchased documents (as well as other documents in that directory), and David was excited about working on the lens more.

With the improvements to the lenses happening in Ubuntu 11.10, David needed to port some of his work to some new APIs, but that has been completed and he now has a decently functioning books lens. Here is a screenshot from David of it running in Unity 2D:

Click to see full size.

So, my ulterior motive?

Well, to encourage some of you to join David and hack on the books lens and make it rocking for Ubuntu 12.04! Here are the details:

You can also find documentation here for the Lenses framework. Questions about lenses and other Unity technology can be asked in the #ayatana IRC channel on freenode.

When I spoke to David last there were still a few notable issues:

  • Until a few bugs are fixed, the lens works better in Unity 2D.
  • It can be very slow as the results loading is not optimized.
  • Calibre integration is disabled until Calibre doesn’t make the whole session crash.

David is looking for testers willing to try to break things, as well as people who know about online sources of ebooks or books API that could be added, and folks who can review code branches.

IF you are interested in helping, be sure to check out the Launchpad project and participate. Feel free to leave questions and comments here too and I am sure David will respond. Rocking!

  • Nicolas Barcet

    Makes me think that one could use a lens that displays/allows searches for unified documents, including ones that are on google docs or other online suites.  Going on the same thread, what about a lens to display running virtual instances, via libvirt or cloud apis? WDYT?

  • David Chandra

    It’s a very interesting feature. Could you do the same with movies/videos? And like what Nicolas propose, it would be nice if we can add video links from internet such as youtube into the lens. Anyway, we are going closer to the cloud, aren’t we?

  • http://twitter.com/untriangle David Callé

    Google Docs is a scope (an add-on) easy to add to the existing files lens. The code is mostly finished and should arrive soon.

  • Hordur

    This looks nice. A couple of points:

    (1) The scrollbars look like arbitrary visual artifacts. I think there should be some more visual hints that the content is scrollable.

    (2) “Filter results” should IMO align up with the filters like in the last screenshot (Unity 2D?).

    (3) The lens icons at the bottom look nice but there is plenty of room for short but informative titles as well.

    (3) From the screenshots, it seems that the lenses completely change the context of the search/filter. For this reason, I think the lense-selector-toolbar should be on top.

  • http://castrojo.tumblr.com Jorge Castro

    The original example lens (back when they were called Places) was actually a youtube one. It needs porting to the new API and love though, but here’s a start:


  • http://fitoschidoblog.wordpress.com Fitoschido

    For your points 1 and 2, there are bug reports: http://pad.lv/836656 http://pad.lv/841945


  • http://mark-y-a.myopenid.com/ Marky

    Love the way Unity and Ubuntu is shaping! BTW, like on that 2nd screenshot, the scrollabrs are cramped too close to the buttons IMO. A little padding perhaps? 😀