Closed Bug 658344 Opened 13 years ago Closed 13 years ago

Create some useful introductory text for the Scratchpad

Categories

(DevTools :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
Firefox 6

People

(Reporter: rcampbell, Assigned: rcampbell)

References

Details

(Whiteboard: [scratchpad][fixed-in-devtools][merged-to-mozilla-central])

Attachments

(3 files)

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.
 */
Assignee: nobody → rcampbell
Status: NEW → ASSIGNED
Attached image screenshot
Attached patch introSplinter Review
Attachment #533751 - Flags: review?(mihai.sucan)
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".
Attachment #533751 - Flags: review?(mihai.sucan) → review+
Maybe you also need a colon at the end of the line before the numbered list starts.
(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 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.
Attachment #533751 - Flags: review?
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.
Attachment #533751 - Flags: review? → review+
(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!
updated based on feedback.
Whiteboard: [scratchpad] → [scratchpad][fixed-in-devtools]
Comment on attachment 534073 [details] [diff] [review]
[checked-in] [in-devtools] comment

http://hg.mozilla.org/projects/devtools/rev/ccc461a5e51e
Attachment #534073 - Attachment description: comment → [in-devtools] comment
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [scratchpad][fixed-in-devtools] → [scratchpad][fixed-in-devtools][merged-to-mozilla-central]
Target Milestone: --- → Firefox 6
Comment on attachment 534073 [details] [diff] [review]
[checked-in] [in-devtools] comment

http://hg.mozilla.org/mozilla-central/rev/ccc461a5e51e
Attachment #534073 - Attachment description: [in-devtools] comment → [checked-in] [in-devtools] comment
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.
Status: RESOLVED → VERIFIED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: