My first Firefox contribution

When I started ImageTweak a few years ago, the decision of building an extensions was mostly due to the fact that the Firefox codebase looked, frankly, quite scaring. Even only attempting to compile Firefox on Windows looked like an impossible endeavor, let alone building a modified version.

Compared to this, writing an extensions looked like a piece of cake (looking back, this was a rather naïve evaluation, but that’s another story…).

Fast forward a few years: ImageTweak has gotten pretty mature, so the question pops up again. Wouldn’t it be better to tackle the source of all problems (pun intended) and bring at least a subset of ImageTweak to all Firefox users? And so, on a fine spring day, while working on my MSc thesis, I finally found the courage to make a real attempt at producing a patch that would at least bring feature parity with ImageTweak 0.9, i.e. centering stand-alone images on a dark background.

After a few rounds of patches, I finally managed to produce a working patch that had a single, HUGE, issue. It produced an awful lot of failed tests in the regression tests. If you add to this that, by the time the working patch was ready, I was on the eve of my dissertation (that would be followed by a fair amount of AFK holidays and by a close-to-immediate hiring for a consultancy firm) the amount of time I could devote to Mozilla-related tasks dropped rather quickly to nil.

Luckily, my (clumsy) attempt at a patch had the effect of setting the proverbial ball rolling: somebody (Jared Wein) over at BMO picked up where I left off and fixed all regression tests. And, just like that, a couple of weeks ago, I received a notification about the fact that my patch had been pushed to mozilla-central and that it will be part of Firefox 11. Proudness ensued.

Obviously, as with any other user-facing change, this is prone to (hopefully constructive) discussion. And that’s good, I guess, because those are yet more proverbially rolling balls.

update: Unlike Daniel Glazman, Jared Wein seems to like it: Blinded by the light! – An improved image viewing experience in Firefox

ImageTweak development moved to GitHub

I finally resolved to move the trunk code of ImageTweak to GitHub. Up to now I never used any VCS for ImageTweak because I felt it was kind of overkill. Unfortunately, this is no longer true because – apart from the coaasional trivial fixes – all new features will likely require extensive rewrites and testing.

In the repository linked above you will always find the latest source of ImageTweak (modulo local changes not yet pushed to GitHub) with the added bonus that, by leveraging the GitHub infrastructure, you can fork ImageTweak with a single click, make changes to the source and send me pull requests to have them included in the official tree.

Preliminary support for videos in ImageTweak

Today I finally had a couple of hours available to work on ImageTweak and I decided to start by adding some new feature (way more interesting than fixing bugs!). The result is that now ImageTweak can work its magic (this word is severely abused lately) on videos as well. Mind you, only for native video (i.e. those supported by the HTML5 <video> element) and not for plugin videos (flash-based as well).

ImageTweak preliminary support for video

ImageTweak preliminary support for video

Right now it’s nowhere near an usable state because the user controls where thought for images and obviously video has different needs. I’ll need to try to figure this out well before pushing a beta. The good news is that most of the functionalities work out of the box just by adding a couple of abstractions. For example, zooming and rotations work already, and so does resizing.

Preliminary support for videos in ImageTweak

Zoom and rotation work already

Now a new problem arises… since it won’t work on just images anymore, should I change the name ImageTweak? If yes, how should I call it?

Drag&drop not really working properly in ImageTweak

When I released ImageTweak 0.19 I wrote in the changelog that the main change was the support for proper image drag&drop.

It actually works correctly but this change had the side effect of changing the normal mouse pointer used by ImageTweak to indicate that you’re moving an image around the window. I noticed this before releasing the update, but it seemed like a minor annoyance worth the additional functionality. I actually tried to fix it but found no way, and since there were a lot of people writing negative reviews on AMO for the lack of drag&drop support I decided to release it without fixing it.

Fast forward some weeks, and it turns out that actually the new behaviour is quite confusing and many are complaining about the mouse pointer showing the “forbidden” shape while moving the image. Fewer than they were complaining before about the lack of drag&drop, but still…

So I set out to find a solution for this problem but apparently there’s no way to freely control the mouse pointer shape during a drap&drop operation. The only thing that comes closer is setting the mozCursor property of the DOMDataTransfer interface to “default”, but that works only on win32 and simply switch the cursor from “forbidden” to the default arrow.

I’m therefore pretty much stuck in a fix: I have to fix this problem but I have no idea of how. If you know how to do this, or know somebody that might help me in fixing this, please let me know.

ImageTweak 0.19: proper drag&drop

A few months and a complete change of location (I’m in Helsinki right now!) later, ImageTweak is going to reach version 0.19.

I had to scrape all the work I already did for 0.19 because I hit a few roadblocks, and so I had to start over with a minor but longstanding bug: proper drag&drop support. What it means is that you won’t have to hold CTRL anymore when performing drag&drop. The price is that I had to drop support for firefox 2.x and 3.0.x.

I just added it on AMO. As soon as it gets reviewed it will be available for download.

p.s. I also enabled donations on AMO, so if you feel like it please support the development of ImageTweak.

ImageTweak: over 2 millions downloads and counting

I just noticed that ImageTweak passed the 2M downloads mark and is steadily above 200K active daily users. That’s quite something! A big thanks to all my users (well, maybe not really all of them).
Just in case someone is wondering: I’m open to new contributors for ImageTweak. It really isn’t a big codebase, but it needs maintenance and further development… if you know javascript (and possibly a little about developing Firefox extensions) and you’re willing to contribute please leave a comment here.

Teh interwebs ‘r fun!

This guy‘s amazing. Seriously.
Everything started back when he left a review of ImageTweak on AMO, where he “reported” a never-heard-of-before bug:

First, the good =) 1) Customizable image view background color 2) Can move image W/arrow & mouse Now, the bad =( 1) Always snaps back 2 original image size whenever U relocate the image – so retarded (but there is a workaround – install ‘Page Zoom’ & use that 2 resize the image instead of this retarded ‘ImageTweak’ plugin 2 do so =) 2) Insane upside-down scrolling defaults. Oh yes, when I push the up arrow I want the image 2 move DOWN?!?! WTF?!?! Get a grip man – wow So, fix those 2 things & it’ll B kewl. I also have ‘Image Zoom’ installed, but it doesn’t override your crap snap-back nonsense.

I answered its review on AMO asking for details, but somehow he never replied. Continue reading