Skip to end of metadata
Go to start of metadata

The Problem(s)

Have you ever been been reading a long wiki page and find that you are 25% done with the page and don't have time to finish?

Usually when that happens to me I find that I scroll down the page to figure out where the comments start then scroll back up to where I was reading. Often times I found that the Comments were closer than I had anticipated and If I had known how much of the actual article was left I could have finished in the time I wasted scrolling around.

Have you ever been reading about a topic like "plug-in development" and found that you have 10 tabs open all scrolled to various points within their respective documents. Have you ever had all those tabs open and accidentally closed your web browser making it virtually impossible to recreate the stream of consciousness reading?

When reading about a topic like "plug-in development" Do you ever find that you encounter the same document multiple times from references in sub pages? Do you waste time re-reading a section page you already read?

Or, How many times do you bookmark a document thinking you want to come back to it only to find a stack of bookmarks a year later that you never re-read.

If you've ever encountered these problems Dogear for Confluence is the solution for you.




The Solution

Dogear for Confluence is a plugin that lives in the lower right hand corner of your wiki. That's right, over where "Monkey" once lived you might now find "Man's Best Friend". You'll find that much like "Man's Best Friend" Dogear follows you around while you are reading about a topic. If you activate Dogear's UI it will open up a scaled down color coded Thumbnail representation of the page you are currently viewing. The thumbnail will show you where the Title Bar is, Where the Wiki Content is, as well as where Labels, Children, and Comments are on the page. Along with a thumbnail representation of what the page looks like it will also show you where your browser window is inside the document.

This means in one glance I can tell how much reading I have left to do before getting to the comments.

Armed with that information I can make an informed decision as to whether I should continue reading or earmark that document for some time in the future.


When I say earmark for the future, there has to be a better solution than saving it to a Bookmark in the browser.

Dogear has that too!

If you want to save a page for future reading you just hover over the "I am here" section of the thumbnail and click the save icon. As you save more and more pages you are essentially creating a "Smart Reading List" about a topic. When you open up a "Reading List" you will see all the thumbnails in that list and where you stopped reading each page.

This reading list will show you what you have been reading over time, and in what order you read it. It also shows you where you left off in each document. You can simply click on one of the thumbnails and you will be taken directly to that page and scrolled to where you were reading.

Dogear has multiple ways to view your reading lists. You can view "All" which will show you everywhere you have been. You can view "All, not Finished" which will show you everywhere you have been where you have not scrolled to the bottom of the page. You can also view "Saved", and "Saved, not Finished" which limits what you view to only pages you explicitly click the the Save Icon on.

Some other nice features are the ability to show and hide thumbnails one by one, or show and hide the entire Dogear UI. The nice thing about that is you still have the comfort of knowing
your reading is being recorded even if you aren't looking at the UI.
One other thing, anytime you finish reading a page (scroll to the bottom) it automatically marks the page as "Finished" so it drops off the reading list!


Technical Information

This was my very first plugin that I have built for any Atlassian product, and admittedly it has more to do with Javascript than Confluence itself. I did write a mechanism to store the users reading lists up on the Confluence server but didn't implement it for FedEx day. For the 'proof of concept' i simply used cookies on the browser which have limitations. I worked under the assumption that in the future the data store might be 'in the cloud' somewhere so my focus was more on what and how it was stored rather than where.

The bulk of my FedEx time was spent screwing around with Javascript and CSS and due to the nature of the time crunch some of the code is pretty ugly. Hopefully everyone can look past it's shortcomings and see the potential and think "If that really existed I would use it!"

Side Note: I realize this would be better suited for a browser plugin rather than a Confluence Plugin. However, Being new to Atlassian I wanted my first project to be a Plug-in to one of our products and this is what I came up with.

Here's how it works.

Dogear Utilizes the Chris Kiehl's(http://extranet.atlassian.com/display/~ckiehl) context include functionality in a similar fashion to the Dev Toolkit (http://extranet.atlassian.com/display/CONFDEV/2008/09/22/Introducing+Confluence+Dev+Toolkit) to include a Dogear.js and Dogear.css on every Confluence Page.
The Javascript creates 1 Global object called DOGEAR. To create a DOGEAR simply give the object the current User Name. It checks with the "back end" to see if that user has any reading lists. If not it creates a 'default' reading list. When it stores the reading list it saves it as a JSON representation of the DOGEAR looking something like this:

If you are looking closely it is an object with and array of Reading Lists. Each reading list has an array of Pages.

As the user navigates through the wiki Dogear stores a small JSON representation of the page the user is on and where the browser is on that page. It could be optimized further by (for example) using shorter variable names, however, the idea was that a page might look something like this:

If the UI is open for Dogear it loads the pages and calculates what the Thumbnail would look like and where the "I am Here" window would be in that thumbnail.
The Page JSON object is abstracted out of the Master Object with the idea being that if you change your scroll position you only have to send the page back to be saved and not the entire list.


Future Potential

Not every feature was implemented for FedEx day. Here are some of the things that I Imagined it might do.

Share Reading Lists. If I read portions of 10 pages to learn about Plug-In development and after reading those pages I know enough to build my first Plug-In. I might want to share that reading list with others.

Automatically detect changes in pages. If you re-encounter a page that you previously "Finished" but the size of the page changed.. Overlay the 'old' thumb with the new 'thumb' so you can estimate what changed. Was it just comments being added? Or did the body of the wiki page grow?

Multiple Reading Lists. The data model supports it but it wasn't implemented.

More options. Turn on/off "Auto Record Mode"

Delete Things. Didn't get around to it (smile)

Sharing Pages between Reading Lists. If you encounter the same page in a different reading list it should detect that you were already reading it and regardless of which reading list you read it on it marks it finished in both.

Thanks

Special thinks to Chris Kiehl and Tim Moore for putting up with my newbie questions!

Labels: