Closed Bug 1472309 Opened 2 years ago Closed 2 years ago

Don't enable the 3 pane inspector by default on the browser toolbox

Categories

(DevTools :: Inspector, enhancement, P3)

enhancement

Tracking

(firefox63 fixed)

RESOLVED FIXED
Firefox 63
Tracking Status
firefox63 --- fixed

People

(Reporter: gl, Assigned: gl)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

No description provided.
The idea is to add a separate pref to control the inspector 3 pane mode for the browser toolbox (chrome). Typically, gecko developers are opening the browser toolbox in a split screen situation so their screen size is already less than ideal for the 3 pane mode which can take advantage of the full length of the screen.
Comment on attachment 8989021 [details]
Bug 1472309 - Don't enable the 3 pane inspector by default on the browser toolbox.

https://reviewboard.mozilla.org/r/254108/#review260900
Attachment #8989021 - Flags: review?(pbrosset) → review+
Weird, I made a comment on mozreview, but an error occurred and that comment is now lost. I'll try to recover it from mozreview.
Comment on attachment 8989021 [details]
Bug 1472309 - Don't enable the 3 pane inspector by default on the browser toolbox.

https://reviewboard.mozilla.org/r/254108/#review260904

::: devtools/client/inspector/inspector.js:693
(Diff revision 1)
> -    this.is3PaneModeEnabled = !this.is3PaneModeEnabled;
> -    Services.prefs.setBoolPref(THREE_PANE_ENABLED_PREF, this.is3PaneModeEnabled);
> +    if (this.target.chrome) {
> +      this._is3PaneModeChromeEnabled = !this._is3PaneModeChromeEnabled;
> +      Services.prefs.setBoolPref(THREE_PANE_CHROME_ENABLED_PREF,
> +        this._is3PaneModeChromeEnabled);
> +    } else {
> +      this._is3PaneModeEnabled = !this._is3PaneModeEnabled;
> +      Services.prefs.setBoolPref(THREE_PANE_ENABLED_PREF, this._is3PaneModeEnabled);
> +    }

Could you please move this code to a setter, next to the getter you created?

```
set is3PaneModeEnabled(value) {
  ...
}
```

And rewrite this function to:

```
async onSidebarToggle() {
  this.is3PaneModeEnabled = !this.is3PaneModeEnabled;
  await this.setupeToolbar();
  await this.addRuleView({ skipQueue: true });
}
```

The goal is to keep the complexity of reading the prefs and setting these private properties hidden away in the getter/setter pair.
Pushed by gabriel.luong@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ea033f144afe
Don't enable the 3 pane inspector by default on the browser toolbox. r=pbro
https://hg.mozilla.org/mozilla-central/rev/ea033f144afe
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
You need to log in before you can comment on or make changes to this bug.