Open
Bug 1965485
Opened 14 days ago
Updated 14 days ago
Preferences.addSetting should register dependent prefs if necessary
Categories
(Firefox :: Settings UI, enhancement)
Firefox
Settings UI
Tracking
()
NEW
People
(Reporter: mstriemer, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [recomp])
When registering a Setting
that depends on a pref with Preferences.addSetting({ id, pref })
it is required that the pref already be registered through Preferences.add()
or Preferences.addAll()
with its id
and type
. We can infer the type
from the database however, so this should not be required
An example of detecting a pref's type from devtools: Searchfox
Acceptance criteria:
- When a setting is created with a
pref
key, that pref will be registered with an auto-detected type usingPreferences.add({ id: pref, type: detectedType })
if it isn't already registered - Testing that the auto-detection and registration works
- I believe this could cause problems if the pref doesn't have a default value, some settings specific testing that all auto-detected types have defaults could be wise (maybe just log + throw in the setup code when
Cu.isInAutomation
?)
Updated•14 days ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•