Categories
main mozilla tech

Thoughts on hybrid projects

One of the biggest challenges of all open projects is how to effectively manage the most precious and most crucial resource they have – people. We approach this by building a project cultures that are open and participative,  tools that allow us to operate in this open environment and we make whatever possible to make it easy for new people to learn how to blend in to work with others in the way that matches the culture of the project.

In fact, open project became extremely efficient with managing their projects with all the new tools, like trac, mantis, bugzilla, revision control systems, wikis, forums, blogs, planets, newsgroups. You can manage privileges, discuss in groups, build subgroups, work in a cloud, share code, brainstorm, and do this pretty efficiently. The only trick is that it works well on a smaller scale.

Categories
main mozilla tech

MCS: Source files released!

Another milestone for MCS project has been reached! And its a big one!

If you open http://hg.mozilla.org/webtools/mcs/file/tip/theme/source/ you will find full source PSD files of the theme.

picture-41

What does it mean? Well, this is another step on the way of making sure that we have a really good theme that is open to everyone according to what we understand as Open. And understanding of it is not that common.

Think of it. How many open themes do you know. There are a lot of themes that you can download for free, but that’s not making them open, right? Next, there are themes that may provide sources, even on open licenses, which makes them technically open but does it make it easy to work with. Its almost like opening sources of a software, but not making the sources readable, not helping with hacking them, not providing documentation, and build environment… If you track all open projects out there, they usually take a lot of time to open their projects exactly because re-licensing sources is not enough. Because it will not make people want to use it and contribute to it.

Because in order to get this kind of activity around your project, there’s much more that needs to be done, and the source files for MCS are exactly doing this. It’s not only theme, it’s a theme with PSD files there, and the PSD files are licensed on Creative Commons 3.0 Attribution Share-Alike and it is ready to be modified. The source has all the layers properly grouped to make working on theme sections easy and natural. It has guidelines that help you keep the scheme in shape while modifying and it makes it easy to change colors or elements that you will likely to want to modify. It is a fully open source theme, and we have an example implementations there to show you, but you can change it however you like and come up with your own implementations.

We will provide tutorials on how to do this, and we hope to see people modify it in creative way and upstreaming their changes to make the theme look even better in result of community effort!

I would like to thank Legal Team in Mozilla (Catherine, Harvey), Tara and Seth for making this possible!

I may be wrong, but I think this is the first case ever of opening the theme this way. I would love to see other examples, but it I think we’re just opening a new chapter with both, Mozilla Community Theme and Mozilla Community Sites – since I think no other project is offering such powerful tools for its communities to develop themselves around their own websites.  Mozilla is leading  🙂

p.s. if there’s someone who knows how to port psd file to gimp xcf without loosing… everything in the file, then I’d love to get your help!

Categories
flock flockblog main mozilla tech

SMIL got sr+ !

I just wanted to share my joy with you! SMIL, animation multimedia integration language – a language that allows easy animations with SVG got superreview from roc a few minutes ago!

picture-32What does it mean? SMIL may find its use in UI animations and will be another step on the way from static UI’s to animated UI’s (which are more natural to human eye when made carefully).

What’s amazing about this project in Mozilla is its story. Brian Birtles started this project in May 2005 as a project for his studies, he quickly crafted basic code and first wiki article, and in November 2005 Brian submited initial patch to Bugzilla.

After that Brian worked on the project till the end of December, finished his term, wrote a paper about Animation in Mozilla and took a break. He picked it up around summer 2006 but did not push too much forward.

A year has passed since Brian sent his patch to bugzilla, and everything started to seem rather skeptical for SMIL. No maintainer, obsolete patch not compiling against trunk and no activity around it… At this point, tor, SVG magician, picked up the patch, cleaned it up, updated to trunk and kept updating for the whole 2007!!! Next, in April 2008 Chris Double picked the patch against and updated once again even adding new features!

In May 2008 Daniel Holbert took charge and started working on the patch to finalize the implementation getting gathering a lot of feedback and reviews from Brian and from Robert O’Callahan. The things started to move faster and around December Daniel proposed the patch for review and super-review. This caused several more rounds of reviews and finally, today, roc gave superrevew which means that he agrees for this architecture of this feature to be implemented into our code base.

