Closed Bug 1497727 Opened 4 years ago Closed 4 years ago

Add ability to add preferences in the new "about:config" page


(Toolkit :: Preferences, enhancement, P1)




Tracking Status
firefox64 --- wontfix
firefox65 --- fixed


(Reporter: Matthias, Assigned: vcote)


(Blocks 1 open bug)



(1 file)

types: boolean, int, string
Unresolved: what happens if the name of the "added" pref already exists?
Priority: P3 → P2
Given the end of the course is approaching fast, and we have to optimize our project quite strongly, here is a really low cost proposal for a minimum viable implementation of this bug.

As part of search results, if the preference name does not exist we offer one last row, in addition to the ones that may (or may not) be displayed for other value matches and substring matches. The row has what's been typed in the search box (trimmed of spaces, which is already the case for search) as the read-only preference name, and four link-buttons on the same row instead of the value:

  true  false  Number  String
Since these are the formal names of JavaScript values and types, these strings don't need to be localized. (We may want the localized string "Add as:" before the links to clarify.)

Clicking one of these four buttons creates the preference immediately and turns the row into a normal editable preference. Editing would follow the same code paths as other rows, so we don't have to write any additional code to create the preference after confirmation, or handle this specially in any other way.

What we lose here is the ability to add a String or Number preference without the value being "" or 0 for a very short time, but I'm not aware of any case where this could be an issue, and if we find one, we can still improve the interface after the Minimum Viable Product is completed.
Assignee: nobody → vincent.cote
Pushed by
Add ability to add prefs on new "about:config" page. r=paolo
Backed out for eslint failure on browser_edit.js:44


push with failure:

failure log:

[task 2018-11-28T21:46:42.378Z] + ./mach lint -l eslint -f treeherder --quiet
[task 2018-11-28T21:46:43.191Z] New python executable in /builds/worker/checkouts/gecko/obj-x86_64-pc-linux-gnu/_virtualenvs/init/bin/python2.7
[task 2018-11-28T21:46:43.191Z] Also creating executable in /builds/worker/checkouts/gecko/obj-x86_64-pc-linux-gnu/_virtualenvs/init/bin/python
[task 2018-11-28T21:46:45.169Z] Installing setuptools, pip, wheel...done.
[task 2018-11-28T21:46:46.383Z] running build_ext
[task 2018-11-28T21:46:46.383Z] building 'psutil._psutil_linux' extension
[task 2018-11-28T21:46:46.383Z] creating build
[task 2018-11-28T21:46:46.383Z] creating build/temp.linux-x86_64-2.7
[task 2018-11-28T21:46:46.383Z] creating build/temp.linux-x86_64-2.7/psutil
[task 2018-11-28T21:46:46.383Z] x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=543 -DPSUTIL_LINUX=1 -I/usr/include/python2.7 -c psutil/_psutil_common.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_common.o
[task 2018-11-28T21:46:46.383Z] x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=543 -DPSUTIL_LINUX=1 -I/usr/include/python2.7 -c psutil/_psutil_posix.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_posix.o
[task 2018-11-28T21:46:46.383Z] x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=543 -DPSUTIL_LINUX=1 -I/usr/include/python2.7 -c psutil/_psutil_linux.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_linux.o
[task 2018-11-28T21:46:46.384Z] creating build/lib.linux-x86_64-2.7
[task 2018-11-28T21:46:46.384Z] creating build/lib.linux-x86_64-2.7/psutil
[task 2018-11-28T21:46:46.384Z] x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/psutil/_psutil_common.o build/temp.linux-x86_64-2.7/psutil/_psutil_posix.o build/temp.linux-x86_64-2.7/psutil/_psutil_linux.o -o build/lib.linux-x86_64-2.7/psutil/
[task 2018-11-28T21:46:46.384Z] building 'psutil._psutil_posix' extension
[task 2018-11-28T21:46:46.384Z] x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=543 -DPSUTIL_LINUX=1 -I/usr/include/python2.7 -c psutil/_psutil_common.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_common.o
[task 2018-11-28T21:46:46.384Z] x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=543 -DPSUTIL_LINUX=1 -I/usr/include/python2.7 -c psutil/_psutil_posix.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_posix.o
[task 2018-11-28T21:46:46.384Z] x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/psutil/_psutil_common.o build/temp.linux-x86_64-2.7/psutil/_psutil_posix.o -o build/lib.linux-x86_64-2.7/psutil/
[task 2018-11-28T21:46:46.384Z] copying build/lib.linux-x86_64-2.7/psutil/ -> psutil
[task 2018-11-28T21:46:46.384Z] copying build/lib.linux-x86_64-2.7/psutil/ -> psutil
[task 2018-11-28T21:46:46.384Z] 
[task 2018-11-28T21:46:46.384Z] Error processing command. Ignoring because optional. (optional:packages.txt:comm/build/virtualenv_packages.txt)
[task 2018-11-28T21:52:15.657Z] TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/browser/components/aboutconfig/test/browser/browser_edit.js:44:41 | 'buttonSelector' is already declared in the upper scope. (no-shadow)
[task 2018-11-28T21:52:15.657Z] TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/browser/components/aboutconfig/test/browser/browser_edit.js:44:57 | 'expectedValue' is already declared in the upper scope. (no-shadow)
[taskcluster 2018-11-28 21:52:16.355Z] === Task Finished ===
[taskcluster 2018-11-28 21:52:16.355Z] Unsuccessful task run with exit code: 1 completed in 600.571 seconds
Flags: needinfo?(vincent.cote)
Flags: needinfo?(vincent.cote)
Pushed by
Add ability to add prefs on new "about:config" page. r=paolo CLOSED TREE
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Priority: P2 → P1
You need to log in before you can comment on or make changes to this bug.