Last Comment Bug 658344 - Create some useful introductory text for the Scratchpad
: Create some useful introductory text for the Scratchpad
Status: VERIFIED FIXED
[scratchpad][fixed-in-devtools][merge...
:
Product: Firefox
Classification: Client Software
Component: Developer Tools (show other bugs)
: unspecified
: All All
: -- normal (vote)
: Firefox 6
Assigned To: Rob Campbell [:rc] (:robcee)
:
Mentors:
Depends on: 653108
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-19 11:50 PDT by Rob Campbell [:rc] (:robcee)
Modified: 2011-05-26 07:02 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
screenshot (39.14 KB, image/png)
2011-05-19 12:20 PDT, Rob Campbell [:rc] (:robcee)
no flags Details
intro (3.30 KB, patch)
2011-05-19 12:20 PDT, Rob Campbell [:rc] (:robcee)
mihai.sucan: review+
sdwilsh: review+
Details | Diff | Review
[checked-in] [in-devtools] comment (4.20 KB, patch)
2011-05-20 12:57 PDT, Rob Campbell [:rc] (:robcee)
no flags Details | Diff | Review

Description Rob Campbell [:rc] (:robcee) 2011-05-19 11:50:42 PDT
Scratchpad should have a comment that explains how to use it and what it's for instead of the default placeholder text (which also needs to be updated).

The text should be something like:

/*
 * This is a JavaScript Scratchpad.
 *
 * Enter some JavaScript, then Right Click or choose from the Execute Menu
 * 1. Run to evaluate the selected text,
 * 2. Inspect to bring up a Property Panel on the result, or
 * 3. Display to insert the result in a comment after the selection.
 */
Comment 1 Rob Campbell [:rc] (:robcee) 2011-05-19 12:20:19 PDT
Created attachment 533750 [details]
screenshot
Comment 2 Rob Campbell [:rc] (:robcee) 2011-05-19 12:20:53 PDT
Created attachment 533751 [details] [diff] [review]
intro
Comment 3 Mihai Sucan [:msucan] 2011-05-20 08:45:33 PDT
Comment on attachment 533751 [details] [diff] [review]
intro

Review of attachment 533751 [details] [diff] [review]:
-----------------------------------------------------------------

Patch looks fine, r+!

::: browser/locales/en-US/chrome/browser/scratchpad.properties
@@ +35,5 @@
> +statusBarContent=Content: %S
> +
> +# LOCALIZATION NOTE  (scratchpadIntro): This is a multi-line comment explaining
> +# how to use the Scratchpad.
> +scratchpadIntro=/*\n * This is a JavaScript Scratchpad.\n *\n * Enter some JavaScript, then Right Click or choose from the Execute Menu\n * 1. Run to evaluate the selected text,\n * 2. Inspect to bring up a Property Panel on the result, or\n * 3. Display to insert the result in a comment after the selection.\n */\n\n

Not sure if "Property Panel" is appropriate naming. Perhaps change this to "Object Inspector".
Comment 4 Mihai Sucan [:msucan] 2011-05-20 08:59:23 PDT
Maybe you also need a colon at the end of the line before the numbered list starts.
Comment 5 Rob Campbell [:rc] (:robcee) 2011-05-20 09:55:01 PDT
(In reply to comment #3)
> Comment on attachment 533751 [details] [diff] [review] [review]
> intro
> 
> Review of attachment 533751 [details] [diff] [review] [review]:
> -----------------------------------------------------------------
> 
> Patch looks fine, r+!

Thanks!

> Not sure if "Property Panel" is appropriate naming. Perhaps change this to
> "Object Inspector".

Yeah, good idea. Matches the Inspect menu option better.

> Maybe you also need a colon at the end of the line before the numbered list
> starts.

Will do.
Comment 6 Rob Campbell [:rc] (:robcee) 2011-05-20 09:57:26 PDT
Comment on attachment 533751 [details] [diff] [review]
intro

need a browser peer review, taking into account mihai's nits which I'll add when I update the patch.
Comment 7 Shawn Wilsher :sdwilsh 2011-05-20 10:01:43 PDT
Comment on attachment 533751 [details] [diff] [review]
intro

Review of attachment 533751 [details] [diff] [review]:
-----------------------------------------------------------------

r=sdwilsh with comments addressed.

::: browser/locales/en-US/chrome/browser/scratchpad.dtd
@@ +123,5 @@
>  <!ENTITY webConsoleCmd.label          "Web Console">
>  <!ENTITY webConsoleCmd.accesskey      "W">
>  <!ENTITY webConsoleCmd.commandkey     "k">
>  
> +<!ENTITY textbox.placeholder          "// Enter some JavaScript, select it, right click and select Run, Inspect or Display.">

I missed this in the initial review, but add a localization note stating that this has to be a valid JavaScript comment.

Also, you've changed the string, so I think you'll want to change the name (check with l10n).

::: browser/locales/en-US/chrome/browser/scratchpad.properties
@@ +34,5 @@
>  # bar.
> +statusBarContent=Content: %S
> +
> +# LOCALIZATION NOTE  (scratchpadIntro): This is a multi-line comment explaining
> +# how to use the Scratchpad.

Please also state in the note that this has to be a valid JavaScript comment.
Comment 8 Rob Campbell [:rc] (:robcee) 2011-05-20 12:38:13 PDT
(In reply to comment #7)
> Comment on attachment 533751 [details] [diff] [review] [review]
> intro
> 
> Review of attachment 533751 [details] [diff] [review] [review]:
> -----------------------------------------------------------------
> 
> r=sdwilsh with comments addressed.
> 
> ::: browser/locales/en-US/chrome/browser/scratchpad.dtd
> @@ +123,5 @@
> >  <!ENTITY webConsoleCmd.label          "Web Console">
> >  <!ENTITY webConsoleCmd.accesskey      "W">
> >  <!ENTITY webConsoleCmd.commandkey     "k">
> >  
> > +<!ENTITY textbox.placeholder          "// Enter some JavaScript, select it, right click and select Run, Inspect or Display.">
> 
> I missed this in the initial review, but add a localization note stating
> that this has to be a valid JavaScript comment.

Since it's just placeholder text, it doesn't *really* have to be a comment, but I like that it is, so I'll add the note.

> Also, you've changed the string, so I think you'll want to change the name
> (check with l10n).

drat.

> ::: browser/locales/en-US/chrome/browser/scratchpad.properties
> @@ +34,5 @@
> >  # bar.
> > +statusBarContent=Content: %S
> > +
> > +# LOCALIZATION NOTE  (scratchpadIntro): This is a multi-line comment explaining
> > +# how to use the Scratchpad.
> 
> Please also state in the note that this has to be a valid JavaScript comment.

Good call. Thanks!
Comment 9 Rob Campbell [:rc] (:robcee) 2011-05-20 12:57:33 PDT
Created attachment 534073 [details] [diff] [review]
[checked-in] [in-devtools] comment

updated based on feedback.
Comment 10 Rob Campbell [:rc] (:robcee) 2011-05-21 05:41:20 PDT
Comment on attachment 534073 [details] [diff] [review]
[checked-in] [in-devtools] comment

http://hg.mozilla.org/projects/devtools/rev/ccc461a5e51e
Comment 11 Dave Camp (:dcamp) 2011-05-21 21:31:05 PDT
Comment on attachment 534073 [details] [diff] [review]
[checked-in] [in-devtools] comment

http://hg.mozilla.org/mozilla-central/rev/ccc461a5e51e
Comment 12 AndreiD[QA] 2011-05-26 07:02:44 PDT
Verified fixed on:
Windows 7:
Mozilla/5.0 (Windows NT 6.1; rv:6.0a2) Gecko/20110525 Firefox/6.0a2
Window XP:
Mozilla/5.0 (Windows NT 5.1; rv:6.0a2) Gecko/20110525 Firefox/6.0a2
Mac OS 10.6
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:6.0a2) Gecko/20110525 Firefox/6.0a2 
Linux i686:
Mozilla/5.0 (X11; Linux i686; rv:6.0a2) Gecko/20110525 Firefox/6.0a2

*Note: The text in the Description is introductory when opening Scratchpad. Marking this as Verified.

Note You need to log in before you can comment on or make changes to this bug.