Commit graph

59 commits

Author SHA1 Message Date
Mark Banner
a8cac9a70a Bug 1816939 - Use search engine ids rather than objects for updating the list in preferences. r=settings-reviewers,Gijs
Comparing objects may be unreliable, using search engine ids are guarenteed to be unique.

Differential Revision: https://phabricator.services.mozilla.com/D170209
2023-02-20 13:36:41 +00:00
Mark Banner
2e0f639886 Bug 1781768 - When live language switching ensure that search engines installed via add-ons also update. r=search-reviewers,settings-reviewers,mconley,daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D168279
2023-02-02 11:38:28 +00:00
James Teow
d8d5267819 Bug 1800851 - showSearchTerms checkbox should listen to search bar changes - r=adw,settings-reviewers
While trying to simplify the test code prior to landing the initial preference
panel update, I removed some checks in the test that ensured the checkbox
was actually being checked if the user enabled the search bar while the search
panel was opened. Hence how the tests passed despite the fact that I neglected
to include a listener.

Differential Revision: https://phabricator.services.mozilla.com/D162583
2022-11-22 18:20:22 +00:00
James Teow
47fe7cb3f9 Bug 1779470 - Part 2: Add show search terms in url bar feature to about:preferences#search - r=adw,flod
See https://www.figma.com/file/Ock0cYjzi7I1GmcctqOr9K/Search-settings-updates?node-id=2%3A112 for mockup.

Depends on D159462

Differential Revision: https://phabricator.services.mozilla.com/D155866
2022-11-05 02:13:29 +00:00
mcheang
007d64c7fd Bug 1786324 - Change SearchService to reference engines by Ids rather than names. r=Standard8
An id is created for every new instance of SearchEngine. The new
getEngineById method should be called to return an engine rather than
calling getEngineByName.

Differential Revision: https://phabricator.services.mozilla.com/D155236
2022-11-02 12:17:38 +00:00
Mark Banner
c0b3131dd9 Bug 1634555 - Send event telemetry for search default engine changes. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D157471
2022-09-28 09:40:36 +00:00
Mark Banner
ef27351558 Bug 1786899 - Remove unused BrowserSearch.loadAddEngines and remove formatURL. r=jteow,preferences-reviewers
formatURL is only used in one other place - nsContextMenu.js, so we don't really need that when we can call the necessary function direct.

Also moves `searchEnginesURL` into SearchUIUtils, as that seems a reasonable place to start storing things like that.

