Closed
Bug 1121700
Opened 6 years ago
Closed 6 years ago
Create an OptionsView helper for devtools panels
Categories
(DevTools :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 38
People
(Reporter: jsantell, Assigned: jsantell)
References
Details
Attachments
(1 file, 1 obsolete file)
14.10 KB,
patch
|
jsantell
:
review+
|
Details | Diff | Splinter Review |
A helper to keep preference values in sync with a dropdown menu. For use with web audio editor (bug 1023462) and new perf tool (bug 1102350). Debugger options could be converted to use this as well (and would update the checkboxes when updated from elsewhere)
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → jsantell
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•6 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=c4c73b229eeb
Attachment #8549188 -
Flags: review?(vporof)
Comment 2•6 years ago
|
||
Comment on attachment 8549188 [details] [diff] [review] 1121700-options-view.patch Review of attachment 8549188 [details] [diff] [review]: ----------------------------------------------------------------- This is beautiful. ::: browser/devtools/shared/options-view.js @@ +9,5 @@ > + * OptionsView constructor. Takes several options, all required: > + * - branchName: The name of the prefs branch, like "devtools.debugger." > + * - window: The window the XUL elements live in. > + * - menupopup: The XUL `menupopup` item that contains the pref buttons. > + * Nit: whitespace.
Attachment #8549188 -
Flags: review?(vporof) → review+
Comment 3•6 years ago
|
||
Comment on attachment 8549188 [details] [diff] [review] 1121700-options-view.patch Review of attachment 8549188 [details] [diff] [review]: ----------------------------------------------------------------- ::: browser/devtools/shared/options-view.js @@ +46,5 @@ > + this.mutationObserver = new MutationObserver(this._onOptionChange); > + let observerConfig = { attributes: true, attributeFilter: ["checked"]}; > + > + // Sets observers and default options for all options > + Array.forEach(this.$$("menuitem", this.menupopup), $el => { nit: a for-of loop would be shorter here : for (let $el of this.$$("menuitem",this.menupopup)) {
Assignee | ||
Comment 4•6 years ago
|
||
Nits fixed
Attachment #8549188 -
Attachment is obsolete: true
Attachment #8549864 -
Flags: review+
Assignee | ||
Updated•6 years ago
|
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/09b5d7e43b60
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 38
Updated•3 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•