Closed Bug 1335037 Opened 7 years ago Closed 7 years ago

options panel: add nightly only checkboxes to toggle new frontend (console & debugger)

Categories

(DevTools :: Framework, defect, P3)

53 Branch
defect

Tracking

(firefox54 fixed)

VERIFIED FIXED
Firefox 54
Tracking Status
firefox54 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

References

Details

Attachments

(2 files)

When working on the new debugger/console, I often find myself switching between the old and new versions of their frontends.

I have a local commit that adds two checkboxes to the devtools options panel to allow me to switch easily between old and new frontends. Thought it could be useful for others so I cleaned up the code a bit & added a guard to add the options in Nightly only.
Attached image nightly-checkboxes.png
jryans: not sure if that's something worth putting in the codebase, let me know what you think.
Flags: needinfo?(jryans)
Comment on attachment 8831698 [details]
Bug 1335037 - add options to toggle new frontend for console/debugger;

https://reviewboard.mozilla.org/r/108244/#review109362

Seems like a handy thing for development.

::: devtools/client/framework/toolbox-options.js:324
(Diff revision 1)
> +      pref: "devtools.debugger.new-debugger-frontend",
> +      label: "Enable new debugger frontend",
> +      id: "devtools-new-debugger"
> +    }];
> +
> +    let preferencesBox = this.panelDoc.getElementById("commonprefs-options");

Maybe "Advanced Settings" is a better place for it?  Or place them in the "Debugger" and "Web Console" sections?

"Common" seems like it's trying to be things that affect multiple tools.

::: devtools/client/framework/toolbox-options.js:353
(Diff revision 1)
> +  },
> +
> +  /**
> +   * Check if the current channel is nightly.
> +   */
> +  isNightlyChannel: function () {

I would suggest `AppConstants.NIGHTLY_BUILD`[1] for this purpose.  In DevTools code, you can also use the `devtools/shared/system` module[2] which exports them as `constants`.

Testing `AppConstants.MOZILLA_OFFICIAL` for false might be a good approach as well; it would imply "local builds only".

[1]: http://searchfox.org/mozilla-central/source/toolkit/modules/AppConstants.jsm#18
[2]: http://searchfox.org/mozilla-central/source/devtools/shared/system.js#344
Attachment #8831698 - Flags: review+
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Flags: needinfo?(jryans)
Priority: -- → P3
Comment on attachment 8831698 [details]
Bug 1335037 - add options to toggle new frontend for console/debugger;

https://reviewboard.mozilla.org/r/108244/#review109362

> Maybe "Advanced Settings" is a better place for it?  Or place them in the "Debugger" and "Web Console" sections?
> 
> "Common" seems like it's trying to be things that affect multiple tools.

Good point, moved them to their respective parent boxes. 
I guess that's where you would naturally look for such options.

> I would suggest `AppConstants.NIGHTLY_BUILD`[1] for this purpose.  In DevTools code, you can also use the `devtools/shared/system` module[2] which exports them as `constants`.
> 
> Testing `AppConstants.MOZILLA_OFFICIAL` for false might be a good approach as well; it would imply "local builds only".
> 
> [1]: http://searchfox.org/mozilla-central/source/toolkit/modules/AppConstants.jsm#18
> [2]: http://searchfox.org/mozilla-central/source/devtools/shared/system.js#344

Great! Used devtools/shared/system and still relying on NIGHTLY_BUILD. I think it can be helpful to have this outside of local builds.
mozreview lost one of my comments. So " thanks for the review! pushed to try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=5237ddda386acbb51882574e2de76c1ac6e4149f "
Try looks green. Landing.
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8867393b9e76
add options to toggle new frontend for console/debugger;r=jryans
https://hg.mozilla.org/mozilla-central/rev/8867393b9e76
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 54
I have reproduced this bug with Nightly 54.0a1 (2017-01-30) (64-bit) on ubuntu 16.10,64 Bit!

This bug's fix is verified with latest Nightly !

Build    ID : 20170301110155
User  Agent : Mozilla/5.0 (X11; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0

[bugday-20170301]
Status: RESOLVED → VERIFIED
Depends on: 1416704
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: