Closed
Bug 906632
Opened 11 years ago
Closed 10 years ago
Indentation is inconsistent between jsb and Scratchpad
Categories
(DevTools Graveyard :: Graphic Commandline and Toolbar, enhancement)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 33
People
(Reporter: eldmannen+mozilla, Assigned: aryx)
Details
Attachments
(1 file, 1 obsolete file)
1.69 KB,
patch
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0 (Beta/Release) Build ID: 20130818030219 Steps to reproduce: Used tab in Scratchpad (Shift-F4) Used jsb (JavaScript beautifier) (Shift+F2) Actual results: Scratchpad indented with 4 spaces. jsb intended with 2 spaces. Expected results: Scratchpad and jsb should use same indention.
Updated•11 years ago
|
Severity: normal → enhancement
Comment 1•11 years ago
|
||
This issue actually belongs in gcli. The Scratchpad's pretty printer and the source editor both use the "devtools.editor.tabsize" pref to determine the indentation (which defaults to 4), where the jsb command uses a hardcoded 2.
Status: UNCONFIRMED → NEW
Component: Developer Tools: Scratchpad → Developer Tools: Graphic Commandline and Toolbar
Ever confirmed: true
Assignee | ||
Comment 2•10 years ago
|
||
This patch makes jsb use devtools.editor.tabsize. The value has been lowered to 2 on trunk. With the patch applied, changes to the indent size require a restart. Is it possible to make this restartless with the current command structure?
Attachment #8435214 -
Flags: review?(mratcliffe)
Updated•10 years ago
|
Attachment #8435214 -
Flags: review?(mratcliffe) → review+
(In reply to Archaeopteryx [:aryx] from comment #2) > Created attachment 8435214 [details] [diff] [review] > patch, v1 > > This patch makes jsb use devtools.editor.tabsize. The value has been lowered > to 2 on trunk. With the patch applied, changes to the indent size require a > restart. Is it possible to make this restartless with the current command > structure? Out of cursioity, what was the rationale behind lowering the value from 4 to 2? Or was it dice roll? :p
Assignee | ||
Comment 4•10 years ago
|
||
Assignee: nobody → archaeopteryx
Attachment #8435214 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 5•10 years ago
|
||
Succesful Try run: https://tbpl.mozilla.org/?tree=Try&showall=1&rev=1596b60d74c2
Comment 6•10 years ago
|
||
(In reply to Eldmannen from comment #3) > (In reply to Archaeopteryx [:aryx] from comment #2) > > Created attachment 8435214 [details] [diff] [review] > > patch, v1 > > > > This patch makes jsb use devtools.editor.tabsize. The value has been lowered > > to 2 on trunk. With the patch applied, changes to the indent size require a > > restart. Is it possible to make this restartless with the current command > > structure? > > Out of cursioity, what was the rationale behind lowering the value from 4 to > 2? > Or was it dice roll? :p There are at least two coding style guides: https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style and https://github.com/mozilla/addon-sdk/wiki/Coding-style-guide Both state 2 space indentation. Both also prefer double-quotes for strings. Scratchpad [ Pretty Print ] however standardizes on single-quotes. I guess it makes sense when building a lot of verbatim HTML with attributes inside of JavaScript code.
Comment 7•10 years ago
|
||
We're talking about formatting code for the world in general. These choices reflect a quick and dirty study we did to see what the most common choices were.
Comment 8•10 years ago
|
||
(In reply to Joe Walker [:jwalker] from comment #7) > We're talking about formatting code for the world in general. These choices > reflect a quick and dirty study we did to see what the most common choices > were. Which choices, the 2 space indentation in jsb?
Comment 9•10 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/929a6d94fa24
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
Comment 10•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/929a6d94fa24
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 33
Updated•6 years ago
|
Product: Firefox → DevTools
Updated•6 years ago
|
Product: DevTools → DevTools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•