~robcee/ more than just sandwiches

Posted
10 May 2011 @ 3pm

Tagged
devtools, Firefox, Mozilla

Scratchpad (née Workspace), Web Developer Menu landed

First of all, I feel obliged to ask you to use Aurora. It’s pretty. It has a nice icon. You’ll enjoy the early glimpse of features and smooth visuals. You can get it here: http://www.mozilla.com/en-US/firefox/channel/.

With that out of the way, I can talk about the landing of Scratchpad (formerly Workspace) into mozilla-central. It landed yesterday and you can find it in today’s Nightly under the Web Developer menu. There’s also a new submenu in Tools if you’re on a Mac or running Windows with the menubar shown. We’ve moved Page Source there as well to be consistent with the App Menu’s contents.

You can also open the Scratchpad with the F4 key for rapid access.

If you’re an extension or browser developer, you’ll want to open about:config and change devtools.chrome.enabled to true. This adds a Chrome item to the Context menu for Scratchpad. As the menu might suggest, it changes your default JavaScript context to be the browser’s chrome space.

This is brand new stuff. Mihai Sucan did a great job of converting our add-on prototype to a browser feature, but there might still be some rough edges. Please file bugs under Firefox::Devtools in bugzilla.

And then there’s the outstanding stuff we have left to do. High on that list is some actual documentation and a screencast to show how it can be used. You can and should pester me to do this. I’m hoping to do a little screencasting sometime later this week.


12 Comments

Posted by
David Illsley
10 May 2011 @ 4pm

I’m a little surprised at the lack of any visible buttons on the window – it doesn’t feel like good usability (especially on Mac) for the only way to use a function being a context menu item. Are there any plans to make its use a little more obvious?


Posted by
robcee
10 May 2011 @ 4pm

Not presently. The idea is to be quick and uncluttered. You’ll note that the various Inspect, Execute and Print functions all have hotkeys associated with them.


Posted by
Anthony Ricaud
10 May 2011 @ 5pm

I don’t get the purpose of this tool. What can it do that the Web Console cannot?


Posted by
Yansky
10 May 2011 @ 8pm

@Anthony From what I can tell, this gives you any easy way to test out javascript snippets with chrome privileges. If you’re an extension developer this an save you having to restart the browser so often.


Posted by
robcee
10 May 2011 @ 9pm

Not just chrome, any JavaScript.

I hope my oft-promised screencast can make it a little clearer. Stay tuned!


Posted by
Girish Mony
11 May 2011 @ 12am

Hi Robcee,

I like David’s idea. You can add a button and keep it in Customize Toolbar window. Users who needs it will take it from there and place it where they like. In this way you can make sure it is uncluttered. Am I sensible?


Posted by
robcee
11 May 2011 @ 10am

@girish It’s pretty sensible, although there’s some extra code involved to make it happen. If we include graphical toolbar buttons, we have to have graphics — how do I represent “Execute” or “Print” in this context in a way that’s universally understandable? We need an extra View menu with show/hide toolbar code…

Anyway, it’s not an unreasonable request. Filed bug 656273. Thanks for the comments Girish and David!


Posted by
daniel
11 May 2011 @ 1pm

great work!
what would you say are the advantages compared to the expanded (multiline) command line in firebug?


Posted by
robcee
11 May 2011 @ 4pm

I would say these are the advantages over the command-line in the console and the multiline command line in Firebug:

  • persistence,
  • file open and save
  • detached editor window
  • ease of execution
  • simplicity
  • I think the Scratchpad is sufficiently different from various console-based command-lines that it’s a different beast altogether. Try it!


    Posted by
    lostboyislost
    7 June 2011 @ 5pm

    I’m running aurora in OS X and I cannot find where the #$^%^ this scratchpad thing is.


    Posted by
    lostboyislost
    7 June 2011 @ 5pm

    :( seems the Web Developer Toolbar’s Web Developer Menu Item is having a negative interaction with the new built in Web Developer Menu Item.


    Posted by
    robcee
    7 June 2011 @ 5pm

    oh… that’s unfortunate. :(

    We’ll have to contact the author and see if we can get them to fit their menu in there.