Differential Revision: https://phabricator.services.mozilla.com/D155496
2022-08-26 07:55:44 +00:00
mcheang
bb14bd56d3 Bug 1777278 - Change all references of originalEngine to appDefaultEngine in search. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D150599
2022-06-30 19:26:20 +00:00
Michael Kohler
beec44fed6 Bug 1761513 - Remove Engine(about:preferences#search) should be disabled for current Default Engine r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D148389
2022-06-30 11:44:30 +00:00
Mike Kaply
20954ef27a Bug 1499095 - Remove engines hidden by policy after restoring defaults. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D142888
2022-04-12 14:58:45 +00:00
Greg Tatum
c2f751983d Bug 1758730 - Ensure no errors or warning show on search engine prefs; r=Standard8
The live language reloading triggers code that will run that assumes the view
is visible, when in fact it may not be on the dom. This fixes that. In addition
it fixes the error where the engine tries to update after it has been removed.

Differential Revision: https://phabricator.services.mozilla.com/D141685
2022-03-28 19:08:49 +00:00
Greg Tatum
521ea00689 Bug 1758730 - Reload search preferences UI on live language switch; r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D141684
2022-03-28 19:08:48 +00:00
Greg Tatum
1a3d3e3c15 Bug 1758730 - Slightly refactor search engine code; r=Standard8
This is to minimize the upcoming code diff fixing live language switching
for this code.

Differential Revision: https://phabricator.services.mozilla.com/D141683
2022-03-28 19:08:48 +00:00
Gijs Kruitbosch
3b0145da09 Bug 1294999 - put module getters in preferences.js and de-duplicate them, r=jaws,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D132529
2021-12-01 16:35:25 +00:00
Drew Willcoxon
571fe4ac33 Bug 1728430 - Part 2: Update the Firefox Suggest preferences UI. r=mak
This implements the spec in https://mozilla-hub.atlassian.net/browse/SNT-26, but
Natalie and I have made some tweaks over Slack that aren't reflected in that
ticket.

We want to move the Firefox Suggest preferences from the Search pane to the
Address Bar section of the Privacy pane. There are now two Firefox Suggest
checkboxes instead of one: a main one that enables Firefox Suggest suggestions
and another one that enables sponsored suggestions separately. If the main one
is checked but the sponsored one isn't, then the user will see only
non-sponsored suggestions.

I renamed and modified the browser_searchQuickSuggest.js test I added in
D105701, but a lot of the test changed and it's probably not helpful to look at
the diff against the old version.

Previously strings were hardcoded in search.js. I've added the new ones to the
new preview Fluent file for Firefox Suggest.

Depends on D124300

Differential Revision: https://phabricator.services.mozilla.com/D124431
2021-09-06 18:56:11 +00:00
Harry Twyford
93961ec313 Bug 1717509 - Part 1 - Hook up UrlbarProviderPlaces and fix various lint issues. r=adw,preferences-reviewers
UnifiedComplete must stick around to serve as an mozIPlacesAutoComplete implementation for XUL consumers like search.js and privacy.js.

Differential Revision: https://phabricator.services.mozilla.com/D119306
2021-07-09 23:52:37 +00:00
Nan Jiang
1fb559ba1d Bug 1714344 - Replace the deprecated Nimbus.url.getValue calls r=adw,andreio,preferences-reviewers,jaws
Differential Revision: https://phabricator.services.mozilla.com/D116724
2021-06-03 23:19:56 +00:00
Andrei Oprea
ba84870a14 Bug 1699701 - Convert all usages of ExperimentFeature to singleton API r=k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D110284
2021-04-09 14:13:13 +00:00
Sebastian Hengst
ebd583fd80 Backed out changeset d402c8657d3f (bug 1699701) for failing newtab's activity-stream:AboutPreferences Feed and more. CLOSED TREE 2021-04-09 15:35:48 +02:00
Andrei Oprea
c7084aa8a7 Bug 1699701 - Convert all usages of ExperimentFeature to singleton API r=k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D110284
2021-04-09 12:49:00 +00:00
Andrei Oprea
4b3335c6fd Bug 1694472 - Update UrlbarPrefs to use ExperimentFeature r=k88hudson,mak
Differential Revision: https://phabricator.services.mozilla.com/D106269
2021-03-23 10:26:26 +00:00
Mark Banner
8e66f61a53 Bug 1690114 - When a search engine changes properly update the default and the tree in preferences. r=preferences-reviewers,Gijs
Prior to this patch we would only update the icons.

Depends on D107668

Differential Revision: https://phabricator.services.mozilla.com/D107669
2021-03-10 08:48:05 +00:00
Drew Willcoxon
14eefa1933 Bug 1693671 - Update the Quick Suggest help URL. r=daleharvey,Gijs
We're going with a SUMO page after all and not a blog URL.

Depends on D106940

Differential Revision: https://phabricator.services.mozilla.com/D107012
2021-03-03 00:48:01 +00:00
Drew Willcoxon
da79f59395 Bug 1693927 - Record keyed scalar telemetry for impressions and clicks on Quick Suggest results. r=harry,nanj
This adds three new keyed scalars:

* `contextual.services.quicksuggest.impression`: Incremented when a Quick
  Suggest result is shown in an address bar engagement where the user picks any
  result.
* `contextual.services.quicksuggest.click`: Incremented when the user picks a
  Quick Suggest result (not including the help button).
* `contextual.services.quicksuggest.help``: Incremented when the user picks the
  onboarding help button in a Quick Suggest result.

The changes to telemetry.rst and Scalars.yaml have more details.

I modified `TelemetryEvent.typeFromElement()` to return `"help"` for clicks on
the help button so that the quick suggest provider can tell whether the main
part of the result was picked or the help button. I left `"tiphelp"` for tip
help buttons in case anything depends on that.

Depends on D106060

Differential Revision: https://phabricator.services.mozilla.com/D106173
2021-02-25 06:21:30 +00:00
Csoregi Natalia
bfcf41eb69 Backed out 2 changesets (bug 1693927, bug 1693126) as requested. CLOSED TREE
Backed out changeset f49147a4544b (bug 1693126)
Backed out changeset 8bb5bc9c97b2 (bug 1693927)
2021-02-25 05:08:26 +02:00
Drew Willcoxon
da5fd2c2bb Bug 1693927 - Record keyed scalar telemetry for impressions and clicks on Quick Suggest results. r=harry,nanj
This adds three new keyed scalars:

* `contextual.services.quicksuggest.impression`: Incremented when a Quick
  Suggest result is shown in an address bar engagement where the user picks any
  result.
* `contextual.services.quicksuggest.click`: Incremented when the user picks a
  Quick Suggest result (not including the help button).
* `contextual.services.quicksuggest.help``: Incremented when the user picks the
  onboarding help button in a Quick Suggest result.

The changes to telemetry.rst and Scalars.yaml have more details.

I modified `TelemetryEvent.typeFromElement()` to return `"help"` for clicks on
the help button so that the quick suggest provider can tell whether the main
part of the result was picked or the help button. I left `"tiphelp"` for tip
help buttons in case anything depends on that.

Depends on D106060

Differential Revision: https://phabricator.services.mozilla.com/D106173
2021-02-25 02:52:04 +00:00
Drew Willcoxon
1c90b59add Bug 1693123 - Add a checkbox to the Search Suggestions preferences UI that allows Quick Suggest to be toggled. r=Gijs
This is an unusual revision, but it adds a checkbox to the Search Suggestions
section of the Search pane for the urlbar Quick Suggest experiment, which is
en-US only. The checkbox is hidden by default and it's only shown if the
`browser.urlbar.quicksuggest.enabled` pref, which controls the experiment, is
true. Because this is an experiment and it's en-US only, I've hardcoded some
strings. Bug 1692518 has info on the experiment, and bug 1693345 has a
discussion about hardcoding strings.

The checkbox controls the new pref `browser.urlbar.suggest.quicksuggest`. It's
similar to the other existing `browser.urlbar.suggest.*` prefs.

There's a learn-more link but we don't know the final URL yet, so I'm using
mozilla.org. There's a TODO with a bug number.

We also want to change the Search Suggestions description when the experiment is
enabled. I've hardcoded that new string, too.

The test is pretty thorough and I started writing it before the new prefs
landed, so it doesn't assume the prefs exist or which branch they're on.

Differential Revision: https://phabricator.services.mozilla.com/D105701
2021-02-22 23:08:12 +00:00
Drew Willcoxon
75c1e7b412 Bug 1688786 - Add a browser.urlbar.showSearchSuggestionsFirst pref. r=mak,preferences-reviewers
Introduce a new `browser.urlbar.showSearchSuggestionsFirst` boolean pref that
determines whether search suggestions are shown before general results.

This keeps the `matchBuckets` pref. I could have removed it since the only thing
we're using it for right now is to tell whether suggestions are shown first. The
reason I didn't remove it is because ultimately we do want a `matchBuckets` or
`resultBuckets` pref so we can experiment with different results compositions
using simple pref-flip studies. Hopefully bug 1676469 will land soon and we'll
replace `matchBuckets` with `resultBuckets`, but in the meantime I think we
should keep `matchBuckets` around.

This also removes some `browser.urlbar.matchBuckets` assignments in tests that
don't actually depend on it. For tests that do depend on it, I changed them so
they set `showSearchSuggestionsFirst` now.

Differential Revision: https://phabricator.services.mozilla.com/D103137
2021-01-28 23:23:16 +00:00
Mark Banner
c4afa9e9ad Bug 1687235 - Enable ESLint rule no-setter-return for browser/. r=mossop,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D102152
2021-01-26 13:42:38 +00:00
Brindusan Cristian
70ab748bed Backed out 5 changesets (bug 1687235) for mochitest failures at test_menulist_null_value.xhtml. CLOSED TREE
Backed out changeset 638c802ca1d1 (bug 1687235)
Backed out changeset ec830b771bce (bug 1687235)
Backed out changeset a7c933ddecfd (bug 1687235)
Backed out changeset c36493fb0599 (bug 1687235)
Backed out changeset 6eb33ad5d460 (bug 1687235)
2021-01-26 10:58:43 +02:00
Mark Banner
c793c1efb7 Bug 1687235 - Enable ESLint rule no-setter-return for browser/. r=mossop,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D102152
2021-01-25 22:27:19 +00:00
Drew Willcoxon
592367f39a Bug 1681818 - In the search preferences UI, fix tree view problems that arise when engines are removed and restored due to the local shortcuts being present. r=mak
The problem is that a few sites assume that `lastIndex` is the index of the last
engine in the tree, but since bug 1657790 landed, `lastIndex` is now the index
of the last local shortcut.

Differential Revision: https://phabricator.services.mozilla.com/D100299
2020-12-23 00:58:51 +00:00
amy churchwell
6ab686c965 Bug 1646128 - Renamed SearchService.getDefaultEngines to SearchService.getAppProvidedEngines. r=harry
Differential Revision: https://phabricator.services.mozilla.com/D99941
2020-12-17 20:54:57 +00:00
Butkovits Atila
44a10edcec Backed out changeset d5111a57ad25 (bug 1646128) for failure on browser_engines.js. 2020-12-17 19:04:40 +02:00
amy churchwell
5c25f14b90 Bug 1646128 - Renamed SearchService.getDefaultEngines to SearchService.getAppProvidedEngines. r=harry
Differential Revision: https://phabricator.services.mozilla.com/D99941
2020-12-17 14:40:05 +00:00
Drew Willcoxon
d58a7b553e Bug 1678770 - Have the local search shortcut rows in the preferences UI show their restriction characters as keywords. r=mak
Depends on D97376

Differential Revision: https://phabricator.services.mozilla.com/D97830
2020-11-21 10:55:28 +00:00
Drew Willcoxon
e6cc468b9a Bug 1657790 - Allow local search mode buttons to be toggled separately from engines. r=mak,ntim
* Add prefs for each local search shortcut
* Remove the `update2.localOneOffs` pref since it's not necessary with the three
  new prefs
* Modify preferences UI by adding a new row in the engines tree for each local
  shortcut
* Add `UrlbarUtils.LOCAL_SEARCH_MODES` so we have a single place where local
  search modes and their properties are defined
* Add a new test file for the preferences UI
* Modify browser_oneOffs.js to test the three new preferences

Differential Revision: https://phabricator.services.mozilla.com/D97376
2020-11-20 22:35:08 +00:00
Mark Banner
0f7fd2907d Bug 1625963 - Remove the warning for the default search engine being 'controlled' by an extension as it isn't useful for users. r=jaws,fluent-reviewers,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D94863
2020-10-29 03:18:32 +00:00
pbz
2a72e0a43c Bug 1661030 - Refactor SubDialog and TabDialogBox to support passing multiple window arguments. r=Gijs,preferences-reviewers
This also updates the behavior of the allowDuplicates check:
Instead of only checking if the top dialog is a duplicate, it will now check the whole stack and
skip the dialog open if a duplicate URL is found.
This fixes an issue where callers could alternate between dialogs to bypass the check.

Differential Revision: https://phabricator.services.mozilla.com/D88422
2020-09-02 14:24:47 +00:00
Dale Harvey
0161b92374 Bug 1658713 - Show internal aliases in about:preferences r=preferences-reviewers,harry,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D87922
2020-08-28 08:41:48 +00:00
Dale Harvey
6b98a54c44 Bug 1106626 - Add ability for the user to define custom search engines r=preferences-reviewers,fluent-reviewers,jaws,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D86987
2020-08-26 19:33:41 +00:00
Mark Banner
ff5c602cf4 Bug 1654246 - When cloning search engines for preferences, clone the hidden property as well to ensure restore default engines works correctly. r=daleharvey,preferences-reviewers,ntim
Differential Revision: https://phabricator.services.mozilla.com/D84520
2020-07-23 12:04:04 +00:00
Mark Banner
64d5a32916 Bug 1647359 - Preferences should only clone the parts of the search engine objects that it actually needs. r=jaws,preferences-reviewers
The clones appear to be so that access for the tree view in preferences is quick. However, they don't need to clone the entire engine object - they just need three fields.

Additionally, this fixes reloading icons which was attempting to use 'uri' but that isn't defined, and so icons would fail to load if preferences was opened when a search engine is added.

Differential Revision: https://phabricator.services.mozilla.com/D80496
2020-06-30 07:45:30 +00:00
Csoregi Natalia
5b4873516d Backed out 4 changesets (bug 1647320, bug 1647359) for failures on /test_json_cache.js. CLOSED TREE
Backed out changeset fdf086cfd0f9 (bug 1647359)
Backed out changeset b39278706c66 (bug 1647359)
Backed out changeset 65c58515f2cb (bug 1647359)
Backed out changeset 7ebc3ec422ec (bug 1647320)
2020-06-29 21:54:32 +03:00
Mark Banner
39b66db125 Bug 1647359 - Preferences should only clone the parts of the search engine objects that it actually needs. r=jaws,preferences-reviewers
The clones appear to be so that access for the tree view in preferences is quick. However, they don't need to clone the entire engine object - they just need three fields.

Additionally, this fixes reloading icons which was attempting to use 'uri' but that isn't defined, and so icons would fail to load if preferences was opened when a search engine is added.

Differential Revision: https://phabricator.services.mozilla.com/D80496
2020-06-29 16:38:42 +00:00
Tim Nguyen
efcd5a4bff Bug 1201243 - Make browser/components/preferences/in-content top-level and move dialogs to a subdirectory. r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D72038
2020-04-22 23:35:08 +00:00
Jared Wein
70099b93ec Bug 1140495 - Remove support for windowed preferences. r=ttaubert
--HG--
extra : rebase_source : 2b29244f4813593171b436f551735dfcc13d6474
2015-09-02 12:12:55 -04:00
Marco Bonardo
c45dc2da62 Bug 1094844 - Use new keywords API in search service. r=jaws 2015-04-16 10:56:34 +02:00
Abdelrhman Ahmed
8be160ee49 Bug 1122493 - reset alias to prevent reappear keywords when restoring default search engines. r=Florian 2015-02-10 12:46:15 +01:00
Abdelrhman Ahmed
ae31705321 Bug 1113681 - Prevent dragging search engines from the checkboxes. r=Florian 2015-01-28 22:39:00 +01:00