Posted by: digdug2k | December 20, 2013

Action modes for Android

Assuming all goes well, Firefox will soon be shipping with our first support for Android’s ActionModes for text selection. We previously allowed text selection via some special context menu options when people long pressed on selected text. This replaces that implementation with a nice new UI:

ImageIf you’ve got an add-on that adds something to the selected text context menu:

  1. You’re likely broken in Nightly and Aurora builds right now and
  2. you can easily update your add-on to show in this menu as well.

Some astute developers have already updated themselves, but adding support is pretty easy (updated MDN docs here). We’ve added two methods to the SelectionHandler

  1. let actionId = SelectionHandler.addAction({
        label: "My addon",
        id: "my_id",
        icon: "resource://myaddon/icon", // You MUST include an icon to be shown in the ActionBar,
    // otherwise you'll always be put into the overflow menu.     action: function(aElement) {         // do something when clicked     },     selector: {
    // Just because this is being shown, doesn't mean there is a selection.
    // We may just be showing the cursor handle to let you move the cursor position.
            matches: function(aElement) { return SelectionHandler.isSelectionActive(); }     } },
  2. SelectionHandler.remove(actionId);

Text selection has had an exciting life in Firefox for Android, and is likely going to go through another transition as we land better platform support for touch friendly handles for not just Android, but also Firefox OS, and Metro Firefox. But this is a good move for the UI. We implemented it as a compatibility layer, so it should be available for all Android versions from Froyo to the newest KitKat devices.

About these ads

Responses

  1. As with many UI decisions in Firefox of late, especially in Android, usability is suffering.

    I hate the new text selection icons (which are not intuitive for function) and it makes the amazingly awesomely wholesome navigation bar (or whatever marketing name it’s been given) modal – meaning that if text is selected accidentally (as can happen) deliberately, or even when scrolling (as just happened as I reviewed this text), the user is unable to change tab or perform many other navigation functions.
    If we really do have to have this bar option then please don’t make the bar modal.

    Also I’d love to know why with the continued blurring of capabilities and use of Android tablet vs traditional laptops that Firefox is diverging the UE on these platforms. I would LOVE the UI of the tabbed desktop Firefox on my 10″ tablet rather than a version of the handset UI. A version where on the tablet it changes to a left not right handed tab list; which I can only conclude is to deliberately confuse the muscle memory of users with both class of device?

    • Thanks for the feedback. I (personally) tend to agree the icons aren’t great. They’re the standard Android ones. We’ve had this debate a few times about them as well. Interestingly, the paste icon for dark themed applications is actually a paste bottle, which I like better. But we’re light themed, and decided that platform consistency was important here.

      The modal bit is also a platform consistency thing. One neat thing we have going for us is that you COULD override this behavior with an extension. If you wanted to put that together, I’d be happy to help you. Write me here or as wesj on irc.mozilla.org. Otherwise, if I have time to do it, I’ll leave another reply on this blog post.

      The tablet thing is interesting as well, because we’ve got some work underway to revamp the tablet UI. Its still a little early, but a lot of the ideas/mockups being thrown around should bring us back in closer with the desktop UI. Since we’re not using XUL, its not as simple as just hitting a switch. We’ll have to re-implement everything, but we’ve gotten pretty good at that. Feedback will be welcome when it happens :) Early studies from the UX team are at http://f.cl.ly/items/1f0C3b2f3F2d111N3V3k/Tablet%20refresh%20sprint%20findings.pdf if you’re interested.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: