Closed Bug 1884181 Opened 4 months ago Closed 4 months ago

Rework some of the backend code behind the search settings UI

Categories

(Firefox :: Settings UI, task, P1)

Desktop
All
task

Tracking

()

RESOLVED FIXED
125 Branch
Tracking Status
firefox125 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

Details

Attachments

(6 files)

In bug 1882577 I am trying to make SearchEngine.getIconURL an asynchronous function. I was having a problem with the settings UI because the code to handle the "Search Shortcuts" views and the default engine drop downs are spread across multiple classes which are all calling each other from different places. For example parts of the gSearchPanel class are updating EngineStore and then invalidating the tree view and rebuilding the drop-downs.

Whilst I don't want to do a full rewrite here (as we have potential plans for search preferences improvements later), I am reorganising the current code so that the EngineStore is responsible for keeping a list of engines, and the store then notifies the EngineView and a new DefaultEngineDropDown class about updates.

This should hopefully better organise it, so that if we rewrite/develop it further in future, it is clearer about which parts are doing what, and what they control.

Attachment #9390134 - Attachment description: Bug 1884181 - Make EngineStore._engines a private member. r?#preferences-reviewers! → Bug 1884181 - Make EngineStore._engines a public property, remove the setter/getter. r?#preferences-reviewers!
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6724b0519e5d
Change search preferences EngineStore and EngineView to be classes. r=settings-reviewers,mossop
https://hg.mozilla.org/integration/autoland/rev/6b36c62406cf
Avoid calling buildDefaultEngineDropDowns twice when opening preferences. r=settings-reviewers,mossop
https://hg.mozilla.org/integration/autoland/rev/79e47edc203a
Rename EngineStore._defaultEngines for better clarity. r=settings-reviewers,mossop
https://hg.mozilla.org/integration/autoland/rev/c5a447d0cc69
Move EngineStore/EngineView functions out of gSearchPane and into the relevant class. r=mconley
https://hg.mozilla.org/integration/autoland/rev/dfda94a7fe50
Make EngineStore._engines a public property, remove the setter/getter. r=settings-reviewers,mossop
https://hg.mozilla.org/integration/autoland/rev/6e3bf367feaf
Introduce a DefaultEngineDropDown class for search preferences and have EngineStore notify it and EngineView appropriately. r=settings-reviewers,mossop
Severity: -- → N/A
OS: Unspecified → All
Priority: -- → P1
Hardware: Unspecified → Desktop
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: