fune/browser/components/urlbar/docs
Drew Willcoxon 3545495040 Bug 1831971 - Remove zero-prefix functionality from the weather suggestion and don't start fetches until a config is set. r=daisuke
This fixes the bug by not starting fetches until a config is set from either
remote settings or Nimbus. By "config" I mean keywords basically, but we sync
more than keywords -- the min keyword length and min keyword length cap -- so
that's why I use different term. So, before remote settings is synced, no config
will be set, so no fetches will happen, so the suggestion will be null. When the
urlbar provider starts a query, it will see the suggestion is null and not add a
result. Once a config is set from RS or Nimbus, we'll start fetching.

Currently we allow zero prefix when keywords or the min keyword length aren't
set. This patch removes that functionality because on second thought, there's
not a safe and obvious way to support zero prefix using these keyword-related
config properties/variables by themselves, and zero prefix isn't a feature
requirement anymore anyway. If we wanted to keep supporting it with these
properties/variables, there are a few options, and I don't like any of them:

* If `keywords` is undefined or null, use zero prefix. This is dangerous because
  we may make a mistake in RS or Nimbus and forget to set it. Also, we use null
  as the default value for the Nimbus var, and since we use UrlbarPrefs to
  access Nimbus vars, there's no good way to tell whether null was set
  intentionally or not.
* If `keywords` is an empty array, use zero prefix. This is awkward because the
  user can now increment the min keyword length, which means the keywords array
  kept by `Weather` can become empty when the min keyword length is incremented
  a lot. In that case, no suggestion should be shown at all.
* If `min_keyword_length` is zero/falsey, use zero prefix. This has the same
  problems as the first point above.

If we do need to support zero prefix again in the future, I think we should add
an RS property/Nimbus variable that makes it clear what's happening, e.g., a
`useZeroPrefix` boolean.

I removed the exposure scalar because it's entirely based on zero prefix. We can
use Glean for that now anyway.

I also noticed weather suggestions are case insenstive, so I fixed that and
added a test task.

Differential Revision: https://phabricator.services.mozilla.com/D177448
2023-05-09 06:37:34 +00:00
..
assets
.rstcheck.cfg
contact.rst
debugging.rst
dynamic-result-types.rst Bug 1827762 - Replace UrlbarProvider.pickResult() and blockResult() with onEngagement() r=mak 2023-04-13 06:03:33 +00:00
experiments.rst Bug 1810702 - remove circular reference warnings r=firefox-source-docs-reviewers,sylvestre DONTBUILD 2023-02-17 12:38:03 +00:00
firefox-suggest-telemetry.rst Bug 1831971 - Remove zero-prefix functionality from the weather suggestion and don't start fetches until a config is set. r=daisuke 2023-05-09 06:37:34 +00:00
index.rst Bug 1765552 - Add ranking documentation to Address Bar source docs. r=mcheang 2023-02-22 18:08:47 +00:00
lifetime.rst Bug 1829880 - Fix broken links in search lifecycle docs and add the most up to date perma links. r=scunnane 2023-04-26 22:52:30 +00:00
nontechnical-overview.rst Bug 1810702 - remove circular reference warnings r=firefox-source-docs-reviewers,sylvestre DONTBUILD 2023-02-17 12:38:03 +00:00
overview.rst
preferences.rst
ranking.rst Bug 1818881 - Avoid polling for frecency recalcs. r=florian,daisuke 2023-02-28 12:57:19 +00:00
telemetry.rst Bug 1736939 - Re-add "Search history" item to history (sub) views from history and library buttons. r=dao,fluent-reviewers,flod 2023-04-27 14:32:46 +00:00
testing.rst Bug 1827596 - Fix UrlbarTestUtils reference link in 'Adress Bar/Testing' 2023-04-29 07:59:55 +00:00
UrlbarController.rst
UrlbarInput.rst
UrlbarView.rst
utilities.rst