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 🙂

Categories
main mozilla tech

MozCamp in Victoria tomorrow

Tomorrow I’m attending MozCamp Victoria.

I’m excited to see so many of my old colleagues from Flock there as well as people from Mozilla Messaging, Mozilla Foundation and ActiveState most of whom I didn’t have chance to meet yet.

We were hoping (with Mark and Zak) to craft a little MozCamp+ Net Literacy Workshop around, but it didn’t work out yet. I hope we’ll find time to talk about it more.

In short, the idea of Net Literacy Workshop is to gather a bunch of people from schools, universities or straight from streets and show them how they can protect their privacy, how they can avoid viruses/trojans/phishing and how they can efficiently use the Internet to improve their productivity. How to wisely use social networks, cloud computing, wikis. Show people how easy it is to set up an own blog or custom wiki. Explain the tools they have to stimulate their creativity and guide them through the basic tools that are respecting their privacy, are free and open, and can make their Internet experience richer.

It’s one of the ideas that is on my mind recently. How can we use the market share of Firefox to deliver the promise of Mozilla. Choice and Innovation. How to use it as a tool for broader goals. If we have, say 30-40% of the market share in one country, how can we really use it? Where can we go from there?

I believe that the idea of Net Literacy Workshops, or various kinds of so-called MozCamp+ events is exactly the kind of think we can start investigating in countries like Poland, Hungary, Romania, Finland or Slovenia. Delivering Mozilla Manifesto values using organic communities. You’ll find more on that at Mark Surman’s blog.

Categories
main tech

Project watcher update

So, after over two and a half year since its initial release, my Project Watcher is getting a massive update.

The old version has been “released” on March 7th, 2006. It contained a list of projects I was monitoring (you can see the old list in the post linked above).

in November 2007 in two posts (one, two) I tried to update the list starting from reporting what happened in those projects since the announcement but somehow got distracted (yea…).

So, now I’m finally doing the update and together with a minor selective list of updates on what happened with some of the projects listed there and what are the new ones.

Categories
main tech

Ubuntu 8.10 released

Congratulations to Canonical and Ubuntu community on release of Ubuntu 8.10!!!

I’m proudly using Ubuntu 8.10 on my mbp (it works great) with a beautiful Dust theme, and even more beautiful GDM theme WillWill. (there’s also Willbex theme available).

The most interesting thing from my POV in this release is a great community riot around the theme for the new Ubuntu release which was strengthen by this set of mockups promoted at brainstorm.ubuntu.com and digg.

I find it a good sign of the community health how strong reaction this topic received and I’m a bit disappointed by lack of public discussion between broad community and people in charge of the project. I believe we’re doing a better job on this in Mozilla and I hope it’ll be a lesson for Ubuntu project similar to what we got with Firefox 1.0 Theme switch issue.

Bottom line is that I believe this energy motivated Mark to hire designers, usability and user experience experts. It’s always good to see community getting so energetic around something *they* think is important, and I believe open projects model makes it especially effective in a longer run.

Once more, congrats on the release guys! 🙂