Add support for modal button to config-based settings and apply to Fonts section
Categories
(Firefox :: Settings UI, enhancement)
Tracking
()
People
(Reporter: mstriemer, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [recomp])
Enhance the config-based settings system with support for buttons that open dialogs for complex input (e.g., font selection).
The Fonts section currently uses a modal for font preview and selection, making it an ideal first adopter of this feature.
Many of the modals are simple and just require the path to the modal source file as an argument, or some simple features
options for gSubDialog
. Ideally we can manage these directly from the config without any JS.
Browser languages example (Searchfox)
{
l10nId: "browser-languages-button",
control: "modal",
controlConfig: {
path: "chrome://browser/content/preferences/dialogs/languages.xhtml"
}
}
Simple options to gSubDialog
should also be supported, Camera permissions example (Searchfox)
{
l10nId: "camera-permission-button",
control: "modal",
controlConfig: {
path: "chrome://browser/content/preferences/dialogs/sitePermissions.xhtml",
features: "resizable=yes",
params: [{ permissionType: "camera" }]
}
}
Advanced configuration with closingCallback
, closedCallback
and dynamic params
will likely be through a Setting
's getControlConfig
hook and be done in a follow up task. This could also be done here, or instead of the entirely config-based approach, but many modals do not require dynamic options so having config-based support will be beneficial.
Acceptance Criteria:
- Config supports
control: "modal"
components with options defined in the config - Fonts section is updated to use the config-based setting for its Advanced... button
** Bug 1965046 should be completed first so the selects can be updated too - Tests for config-based modal button
Updated•9 days ago
|
Description
•