While there’s still more work to be done, now we can expect SMIL to land on trunk very soon, and we have Brian back to support Daniel with work on SMIL project.

—-

It’s unique to such open project like Mozilla to have a full open access to working environment for an external student who can pick up his project of choice and lead it, get other peoples help to keep it alive while no leader is around and finally get it finalized by another community member with support from original author who additionally gets hired to work more on his project of choice.

There is such a tremendous variety of ways people are interacting with Mozilla project, such a huge flexibility of relations, its impossible to oversee everything and Mozilla could not operate in any top-down model. It’s such a different structure. Momentum, energy management, focus and global organization direction are being build all around the project on many levels, and being a leader in such organization means something very, very different. We have a huge luck that our l e a d e r s not only understand and incorporate it but also experience it together with us all.

Categories
main mozilla tech

MCS MediaWiki alpha1

After successful launch of the Theme and WordPress, its time for the next tool that your community can find very useful in collaborative work – Wiki.

mcsmediawikiWiki technology allows no-entry-cost edition of documents making it possible for many people to contribute to the same set of documents. Such technologies are widely used for projects like Wikipedia, MDC, wiki.mozilla.org or for many projects at Wikia.

In case of MCS, Wiki can be a good place to start a community when you have a group of people who want to collaborate on the vision for your project, or can serve as a place where people can work on documents and statups updates for your community. In today world almost every project in the world is using a Wiki and we believe that your can benefit as well.

Because of its popularity we decided to stick to MediaWiki, as the most popular wiki solution in the world. MCS MediaWiki is a powerfull addition to WordPress or Drupal based website and will allow you to boost participation level accross your community.

This is an alpha release, and I mean it even more than in the case od WordPress. MediaWiki may be a solid wiki solution, but its definitely not easy to customize and theme, so we want to work more on making the theme better for some specific sections of the Wiki (like search or recent changes), but the big thing that is missing here is usability.

We deployed all controls that should be needed, but the UI of original mediawiki is far from being perfect and our theme tries to fix it where possible. I cannot call it a full success yet and I hope those who will want to deploy the theme as well as other usability experts will want to contribute to the project by finding ways to make the UI more intuitive for use.

picture-11

Edit section
Edit section
preview
preview

You can see it live at http://mcs.labs.braniecki.net/mediawiki or download sources from http://hg.mozilla.org/webtools/mcs/file/tip/mediawiki/.

I am aware that MediaWiki 1.14 has not yet been released, but it’s already branched and will get there soon (while it contains some important improvements and our MCS Mediawiki is in alpha version. alpha versions are for people who know what they’re doing, right?) 😉

So, feel free to test it and play around and if you decide to implement it in your website, consider upstreaming your changes so that everyone benefits!

Next is phpBB3 and Drupal 🙂

Categories
main mozilla tech

What I miss after the switch

So, a few months ago Mozilla have switched from CVS to Hg. Initially, I was fully against this switch. As much as I hate CVS and consider it defective by design, I had really bad experience with Mercurial too.

Mercurial in Flock

Basically, in November 2005 I was a proud member of Flock team. One of the most frustrating things we experienced was CVS and as a small, open minded team in a storming stage of project we decided to skip the natural update to SVN and go for something far more challenging. We switched to Mercurial.

Mercurial 0.7 was an interesting piece of software but was simply not mature enough to handle the project. Except of many small issues (sometimes things went reeeaaallly slow) there were a few big ones including accidental revert of checkins on merge without any notice.

I believe the last one was an ultimate reason to accept a failure and switch once again. Trust me, we didn’t want to switch but we couldn’t afford waiting for all those little things to get fixed and having such experience we decided to go for a stable thing – SVN – with all its shortcomings well known and accepted.

Mercurial in Mozilla

Mozilla spent a reasonable amount of time investigating options across Revision Control Systems and ultimately decided to switch to… Mercurial. (IIRC the reason for not going to git was its performance on Windows)

Fortunately, Mercurial matured enough to fix many of the problems we faced at Flock and after half a year with it, we can say that Hg works for Mozilla fairly well. It definitely has a higher entry barrier, it has longer learning curve, its fairly complex (which is a major problem for non technical people facing it) but it is extremely fast and flexible. It is modern, it is distributed and it is progressing which gives it a promise of a bright future.

