Create some useful introductory text for the Scratchpad

VERIFIED FIXED in Firefox 6

Status

()

Firefox
Developer Tools
VERIFIED FIXED
6 years ago
6 years ago

People

(Reporter: rc, Assigned: rc)

Tracking

unspecified
Firefox 6
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

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

Attachments

(3 attachments)

(Assignee)

Description

6 years ago
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)

Updated

6 years ago
Assignee: nobody → rcampbell
Status: NEW → ASSIGNED
(Assignee)

Comment 1

6 years ago
Created attachment 533750 [details]
screenshot
(Assignee)

Comment 2

6 years ago
Created attachment 533751 [details] [diff] [review]
intro
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.
(Assignee)

Comment 5

6 years ago
(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.
(Assignee)

Comment 6

6 years ago
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+
(Assignee)

Comment 8

6 years ago
(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!
(Assignee)

Comment 9

6 years ago
Created attachment 534073 [details] [diff] [review]
[checked-in] [in-devtools] comment

updated based on feedback.
(Assignee)

Updated

6 years ago
Whiteboard: [scratchpad] → [scratchpad][fixed-in-devtools]
(Assignee)

Comment 10

6 years ago
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

Updated

6 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Whiteboard: [scratchpad][fixed-in-devtools] → [scratchpad][fixed-in-devtools][merged-to-mozilla-central]
Target Milestone: --- → Firefox 6

Comment 11

6 years ago
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

Comment 12

6 years ago
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
You need to log in before you can comment on or make changes to this bug.