This post is about Personas, also known as lightweight themes, not Browser ID, now known as Persona (naming is fun!). Also, these are just my thoughts, not an official position of Mozilla or the Add-ons Team.
I think we skipped a step when we graduated Personas from Mozilla Labs and implemented them as a Firefox feature. Personas have always felt like an incomplete idea, which has lead to some quality, performance and openness problems. High performance on Firefox is a top priority for Mozilla, and Personas are extremely popular, so I think revisiting the Personas feature would benefit Firefox users greatly.
All of the problems are rooted in the feature’s simplistic design. A Persona consists of 2 images, one for the header and one for the footer.
Window width can be arbitrarily large depending on screen(s) resolution, and the header area can be variably tall depending on how many toolbars are active. This led to the decision of requiring Persona images to be excessively large in order to cover all use cases. The header is required to be 3000px wide x 200px high, and the footer 3000px wide x 100px high! Click on the example below to get an idea (you’ll need to use the magnifier to see its actual size).
This creates a number of problems:
- Performance problems. Decoding these massive image files can introduce a non-trivial delay in Firefox startup time.
- Poor image area management. It’s very common to see designs that are almost completely hidden height-wise, or designs that look good in the browser but look really strange on the Personas site and AMO (we got a ton of complaints about that one). Designers have to figure out ways to pad their images so they don’t look bad. In the example above I decided to be lazy and went with a plain white.
- No flexibility. There’s no way for designers to control how the image is displayed in different screen sizes or toolbar configurations. It’s also not possible to tile backgrounds.
- Limited distribution outside of Mozilla properties. Personas can’t be easily packaged up and distributed outside of getpersonas.com or addons.mozilla.org. There are ways to set up a Personas repository, but it isn’t easy for casual designers who might want to share their creations with their friends. This puts us in a position where we’re almost the sole arbiters for Personas designs, and our policies become the world’s policies.
I think Personas should behave more like add-ons:
- Have a package (xpi?) that holds the images and a manifest (install.rdf? json?).
- The images can have predetermined names, like header.png, header-background.jpg, etc. to avoid having the declare them in the manifest.
- A Persona can have as little as one header image (the only required one), and as much as 4 images: header, header background, footer, footer background. The idea here is that the background is tiled by default, and the foreground image can be small and transparent, giving designers much greater flexibility.
- The manifest can have basic metadata (name, designer, homepage) and a few additional image positioning features, like allowing the header foreground image to be proportional to the displayed area instead of being cropped, allowing the background to be stretched instead of tiled, or making the background a solid color or fade using CSS.
This would allow designers to submit much smaller images that would look better in most configurations. It wouldn’t break backward compatibility because we can just package existing Personas in the new format. Most importantly, we don’t need to make things difficult for designers. We can use the same image upload form that we currently have and create the package server-side, eventually extending the form to support the new features. Finally, it would allow designers to package their Personas and share them with others without having to go through our site.
This, of course, requires lots of work in the Add-ons Manager and our Personas properties. It’s worth thinking about, though, specially because of the potential performance gain, which could be substantial. Perhaps it’s a good project for the next GSOC?