I must say that my particular favorite things are:

  • distributed architecture. For an average human being with developer skills it means I can code on a plane, in a bus or while at my girlfriend’s aunt house (during an exciting evening of talking about her relatives) without a connection. All the work can be later synced back to main repository and the revision log of such thing is usable.
  • speed. mercurial is fast, much faster than CVS
  • file moving. There are many things CVS was missing, but I believe that “move” is the single most important one. Lack of “move” in CVS is extremely destructive because it builds a habit of not moving files around without a super serious reason. Clean code, sanity and readability is not super serious reason, and in result while in CVS world, your source code gets less readable in one more way. If you decide to use remove/add in CVS to mimic move you’re loosing the whole history of the file which puts the whole purpose of RCS in question.
  • bisect. Ability to go revision by revision to track where the bug has been introduced is extremely useful addition.

Unfortunately, Mercurial is also carrying many shortcomings. Some of them are especially painful:

  • No svn:externals. It’s becoming a major flaw to me. In MCS project we have tons of small modules that link to each other but should be stored separately. Many CSS/JS files should exist in one place and be linked from specific themes. Lack of externals is not only costing time (I have to apply patch against 5 places) but it also hits user experience (I cannot let someone just pull a repo, he has to manually go into one dir and pull another). It could really help out L10n repo to point to each external locale repo from l10n main repo.
  • Mercurial does a poor job with directories. It may be a matter of habit, but it happened to me that I did “cd ./repo/dir1/dir2;hg revert -all” to revert the whole directory and got the whole repo reverted. Same with commits and other commands. I find it very counter intuitive.
  • It also has a problem with pulling directories. I failed to find a way to get a particular directory cloned or pulled from a repository. In result directions for users are getting even more complex (pull this repo, then get this directory and copy it there)
  • It requires a separate commit to merge. I’m not an expert, so maybe its deeply rooted in logic, but it looks like a dirty hack. (pull clone1, pull clone2, work on clone1, commit, work on clone2, pull to merge… commit the merge.)

Also, our hg.mozilla.org webview is limited comparing to websvn in many areas:

  • you can only download full repo. If you go into particular directory and press “zip” or “bz2” you will download whole repozitory. wrong!
  • you can only link to the whole repository or to particular revision. I need ability to link to “latest” revision of one file or directory (in a branch).
  • you cannot diff between two given revisions (only diff to previous one)
  • you don’t see the revision number until you open a diff to previous revision.
  • you cannot list checkins for given time frame.
  • search sux. only 10 results, no way to get more, not sure what it really includes in results and what not.
  • workflow is screwed. When I’m viewing one file, and I click on revisions, and then browse, I land on the root of the repo for the revision, not in the file I’ve been viewing before.
  • summary shows you whatever branch has been updated lately. It caused several localizers to get scared to death when they updated branch and saw it in what they thought will be tip. It’s very confusing and may cause people to react randomly.

Some of them are minor, some of them are major. I’m particularly desperate to find a replacement for externals and directory exporting cause its important to give clear instructions for MCS project, and without those two the instruction is getting long and clumsy. 🙁

Categories
flock flockblog main mozilla tech

MCS WordPress 1.0alpha

One of the major efforts during last 2 weeks was to prepare working application using Mozilla Community Theme.

The first app that got MCS support is… WordPress 2.7.

wpmclove

WordPress 2.7 is a modern, flexible CMS system, that is best known as an excellent blogging platform. Because of its clean design, easy maintainance and many plugins its also used by many websites as a classic CMS. For example polish community – Aviary.pl – is using  WordPress and it proved to be very stable and solid platform for small websites.

Because one of the primary goals of MCS is to help our small communities get a shiny website with minimum effort WordPress was an obvious choice for the first app to be implemented.

Today, I believe we have a quite stable and usable theme for WordPress together with one custom plugin and support for another.

That’s how it looks in its full glory:

picture-4picture-5

I call it Alpha, because there’s some work to do. JS code requires optimization, Theme should provide admin configuration panel, and it needs some experimental implementations with bug squashing before we can call it stable.

You can install it togther with OpenID to gain full OpenID support. It uses vanilla WordPress 2.7, so feel free to give it a try, and if you’re familiar with WordPress theming/plugins take a look at the sources and… you know… we’re accepting patches 🙂

