forked from mirrors/gecko-dev
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 |
||
|---|---|---|
| .. | ||
| assets | ||
| .rstcheck.cfg | ||
| contact.rst | ||
| debugging.rst | ||
| dynamic-result-types.rst | ||
| experiments.rst | ||
| firefox-suggest-telemetry.rst | ||
| index.rst | ||
| lifetime.rst | ||
| nontechnical-overview.rst | ||
| overview.rst | ||
| preferences.rst | ||
| ranking.rst | ||
| telemetry.rst | ||
| testing.rst | ||
| UrlbarController.rst | ||
| UrlbarInput.rst | ||
| UrlbarView.rst | ||
| utilities.rst | ||