Will's blog

purpose: Will Kahn-Greene's blog of Miro, PyBlosxom, Python, GNU/Linux, random content, PyBlosxom, Miro, and other projects mixed in there ad hoc, half-baked, and with a twist of lemon

[ home | blog home | recent activity ]

Thu, 11 Dec 2008

new ui for rendered items

I checked in the latest ui in r8671. I've been told that a number of tweak requests are on their way, but it's looking pretty good and there weren't any major bugs.

The new ui took me a week and a half to implement. There were a bunch of complexities that made it difficult. I thought I'd talk about some of those here so people who aren't as intimate with the code can get an idea of how much work and what kind of work is involved.

First off, Miro 2.0 uses native widgets instead of HTML/CSS/Javascript for everything. The one place this isn't quite true is in the item lists where we're rendering our own widgets using a layout/cellpacking API that abstracts over a platform-dependent implementation layer. The platform-dependent implementation layer consists of two implementations: OSX (cocoa, pyobjc, ...) and GTK (pygtk, pango, ...). The abstraction layer is very similar in style to the GTK side of things. Ben wrote most of this as we needed it a few months ago.

The first problem I had was that I wasn't familiar with the platform-independent layout/cellpacking API we had.

The second is that there are a bunch of variations on the theme. Depending on what the context is, the item gets rendered differently. In playlists, items have a "Remove from playlist" button, but in channels, the item has a "delete" button.

Additionally, items have two display modes: with details and without details. The without details mode is the easiest to render since it's just a bunch of packed things and the resizing handling is easy to deal with. The with details mode is really difficult because we want to show the entire title and description for the item but the cells these bits are in expand as the window is resized. We get into this chicken-and-egg problem where we need to lay things out, but in order to lay things out we need to know the size of the space we're laying things out in, but in order to know the size we need to lay things out....

On top of that, items are either selected or not selected--both of which look different.

The other set of problems I ran into were theming issues. The rendering code tries to "look" like the platform it's running on: the OSX buttons look different than the GTK buttons; OSX uses Finder but Windows uses Explorer and the text needs to reflect that; ...

All of this makes for very complex implementation code. Structuring that as I figured things out was difficult to do well and the result isn't great structure-wise. Ben's already done a pass at fixing the resizing issues which resulted in some structure fixes. It's likely that other things will get fixed and massaged over the next week or so.

The end result of all this work is that we went from this:

to this:

Comments:

Posted by Meneer R on Fri Dec 12 21:16:18 2008
It's nice to see the focus on usability as well as to hear about the attention that performance is getting. Esspecially in the rendering of the item lists is where most of my having-to-wait-a-couple-of-seconds-and-see-miro-allocate-100-meg moments are. Although most vodcasts don't have that many items, aggregate groups usually do. And the rendering part has a strong lag on my quad-core, 2gb setup. I can only assume, that with the new interface-work these penalties are gone?


Posted by Will Kahn-Greene on Fri Dec 12 23:34:45 2008
I'm not sure I would say the penalties are gone with the ui work we've been doing in the Miro 2.0 cycle since this is clearly a scaling problem with no upper bound for number of items and thus there will always be a number of elements beyond which it renders too slow. Having said that, it's much faster than it was on Linux and much faster on Windows, too. I don't know offhand if it's faster or much faster on OSX--I don't use Miro on that platform much. There's still a lot of performance work that can and should be done in other parts of Miro and we're tackling those items one by one in future versions.


Posted by sg on Tue Dec 16 16:12:48 2008
Kudos for the overhaul, definitely a major improvement. As for performance on OS X, not quite there yet. Very jerky item list scrolling and quite noticeable consistent ui lagging overall. Resizing resembles stopmotion movies, but hope it'll improve before release. If it were up to me the above should certainly be treated as blockers for v2, as it's quite a few steps back from the old releases -which had it's own fair share of issues- in so many aspects performance-wise.


Posted by Ken on Mon Jan 12 14:33:36 2009
Earlier you said "after working and playing with what will become Miro 2.0, it’s really hard to go back and develop on and play with the Miro 1.2". Knowing that the rest of us are stuck with 1.2 :-), is there an ETA for 2.0? Is it on a deadline, or is the list of "target milestone 2.0, P1-P3" bug reports the set of things to complete before release regardless of time? (I've been on both kinds of projects.) P.S., stop reading blog comments and get back to making Miro 2.0. ;-)


Posted by Will Kahn-Greene on Mon Jan 12 15:43:12 2009
Ken: We're too small a team for deadline-based scheduling to be effective in any meaningful way. We are trying to get it out as soon as possible and we've been pushing hard on Miro 2.0 development for 6 months and really hard for the last couple. A couple of weeks ago, we did a triage pass at focusing on "mission-critical" issues and pushing everything else off to a future version. Even so, we still have a decent number of P1 and P2 bugs that are blocking a Miro 2.0 release. I'm not really sure when we'll get it out, but I feel confident that it'll be in the first quarter of 2009. It's getting there. We had a really good bug-fixing week last week. A few more of those and Miro will be release-worthy.


Posted by Paywhewly on Wed May 20 06:11:43 2009
I have found a webhost review site with top 5 ratings. I wonder if they provide good hosting? If anyone has heard anything negative about these host please let me know. Here is the site. webhosting


Post a new comment:

Three things:

  1. New comments get placed in a "draft" status and will NOT show up on the site until I explicitly approve it. Sometimes that happens within 24 hours.
  2. I reserve the right to reject/remove inappropriate comments.
  3. Sometimes I'll reply to a comment directly in email--so make sure your email address is correct.

If you can't for some reason post a comment, send me an email: willg at bluesock dot org.

Your name:


Your e-mail address (this doesn't get displayed to anyone--sometimes I'll reply directly to you):


URL of your website (optional):


Comment:


Yes, I am a human!


pyblosxom::1.5-dev git-master

Copyright 1996 to 2012, Will Guaraldi Kahn-Greene, under the Creative Commons BY-SA 3.0 license

Creative Commons License
Will's Blog by William Kahn-Greene is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.