Fennec 1.1 Context Menus

Fennec 1.1 now supports context menus. Using a long tap (aka tap-n-hold), or right-click on desktop versions, you can get a context menu to appear.

We intentional designed the context menu system to be simple and minimalistic. We do not want large context menus with many, many commands. Currently, context menus are only displayed if the user long-taps on a link or an image. Technically, not all links will activate the context menu. javascript: links, for example will not activate the context menu.

Fennec 1.1 will only ship with two context menu commands: Open Link in New Tab and Save Image.

Add-ons can extend the context menu. Just overlay the context menu list of commands, which is in the XUL. Each command must have a type attribute and only 3 types are recognized: link, image, mailto.

The context menu system will automatically show/hide commands based on where the user long-taps. Under normal circumstances, the add-on will not need to worry about showing or hiding the context menu command:

  • If an image is tapped, only type="image" commands will be shown.
  • If the element is an image inside a link, both types of commands will be shown.
  • If no link or image is picked, no context menu will be shown at all.

Yes, this is a bit restrictive, but that’s the way we want context menus to work for now. Feedback is always appreciated and Mozilla IRC (#mobile channel) is available to help answer questions.

Firefox Mobile 1.1 – What’s Coming

The Mobile Team has been hard at work on the 1.1 release of Firefox Mobile. This release will mainly be a Nokia Maemo release, but the current Android builds are based on the same front-end.

For the 1.1 release, we are focusing on some UI features we didn’t have time to put in the initial release. We are also using your feedback to help improve the browsing experience. You can see the list of planned features on the planning page. As you can see, we have completed much of the work and the beta release is quickly approaching.

Some of the bigger features that have already landed include:

  • Form assistant improvements, including autocomplete
  • Start page redesign
  • Auto update add-ons
  • Portrait support on N900
  • Context Menu with Open in New Tab and Save Image
  • Web content theme update
  • Manage site preferences (clearing passwords and others)
  • Clean up site menu
  • Use volume keys to zoom on N900
  • Save page to PDF

Screen shots of the some new features:


Form Assistant with Autocomplete:


Start Page:


Context Menu:


Page Menu:

FOSDEM 2010 and Fennec Project Update

I was lucky enough to be able to attend FOSDEM 2010. It was my 3rd FOSDEM and I had a blast. I was able to catch a few good talks outside the Mozilla DevRoom, including one of the keynotes. Inside the Mozilla DevRoom, we had a lot of interesting talks from lots of different people and projects. Thanks to everyone who made FOSDEM such a great experience!

I was part of a talk on Firefox Mobile (Fennec). We had about 75 minutes for the talk, so I successfully recruited Vivien Nicolas and Fabrice Desré (two other mobile developers) to help with the presentation. We tried to cover many different topics during the presentation:

  • The thought process for porting to a platform
  • How porting affects the Mozilla platform
  • Designing a touch-friendly UI
  • How you can use add-ons to extend the mobile browsing experience
  • Tips and tricks for great mobile UIs and fast code
  • The roadmap for Firefox Mobile -> 1.1 and 2.0

I am planning a few more blog posts to discuss the Firefox Mobile roadmap soon.

Firefox for Mobile – Keyboard Shortcuts

Not every mobile device has a physical keyboard, but many do. Firefox Mobile supports a handful of keyboard shortcuts that might make your life a little easier:

  • Zoom in: Ctrl+Up arrow
  • Zoom out: Ctrl+Down arrow
  • Go to Location Bar: Ctrl+L
  • Back one page: Ctrl+Left arrow or Backspace
  • Forward one page: Ctrl+Right arrow or Shift+Backspace
  • New tab: Ctrl+T
  • Close tab: Ctrl+W
  • Open link in new tab: Ctrl+Tap on link

For a more complete list of keyboard shortcuts, and lots of other useful information, go to the Firefox Mobile support knowledge base.

XULRunner 1.9.0.x Releases – The End is Near

Mozilla is currently, building and releasing XULRunner simultaneously with Firefox releases. Releases can be found here.

XULRunner releases for 1.9.0, 1.9.1 and 1.9.2 branches (matching Firefox 3.0, 3.5 and 3.6 respectively) are available. The question now becomes “How long does Mozilla keep releasing older branches of XULRunner?” We’d like to re-purpose some of the resources used to build older branches.

Therefore, we intend to stop posting XULRunner builds and releases from the 1.9.0.x branch soon. This would only affect Mozilla building and releasing XULRunner 1.9.0.x. The source code to XULRunner 1.9.0.x would remain available and developers could always build and release their own XULRunner packages from the source code.

Security updates and fixes may still happen on the 1.9.0 branch. If you depend on the 1.9.0 branch and want to get these fixes into your project, you’ll need to build XULRunner yourself.

Mozilla will continue to build and release XULRunner from the 1.9.1 and 1.9.2 branches.

Please feel free to provide feedback on the pros and cons. We’d be interested in knowing how this action affects users of prebuilt XULRunner releases. Follow up on the newsgroup posting.

Perils of the viewport meta tag

Apple introduced the viewport meta tag in mobile Safari to help web developers improve the presentation of there web pages on the iPhone. We added support for the viewport tag in mobile Firefox for the same reasons.

The viewport tag allows web developers to set the width, height and scale of the browser area used to display web content. However, some websites are not doing a good job configuring the viewport tag and it affects the presentation in Firefox.

When setting the width or height, developers can use a fixed number of pixels or use the constants: device-width and device-height. The iPhone is 320px wide in portrait and 480px wide in landscape. Other devices have different screen sizes. It seems the “width=320” is a popular fallback though. See how Facebook and DeviantART display in Firefox on the N900 (480px in portrait and 800px in landscape):

touch.facebook.com
fennec-viewport-facebook

deviantart.com
fennec-viewport-deviantart

Don’t get me wrong. I like “touch-friendly” web pages on my mobile device. However, the iPhone is not the only mobile device out there. If a web developer has gone through the effort to make a “touch-friendly” web page, please configure your viewport to work in other devices. It’s easy!

Add-ons and Restarts – Yuck!

There has been a lot of discussion about the future of the Mozilla add-on infrastructure. I think it’s clear now that Mozilla is not removing the classic add-on mechanism. In fact, Fabrice Desré found a nice bit of news on an upcoming feature (via comments on Atul’s post):

Fabrice: Does the fact that jetpacks are now XPIs mean that the “no restart after install” feature will be implemented for traditionnal add-ons ?

Atul: That’s correct! We don’t have a bug filed for it yet, still need to do that, but the idea is that if an extension includes certain metadata in its install.rdf that essentially tells Firefox “look, I know how to unload all my resources reliably”, then Firefox will trust it and call a certain function whenever the extension needs to unload itself.

Mossop: I’ll just elaborate a little. Plans are naturally in flux right now but the idea is to allow XPI packages to install without restarts if they wish, however there will be constraints. They will be responsible for doing everything themselves, which means (at least in my head right now) we won’t automatically load chrome or components from these extensions. Instead we will just do startup and shutdown calls into the extension and allow it to register/unregister what it needs by itself. This means that just marking an existing extension to work without restarts wouldn’t get you anywhere, you still need to do the extra work to handle the startup/shutdown parts.

This is great news for add-on developers! I’m sure MDC will have some code snippets for dynamically loading chrome overlays and components to make it easy to support no-restart add-ons.

AdBlock Plus Adds Support for Fennec

Thanks to Fabrice Desré and Wladimir Palant, development builds of AdBlock Plus support Fennec! The port embraces Fennec’s minimalistic design asthetic – exposing only a simple options UI. However, this is more than enough to make a great impact on browsing in Fennec.

fennec-adblockplus-options-small

Besides reducing the visual clutter on web pages, ad-heavy pages load noticeably faster! As Wladimir notes in his post, AdBlock Plus will only work in nightly builds of Fennec (version 1.0b6pre). Install a nightly version (including desktop versions) or use the new nightly update channel from your Maemo device. He also mentions that work to improve the first-run experience is coming in future releases.

Install a development build of AdBlock Plus by navigating to https://adblockplus.org/devbuilds/adblockplus/ using Fennec and click on the most recent XPI file. Fennec will step you through installing the add-on.

Fennec – Nightly Maemo Updates

Desktop versions of Firefox have nightly update channels. New versions are automatically downloaded and available for install as they become available. Each morning, a Firefox user can quickly and easily update to the newest nightly version.

Thanks to the release engineering team, the same easy nightly updates are available for Firefox on Maemo.

Aki Sasaki has provided some simple instructions for getting nightly updates installed on your Maemo device:

  1. Go to the nightly repository. The repository is basically a large file server with folders for each combination of source code branch and language localization.
  2. Choose the branch you want (trunk == mozilla-central / 1.9.2 == mozilla-1.9.2). Fennec 1.0 is being released from the Mozilla 1.9.2 source code branch, so you probably want to use “1.9.2_*” branch.
  3. Choose the locale you want. You probably want the multi-locale bundle (“*_multi”), but you can choose a different one.
  4. Click on the “*_nightly.install” file in the appropriate repository. This should automatically start the Application Manager on your Maemo device and Firefox for Maemo will be installed.

Once installed, the Application Manager should notify you when a new version of the nightly is available and allow you to update Firefox. This process is a little different than desktop Firefox, where the update mechanism is built into the application. However, it fits in better with the Maemo platform.

When we have release packages in those repositories, there will be a second .install file (with no “_nightly” in the name) that points to the release section rather than the extras section. But if you install that, you won’t get nightly updates for those.

We also have plans for a simple web page front-end to the repository. The web page will have nice human-readable descriptions instead of cryptic filenames 🙂