p.s. we currently do not provide bundles, so to download the elements you either have to use mercurial (hg export http://hg.mozilla.org/webtools/mcs) or go to http://hg.mozilla.org/webtools/mcs and click on “bz2” or “zip” to download the package. Then follow instructions in ./wordpress/INSTALL.

Categories
main mozilla tech

MCS Theme 1.0beta2

10 days after first beta of MCS Theme – core element of the Mozilla Community Sites project, the next iteration is coming!

MCT 1.0beta2
MCT 1.0beta2

MCS Theme 1.0beta2 brings many improvements:

  • Tomer Cohen contributed initial support for right-to-left locales! (thank you!) 🙂
  • several lists are now <ul> (footer link list, article list etc.)
  • fixed nasty bug with right sidebar positioned below content due to Gecko bug by adding a wrapper div with display: table-row in #middle. (dbaron pointed out the solution)
  • fixed another nasty bug that caused middle row to shrink if #content was (almost) empty. (.aside is now display: table-cell by default)
  • fixed IE7 CSS hack. Now the theme will look good in IE7 when left-menu/right-menu is hidden
  • jQuery JS code split into modules
  • JS login box supports states (login, logout, register etc.)
  • cleaned up the use of .headline vs. .title classes
MCT in Right To Left mode
MCT in Right To Left mode

You can download sources from hg.mozilla.org/webtools/mcs directory theme/html and theme/php.

You can also preview Beta2: HTML mockup, HTML rich mockup, PHP mockup, Builder.


This release brings us near to stable version with many elements being in place and working well.

Right now, my main focus is on webtools using the theme, so if you want to play with it a bit, and you’ll find any bug, please let me know!

Categories
main mozilla tech

Mozilla Community Theme v1.0beta

Happy Holidays!

I will use this moment to introduce you the first release of my latest project. Over two months ago I presented the revision version of Mozilla Community Theme.

MCT is an element of a wider project – Mozilla Community Sites (MCS) that will help start a new community and maintain a website without much effort.

The Theme and its implementation are major part of the project and for last two months I have been working on creating a powerful, generic implementation of the theme, several small tools for making the theme easier to use and many tiny updates that should result in the higher quality of the theme.

On Monday we finalized the draft of the licensing guidelines which was the final step to release the theme to public.

Today, I’m proud to present you all the first revision of Mozilla Community Theme (click to test a mockup live):

picture-2

From today I’m starting a serie of blog posts about various aspects of Mozilla Community Theme, but for those of you who want to dig on your own you can just start reading wiki.mozilla.org/MCS documentation.

Logo

mctlogoThe very first element of the new theme is a Mozilla Community logo. The logo is a new element that we hope will become a unifying element of all community building efforts. We spent a lot of time thinking about how to license it and I believe the result is a very relaxed policy that allows you to do whatever you want with the logo, while leaving us ability to block malicious use.

The logo may be used by any community that wants to express its relationship with Mozilla project. We do not try to create a new brand out of it, we try to give you ability to show what you stand for. In result the logo can even be modified (!) to adjust it to your website, but please, try not to overuse this power. The logo means something and I believe its extremely cute, but can be easily devaluated by misuse.

Theme

Mozilla Community Theme is an open source theme (the sources will be provided soon) that provides polished and high quality solution for anyone willing to start a new community website but lacking designer skills.

We provide highly customizable theme that can be used in different color palettes, with different backgrounds, layouts and widgets. The theme was created basing on dozen of current community websites with an intention to match all major components of those websites. It is possible to take the theme as it stands and use it for your website without changing a single line, but if you want you can modify everything. Its up to you and the further you go from the original design, the more you’re on your own in terms of quality 😉

Example implementation

The theme itself is a huge step forward, but the real benefit only starts there. As a part of MCT we provide ready to use implementations of the Theme in several forms.

The very first form is a clean XHTML/CSS/JS mockup which presents the semantic structure of the website and its style documents.

Another is a PHP version, which may look similar but provides an example of how to use several tools and deploy the theme into PHP application.

The third is a small cutomization tool – PHP Builder, which is a proof of concept of what you can modify in the theme with simple CSS file (generated out of GUI). You can customize the theme, download custom.css file and replace it in HTML version to get your custom theme!

picture-3

At the moment Builder is pretty rough, but it already allows to create tens of versions of the theme. Ability to generate custom color palette (select custom and type any HEX RGB color) makes the amount of possible result infinite. In the future Builder should be able to provide more features and layout options.

App implementations

In a few days I will release first Theme implementations – wordpress and mediawiki, and drupal should follow shortly. The app implementations will not only contain the theme itself but also set of extensions that will provide unified set of features across multiple applications (think: OpenID, Single Sign On). We will also work on adding unique Mozilla related extensions that will allow your website to present the data directly from websites like QMO, SUMO or MDC.

MCS Admin Panel

The last step will be to provide single admin panel for installing/updating Mozilla Community Theme powered applications to run a complete website. The panel should allow someone with no prior experience in running a website to painlessly install and maintain his website, learning with no rush how the whole thing works.

Now it is YOUR time!

Working on such project inside Mozilla has, among others, one more benefit. I’m surrounded by web experts. Every single person who is reading this blog post has some unique knowledge and experience with coding HTML/CSS/JS or usability or accessibility or cross-culture design. Everyone can take a look at the sources provided with the whole implementation and find all the bugs I made and all those stupid mistakes. You can help make this project better.

My dream is to have this theme be a pure example of excellence in HTML/CSS/JS website development. Clean, modern code, flexible beyond recognition. During those two months I probably missed many opportunities to get nearer to my goal. Many elements may be not polished or may require some patience and love. If you think you found something like this, you probably did. So please, take a moment to share the feedback.
If you find the project interesting, and have some experience with web development, themes/extensions for WordPress/Drupal/phpBB/punBB/MediaWiki and want to help, email me (zbraniecki _a_t_ mozilla dot com) please. I could use some help 🙂

Credits

I would like to thank people who have helped me with this project. Especially Seth for an incredible patience and support in removing road-blockers, and The Royal Order of Design for a great design they prepared 🙂

Also, Szymon Piłkowski contributed first round of reviews, Wojciech Szczęsny provided initial insight into IE6 compatibility (not ready yet) and Szymon Błaszczyk contributed first usability review.

Plans

After getting the first round of feedback, I will remove “beta” from the release status, tag it and call it official. You can take it today and start using right away, but there may be some changes in the CSS basing on the volume of bugs discovered by peers.

During next days (after some christmas rest with my family)  I will be working on finalizing wordpress implementation (you can take a look at the current status) and mediawiki. I will also shed some light on the PHP code I wrote for this project and present you CSSLib and Style class.

Finally, I hope to spend some time discussing with you your feedback and implementing fixes to the code and helping first brave souls implement it for their new community websites!

So… how do you like it? 🙂

p.s. if you have ideas you would like to see, or you would like to work on, contact me or list them on the MCS:Brainstorm page.

Categories
main mozilla tech

PHP pixel mapper story

While working on Mozilla Community Sites project, I encountered an interesting challenge.

snapshot-2008-12-21-00-55-44

This Poll Box may look nice, but there’s a hidden trap for anyone trying to use this on his website. How to make the cute bars look nice and present real value in it? The intuitive response is to create a small PHP script that will be drawing the bar depending on the input value.

It would be easy to do if only the bar itself is a simple green/red dual color rectangle but in this case, it’s something more sophisticated. Because the bar can be used on different backgrounds, I had to extract it from the source and create a translucent PNG file with representation of blends, shadows and smooth edges. The file looks like this:

pollbar

Great. Now we have the bar, and we can present it on any customized background, but it’s somehow static and cannot be used to present real values, right?
So the next step is to take it into PHP world and here were the trap is hidden. How to take a complex PNG image into PHP file? Unfortunately Google failed to help me here, so I started playing around with GD library (after an hour of searching for how to take alpha value from pixel in Gimp – it’s impossible) and crafted a plan.
I could create two dimension array of pixels (rgba) representing left edge, right edge, green line and red line and bundle it into a bar like this.
Alternative approach would be to cut PNG file and load elements into PHP script on each load, but it will have to cost much more (load file, decode, operations, encode, write) so I sticked to the pixel array map idea.
I was also initially considering trying to create such bar algorithmically (take green, red rectangles, then do the math for shadows, rounded corners, opacity etc.) but even ignoring how much time it would take to write it, the performance of such script would be definitely not satisfying.

So I needed two scripts. First, to take PNG file and build a PHP Array map of pixels. Second, to take such array and paint it on PNG file.

The script with those two functions is my svn repo.

At the top of the script file is an example Array map that will paint the example bar. drawpixelmap() is a function that can take such map as an argument and create PNG image from it.

getpixelmap() is a function that takes PNG image and creates string with PHP Array map.

In result you can take PNG image, save it in PHP, operate on it and draw the final result.

In case of my quest I had to cut the Array map into pieces (left edge, right edge etc.) and do a little bit of math.

The result looks like this:

http://labs.braniecki.net/pollbar.png.php?v=50

http://labs.braniecki.net/pollbar.png.php?v=30

http://labs.braniecki.net/pollbar.png.php?v=75

Of course, any other value from 0-100 range for $v is possible.

So, if you will ever need to dynamically modify PNG file by pixels, those scripts may be useful for you 🙂

btw. I’m writing it from Victoria, where it is snowing for the third day in a row. Not sure how to explain it, but the snow in Canada is different from the one in Europe. Is it possible that its a kind of eggnog influence? 🙂

Categories
main mozilla tech

Mozilla Manifesto [pl]

Pewien czas temu popełniłem tłumaczenie Manifestu Mozilli.

Aviary.pl pomogło mi poprawić jakość tłumaczenia, poczekaliśmy trochę, aż nadszedł czas na wydanie.

Zapraszam: polska wersja Manifestu Mozilli.

Oczywiście cały czas mam świadomość, że dokument nie brzmi jeszcze idealnie – tłumaczenie tak krytycznie ważnego i delikatnego dokumentu o tak fundamentalnym znaczeniu nie jest łatwe (zwłaszcza, że język oryginału też najlżejszy nie jest), zatem jeśli ktoś ma uwagi, to zapraszam do wersji na wiki.aviary.pl, gdzie można popracować nad językiem. 🙂

Czym jest Manifest Mozilli? To dokument, który powstaje od 10 lat… to odpowiedź na pytanie, które wszyscy stawiamy sobie. Czym jest Mozilla? Nie jako jednostka prawna – Mozilla Foundation czy Mozilla Corporation. Czym jest Mozilla jako projekt, jako byt, społeczność, idea. Gdzie jest granica? Kto jest “w” Mozilli? Z całą pewnością Mozilla istniała na długo przed założeniem osobowości prawnej i nikt z nas nie ma wątpliwości, że projekt istniałby niezależnie od sukcesu Mozilli Corporation/Messaging/Mobile czy Foundation.

Dwa lata temu kilka osób, założycieli projektu jak Chris Hoffman czy Mitchell Baker zaczeli głośno zadawać pytanie – kim jesteśmy, dokąd idziemy, co to znaczy Mozilla, co nas łączy?

Co łączy ludzi pracujących nad Firefoksem, Seamonkey, Camino, Thunderbirdem, tysiącami rozszerzeń, ludźmi pracującymi nad dostępnością dla niepełnosprawnych (jak Aaron Leventhal), Bugzillą (jak Frederic Buclin), lokalizatorów, ludzi z Fundacji jak Mitchell czy Gerv i tysięcy innych osób pracujących nad swoimi projektami – czasem komercyjnie, czasem nie.

Wnioski zostały spisane w formie manifestu. Deklaracji, która opisuje co nas łączy. W co wszyscy razem wierzymy i co chcemy robić. Każdy z nas jest inny, pracujemy nad różnymi rzeczami, jesteśmy w różnych momentach życia i Mozilla jest dla jednych z nas ogromną częścią życia, dla innych wspaniałym hobby a jeszcze dla innych malutką formą podziękowania. Wszyscy jednak dzielimy te podstawowe przekonania i wszyscy wierzymy w te podstawowe wartości.

Każdy może “podpisać się” pod tym manifestem. Firma, osoba prywatna, każdy może skorzystać z tekstu manifestu aby pokazać swoje przekonania i zadeklarować pewną wizję Internetu, jeśli zgadza się z nami. Manifest jednoczy nas wszystkich i wyraża w zwięzłej formie światopogląd i idee które wyznają uczestnicy projektu.

Miłej lektury i zapraszam do komentowania 🙂