Closed Bug 1965058 Opened 11 months ago Closed 8 months ago

Add support for modal button to config-based settings

Categories

(Firefox :: Settings UI, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
143 Branch
Tracking Status
firefox142 --- wontfix
firefox143 --- fixed

People

(Reporter: mstriemer, Assigned: mstriemer)

References

(Blocks 1 open bug)

Details

(Whiteboard: [recomp])

Attachments

(2 files)

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
Blocks: 1971621
Blocks: 1972365
Summary: Add support for modal button to config-based settings and apply to Fonts section → Add support for modal button to config-based settings
Assignee: nobody → mstriemer
Attachment #9499053 - Attachment description: WIP: Bug 1965058 - Part 1: Basic dialog-button for opening Settings dialogs r?#recomp-reviewers,#settings-reviewers → Bug 1965058 - Part 1: Basic dialog-button for opening Settings dialogs r?#recomp-reviewers,#settings-reviewers
Status: NEW → ASSIGNED
Attachment #9499055 - Attachment description: WIP: Bug 1965058 - Part 2: Disable moz-button if it's parentDisabled r?#recom-reviewers → Bug 1965058 - Part 2: Disable moz-button if it's parentDisabled r?#recomp-reviewers
Pushed by mkennedy@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/abbc4ac1a6f3 https://hg.mozilla.org/integration/autoland/rev/9d116f88a321 Part 2: Disable moz-button if it's parentDisabled r=reusable-components-reviewers,hjones
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 142 Branch
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Reopening the bug as not all the associated patches have been approved yet.

Keywords: leave-open
Pushed by akulyk@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/58f4d0b1a7dc https://hg.mozilla.org/integration/autoland/rev/59690b4d1c94 Part 1: Basic dialog-button for opening Settings dialogs r=reusable-components-reviewers,settings-reviewers,desktop-theme-reviewers,mconley,hjones
Blocks: 1979130

Just filed bug 1979130 to add the tests

Status: REOPENED → RESOLVED
Closed: 8 months ago8 months ago
Keywords: leave-open
Resolution: --- → FIXED
Target Milestone: 142 Branch → 143 Branch
QA Whiteboard: [qa-triage-done-c144/b143]
Blocks: 2022592
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: