Closed
Bug 1045333
Opened 10 years ago
Closed 10 years ago
Refactor toolbox.toggleSplitConsole
Categories
(DevTools :: Console, defect, P3)
DevTools
Console
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 34
People
(Reporter: bgrins, Assigned: bgrins)
References
Details
Attachments
(1 file, 2 obsolete files)
4.31 KB,
patch
|
bgrins
:
review+
|
Details | Diff | Splinter Review |
As mentioned in Comments 11-13 in bug 974550, we could simplify the code used inside of toolbox.open by refactoring the toggleSplitConsole function into openSplitConsole/closeSplitConsole/toggleSplitConsole
Updated•10 years ago
|
Priority: -- → P3
Assignee | ||
Comment 1•10 years ago
|
||
What do you think?
Comment 2•10 years ago
|
||
Comment on attachment 8463956 [details] [diff] [review]
split-console-refactor.patch
Review of attachment 8463956 [details] [diff] [review]:
-----------------------------------------------------------------
::: browser/devtools/framework/toolbox.js
@@ +227,5 @@
> get splitConsole() {
> return this._splitConsole;
> },
>
> + set splitConsole(value) {
Can't we inline this, or at the very least make it clear that it doesn't actually split the console? It's slightly less DRY to inline, but would be fewer lines overall!
@@ +982,5 @@
> */
> + openSplitConsole: function() {
> + this.splitConsole = true;
> + this._refreshConsoleDisplay();
> + this.emit("split-console");
I know this is a change, but shouldn't we be doing this inside the then() below?
Attachment #8463956 -
Flags: review?(jwalker) → review+
Assignee | ||
Comment 3•10 years ago
|
||
(In reply to Joe Walker [:jwalker] from comment #2)
> Comment on attachment 8463956 [details] [diff] [review]
> split-console-refactor.patch
>
> Review of attachment 8463956 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: browser/devtools/framework/toolbox.js
> @@ +227,5 @@
> > get splitConsole() {
> > return this._splitConsole;
> > },
> >
> > + set splitConsole(value) {
>
> Can't we inline this, or at the very least make it clear that it doesn't
> actually split the console? It's slightly less DRY to inline, but would be
> fewer lines overall!
Yes, moving the functionality directly into openSplitConsole/closeSplitConsole.
> @@ +982,5 @@
> > */
> > + openSplitConsole: function() {
> > + this.splitConsole = true;
> > + this._refreshConsoleDisplay();
> > + this.emit("split-console");
>
> I know this is a change, but shouldn't we be doing this inside the then()
> below?
Yeah, makes sense.. this is only used for tests so pushed to try: https://tbpl.mozilla.org/?tree=Try&rev=3e19dc74f3a1
Assignee | ||
Comment 4•10 years ago
|
||
Address comment 2
Attachment #8463956 -
Attachment is obsolete: true
Attachment #8463977 -
Flags: review+
Assignee | ||
Comment 5•10 years ago
|
||
Moved the emitted event back to after the call to refreshConsoleDisplay() for tests. Pushed to try: https://tbpl.mozilla.org/?tree=Try&rev=fa1cc76dd784
Attachment #8463977 -
Attachment is obsolete: true
Attachment #8464165 -
Flags: review+
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 6•10 years ago
|
||
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
Comment 7•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 34
Updated•10 years ago
|
QA Whiteboard: [qa-]
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•