Commit Graph

267 Commits

Author SHA1 Message Date
Scott
73a592ea16 Bug 1767445 - Pocket newtab topics widget r=gvn
Differential Revision: https://phabricator.services.mozilla.com/D146327
2022-05-20 22:04:46 +00:00
Daisuke Akatsuka
bafe7ed902 Bug 1769585: Introduce Nimbus variables for autoFillAdaptiveHistoryMinCharsThreshold and autoFillAdaptiveHistoryMinCharsThreshold. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D146757
2022-05-19 05:57:34 +00:00
Travis Long
b9fc17fbde Bug 1754527 - Nimbus should call the Glean Experiment API r=chutten,barret
Differential Revision: https://phabricator.services.mozilla.com/D145911
2022-05-17 13:51:55 +00:00
Daisuke Akatsuka
5815da5816 Bug 1597791: Introduce autoFillAdaptiveHistory nimbus variable. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D145704
2022-05-13 22:46:37 +00:00
Barret Rennie
3feb5137d8 Bug 1768727 - Add a test to ensure Nimbus feature schemas stay backwards compatible r=emcminn
The new test ensures we do not have any occurrances of `additionalProperties:
false` in any Nimbus Feature schemas.

Differential Revision: https://phabricator.services.mozilla.com/D146029
2022-05-12 21:39:18 +00:00
Punam Dahiya
74fd8b3a3e Bug 1765907 - PBM experiment message should override default promo message r=mviar
Differential Revision: https://phabricator.services.mozilla.com/D144871
2022-05-12 18:24:06 +00:00
criss
9c35b9b500 Backed out 2 changesets (bug 1754527) for turning Bug 1760130 into permafail on windows. CLOSED TREE
Backed out changeset 24ae57f9c2bb (bug 1754527)
Backed out changeset 93e08f7a934a (bug 1754527)
2022-05-11 23:12:05 +03:00
Travis Long
6e32825e20 Bug 1754527 - Adds test coverage for Glean experiment API to browser_remotesettingsexperimentloader_remote_default.js r=barret
Differential Revision: https://phabricator.services.mozilla.com/D145965
2022-05-10 23:19:16 +00:00
Travis Long
f417f3c0fe Bug 1754527 - Nimbus should call the Glean Experiment API r=chutten,barret
Differential Revision: https://phabricator.services.mozilla.com/D145911
2022-05-10 23:19:16 +00:00
Cristian Tuns
9a2ed99397 Backed out changeset eb12cdc5d1e8 (bug 1765907) for causing mochitest failures on browser_privatebrowsing_focus_promo.js CLOSED TREE 2022-05-10 14:38:02 -04:00
Punam Dahiya
daed30958c Bug 1765907 - PBM experiment message should override default promo message r=mviar
Differential Revision: https://phabricator.services.mozilla.com/D144871
2022-05-10 17:12:05 +00:00
Mathieu Leplatre
9c4746ef13 Bug 1767890 - Prevent packaged dump from being loaded r=robwu
Change tests and snippets in documentation to use `Date.now()` instead of an arbitrary number like `42`.
This way, we make sure the packaged dump isn't loaded on top of the tests data. Indeed, since Bug 1718083 we load the packaged dump if it's newer than local data.

Differential Revision: https://phabricator.services.mozilla.com/D145579
2022-05-10 09:51:50 +00:00
Scott
6aed734d01 Bug 1767443 - Pocket newtab save to Pocket button directly to signup r=gvn,nanj
Differential Revision: https://phabricator.services.mozilla.com/D145367
2022-05-04 17:33:19 +00:00
Drew Willcoxon
cdbec00b8a Bug 1765595 - Add a Nimbus variable to load Firefox Suggest suggestions with a different type on RS. r=nanj
This adds a new `quickSuggestRemoteSettingsDataType` Nimbus variable whose value
will be used as the `type` filter when fetching data from remote settings.

Differential Revision: https://phabricator.services.mozilla.com/D145266
2022-05-03 18:23:56 +00:00
Paul Zuehlcke
b6463ae82d Bug 1766401 - Add a tcpByDefault Nimbus feature to enable TCP in phase 2. r=timhuang,Mardak
Differential Revision: https://phabricator.services.mozilla.com/D144718
2022-04-27 10:35:51 +00:00
Barret Rennie
dbc15cde24 Bug 1766092 - Provide URIs and paths to feature schemas r=emcminn
Differential Revision: https://phabricator.services.mozilla.com/D144505
2022-04-25 18:34:03 +00:00
Drew Willcoxon
25265384ed Bug 1761055 - Implement support for blocking usual non-best-match Firefox Suggest suggestions. r=daisuke
This revision does the following:

* Add a new Nimbus variable `quickSuggestBlockingEnabled` with a fallback pref
  to show the block button on the usual non-best-match quick suggest rows.
* Previously we supported the block button only on best match rows. This keeps
  that, and it also adds a Nimbus variable `bestMatchBlockingEnabled` for it.
  We only had a pref for it.
* Change the name of the `browser.urlbar.quickSuggest.blockedDigests` pref to
  `browser.urlbar.quicksuggest.blockedDigests` -- i.e., "quicksuggest" should be
  in all lowercase, not camel case, since that's what all quick suggest prefs
  use. We don't need to worry about a pref migration because blocking has never
  been enabled.
* When setting the `browser.urlbar.quicksuggest.blockedDigests` pref, ignore the
  resulting `onPrefChanged()` listener call. I do this by keeping a new
  `_updatingBlockedDigests` property, similar to `_updatingImpressionStats`
  added in D142152.
* Copy the browser_quicksuggest_bestMatch.js test to a new
  browser_quicksuggest_block.js test that is specifically for testing blocking.
  The new test checks both usual quick suggest rows and best matches.

Depends on D142780

Differential Revision: https://phabricator.services.mozilla.com/D143246
2022-04-13 21:12:10 +00:00
Barret Rennie
3384f9c880 Bug 1754220 - Update ASRouter messages when force-enrolling in an experiment r=dmose
Differential Revision: https://phabricator.services.mozilla.com/D142240
2022-04-13 15:56:21 +00:00
Drew Willcoxon
84ad0ab1aa Bug 1761052 - Implement remotely configurable frequency capping for Suggest suggestions. r=daisuke,nanj
This implements Suggest impression frequency capping. Capping is performed
separately for sponsored and non-sponsored suggestions. Capping is not
per-suggestion; it's per type of suggestion, either sponsored or non-sponsored.
Capping can be enabled separately for each type. It's disabled by default for
both types with Nimbus variables for each.

Caps are specified in the quick suggest config in remote settings. There are two
kinds of caps: interval and lifetime. Multiple overlapping caps are supported,
for example a per-hour cap, a per-day cap, and a lifetime cap.

The user's impression stats are kept locally and stored in a pref. A "stats
object" corresponding to each cap interval is kept. Each stats object keeps
track of its corresponding cap's interval, the date at which the current
interval period started, and the impression count during the current interval
period. (For the lifetime cap, the interval in the stats object is Infinity.)

Each time a suggestion impression is recorded, the counters in all the
suggestion type's stats objects are incremented. Once a counter for any stats
object is reached, we stop showing that type of suggestion.

When the interval of a stats object has elapsed, its counter is reset. In this
revision, we check for elapsed intervals each time a suggestion is shown. In the
future when we add telemetry in bug 1761058, we will need to record telemetry
events for intervals where caps were not hit, so we may need to do this check
more often (for example near the beginning of `startQuery()`) or even do it on a
repeating timer.

There's some slightly complicated logic for handling changes in the cap config
since it's likely to change over time as we experiment with it (see
`_validateImpressionStats()`).

This revision also makes a few minor improvements unrelated to the bug.

Differential Revision: https://phabricator.services.mozilla.com/D142152
2022-04-07 17:37:05 +00:00
Cosmin Sabou
cc005b99cd Backed out changeset 253a415f7be7 (bug 1754220) for causing ASRouter related newtab failures. CLOSED TREE 2022-04-07 02:14:49 +03:00
Barret Rennie
080900b8aa Bug 1754220 - Update ASRouter messages when force-enrolling in an experiment r=dmose
Differential Revision: https://phabricator.services.mozilla.com/D142240
2022-04-06 22:34:24 +00:00
Barret Rennie
c1e132a0a3 Bug 1759039 - Replace Ajv with JsonSchema.jsm in toolkit/components/nimbus/test r=emcminn
Differential Revision: https://phabricator.services.mozilla.com/D142876
2022-04-06 17:07:34 +00:00
Barret Rennie
cde3bd47ef Bug 1759039 - Port NimbusTestUtils.jsm to JsonSchema.jsm r=emcminn
Differential Revision: https://phabricator.services.mozilla.com/D142875
2022-04-06 17:07:34 +00:00
Barret Rennie
beb6bd1845 Bug 1762495 - Expose JsonSchema object from JsonSchema.jsm r=emcminn
Differential Revision: https://phabricator.services.mozilla.com/D142874
2022-04-06 17:07:34 +00:00
Barret Rennie
2160cfe2a5 Bug 1762947 - Validate all branches when using variables-only features r=emcminn
Differential Revision: https://phabricator.services.mozilla.com/D142863
2022-04-04 18:26:03 +00:00
Daisuke Akatsuka
1ff3d6fecc Bug 1761171: Introduce experimentType nimbus variable. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D142032
2022-03-31 00:34:33 +00:00
Daisuke Akatsuka
385e9b83da Bug 1760596: Implement new opt-in dialog design for 100-b. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D141835
2022-03-31 00:34:32 +00:00
Gijs Kruitbosch
edda40141b Bug 1753696 - Automatic rewrite: replace add_task(setup with add_setup in browser mochitest, r=Standard8,webcompat-reviewers,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D141437
2022-03-30 16:16:42 +00:00
Norisz Fay
e1d7571cc8 Backed out 2 changesets (bug 1753696) for causing multiple dt and bc failures CLOSED TREE
Backed out changeset 67fd9edfbcea (bug 1753696)
Backed out changeset a9d957ea887b (bug 1753696)
2022-03-30 12:17:55 +03:00
Gijs Kruitbosch
1214ac636b Bug 1753696 - Automatic rewrite: replace add_task(setup with add_setup in browser mochitest, r=Standard8,webcompat-reviewers,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D141437
2022-03-30 08:18:51 +00:00
Nick Alexander
d20c0ed4b1 Bug 1761504 - Add setDefaultPDFHandlerOnlyReplaceBrowsers Nimbus feature. r=bhearsum
When enabled, this feature restricts the existing
`setDefaultPDFHandler` Nimbus feature to only set Firefox as the
default PDF handler when the existing handler is a known browser.

Depends on D142147

Differential Revision: https://phabricator.services.mozilla.com/D142148
2022-03-29 03:57:00 +00:00
Barret Rennie
ace0a315bf Bug 1761105 - Validate Nimbus features using variables instead of schemas r=emcminn
Not all features are complicated enough to require full on JSON schema to
describe their variables. For these simpler features, we generate (a lax) JSON
schema based on the contents of their `variables` field to validate them. This
way we can re-use the existing validation mechanism and do not have to write a
bespoke validator.

The schema generated is intended to be compatible with the one generated by
Experimenter.

Differential Revision: https://phabricator.services.mozilla.com/D141892
2022-03-28 16:14:05 +00:00
Barret Rennie
8bdc00cfed Bug 1757611 - Report invalid branch and invalid recipe as reasons for unenrollment r=emcminn
Differential Revision: https://phabricator.services.mozilla.com/D139974
2022-03-25 00:01:22 +00:00
Barret Rennie
48e7fe21b4 Bug 1755610 - Validate nimbus experiments via JSON schema r=andreio
Differential Revision: https://phabricator.services.mozilla.com/D138930
2022-03-25 00:01:21 +00:00
Barret Rennie
6e0406c0f8 Bug 1752665 - Validate experiment features where we have schemas r=andreio
A test that tested featureless experiments has been removed, as the experiment
schema dictates that one of `feature` or `features` is required.

Tests have been updated to match the in-tree schema, as they previously did not
validate.

Differential Revision: https://phabricator.services.mozilla.com/D138928
2022-03-25 00:01:21 +00:00
Barret Rennie
4b7bfcd266 Bug 1752665 - Expose feature schemas as resource:// URIs r=andreio
Differential Revision: https://phabricator.services.mozilla.com/D138925
2022-03-25 00:01:20 +00:00
Barret Rennie
62bcac7009 Bug 1757778 - Update NimbusEnrollment schema based off updated NimbusExperiment schema r=emcminn
The result of ExperimentFakes.recipe() has been updated to match the updated schema.

Some unit tests have been updated to pass with the updated schema.

Differential Revision: https://phabricator.services.mozilla.com/D140760
2022-03-25 00:01:19 +00:00
Barret Rennie
40d5bf2674 Bug 1757778 - Import NimbusExperiment schema from @mozilla/nimbus-shared r=emcminn
Differential Revision: https://phabricator.services.mozilla.com/D140759
2022-03-25 00:01:19 +00:00
Barret Rennie
fe4e32dcf7 Bug 1757778 - Expose Nimbus schemas as resource:// URIs r=andreio
Differential Revision: https://phabricator.services.mozilla.com/D138929
2022-03-25 00:01:19 +00:00
Chris Peterson
48c3026a89 Bug 1731523 - Part 2: Remove "Firefox 100" Nimbus experiment code. r=necko-reviewers,kershaw
This Nimbus experiment code was added in bug 1719070 to test if sending a "Firefox 100" UA string causes any major webcompat problems.

The moz.build change was added in bug 1724635 to fix a Thunderbird build break. MOZ_BUILD_APP_IS_BROWSER = true when building Firefox, false when building Thunderbird.

Differential Revision: https://phabricator.services.mozilla.com/D126408
2022-03-17 02:18:12 +00:00
Drew Willcoxon
fcde7d9006 Bug 1752953 - Part 3: Don't update the Firefox Suggest scenario unnecessarily. r=daisuke
This modifies the Nimbus update observer in UrlbarPrefs so that it does not
update the Firefox Suggest scenario unnecessarily. The scenario and the prefs
related to the scenario only need to be updated when either of these happens:

* A relevant Nimbus variable changes
* The current default-branch value of a relevant pref is incorrect for the
  intended scenario

Currently, any time a pref changes that is declared as a fallback pref for a
Nimbus urlbar variable, we end up updating the scenario all over again even if
it was some totally unrelated variable like `bestMatchEnabled`.

We have very good test coverage for scenario updates, so I'm confident that this
revision works properly and that we can catch regressions when we modify related
code in the future.

While working on this, I found that the `quickSuggestNonSponsoredEnabled` was
accidentally removed by D130159 (https://hg.mozilla.org/mozilla-central/rev/ccda4432cdc4d7180a9304e05b52f046616bbf2b)
so I added it back. We haven't used this variable in any experiments or rollouts
so it was never a problem.

Differential Revision: https://phabricator.services.mozilla.com/D140425
2022-03-11 18:28:27 +00:00
Drew Willcoxon
4d6fc07db4 Bug 1757658 - Record Nimbus exposure event for best match. r=nanj,k88hudson
This modifies the Nimbus exposure event logic for users in the
`firefox-suggest-best-match` experiment so that the event is recorded the first
time a best match is shown (or would have been shown). For all other users,
there's no change: The event is recorded the first time a Suggest suggestion is
shown.

Depends on D139452, D139576

Differential Revision: https://phabricator.services.mozilla.com/D139995
2022-03-03 16:16:52 +00:00
Greg Tatum
80525762c6 Bug 1755519 - Add language switching to about:welcome; r=pdahiya,platform-i18n-reviewers,flod,dminor
This patch ended up adding some complexity to about:welcome, as the
language switching needs to eagerly perform fallible asynchronous
actions. Specifically it needs to get the list of addons and
pre-emptively install the langpack, which can take time, and can fail.

This necessitated building a custom React components and custom hooks to
be able to deal with these requirements.

The following command will allow for the testing of this feature.

./mach run \
  --temp-profile \
  --setpref "extensions.getAddons.langpacks.url=https://mock-amo-language-tools.glitch.me/?app=firefox&type=language&appversion=%VERSION%" \
  --setpref "intl.multilingual.aboutWelcome.languageMismatchEnabled=true" \
  --setpref "intl.multilingual.aboutWelcome.systemLocaleOverride=es-ES" `#(optional)` \
  -- --new-tab about:welcome

Differential Revision: https://phabricator.services.mozilla.com/D138831
2022-03-02 15:52:43 +00:00
Iulian Moraru
5d89a24073 Backed out 2 changesets (bug 1755519) for causing node test failures (About:welcome bundle out of date). CLOSED TREE
Backed out changeset 67e6561012ad (bug 1755519)
Backed out changeset 873d83eaa24e (bug 1755519)
2022-03-02 17:08:47 +02:00
Greg Tatum
efdc727635 Bug 1755519 - Add language switching to about:welcome; r=pdahiya,platform-i18n-reviewers,flod,dminor
This patch ended up adding some complexity to about:welcome, as the
language switching needs to eagerly perform fallible asynchronous
actions. Specifically it needs to get the list of addons and
pre-emptively install the langpack, which can take time, and can fail.

This necessitated building a custom React components and custom hooks to
be able to deal with these requirements.

The following command will allow for the testing of this feature.

./mach run \
  --temp-profile \
  --setpref "extensions.getAddons.langpacks.url=https://mock-amo-language-tools.glitch.me/?app=firefox&type=language&appversion=%VERSION%" \
  --setpref "intl.multilingual.aboutWelcome.languageMismatchEnabled=true" \
  --setpref "intl.multilingual.aboutWelcome.systemLocaleOverride=es-ES" `#(optional)` \
  -- --new-tab about:welcome

Differential Revision: https://phabricator.services.mozilla.com/D138831
2022-03-02 13:54:17 +00:00
Scott
52aad4c16a Bug 1746016 - Save to Pocket refresh home panel. r=gvn,fluent-reviewers,mconley,andreio,flod,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D137708
2022-02-23 21:12:49 +00:00
Iulian Moraru
d4b79ca7ce Backed out changeset 7cea02651ac2 (bug 1746016) for causing assertion failures on bc jobs. CLOSED TREE 2022-02-18 00:37:58 +02:00
Scott
dea2ee209a Bug 1746016 - Save to Pocket refresh home panel. r=gvn,fluent-reviewers,mconley,andreio,flod
Differential Revision: https://phabricator.services.mozilla.com/D137708
2022-02-17 19:00:07 +00:00
Drew Willcoxon
9514099caf Bug 1755057 - Part 1: Create a feature gate/flag for the best match feature. r=daisuke
This revision involves two prefs:

`browser.urlbar.bestMatch.enabled`

Currently this pref corresponds to the user's choice of whether to enable best
matches. This revision changes its meaning so that it's now the gate for the
whole best match feature. If it's false, then the best match preferences UI will
not appear and best matches will not appear in the urlbar. If it's true, then
the preferences UI will appear, and the second pref below controls whether best
matches will appear in the urlbar.

`browser.urlbar.suggest.bestmatch`

This new pref takes on the old meaning of the first pref: It corresponds to
whether the user has enabled best matches.

With these two prefs, we have a similar setup to the quick suggest prefs: one
pref for the whole feature, `quickSuggest.enabled`, and another pref for whether
quick suggest results will appear in the urlbar -- actually two prefs since
there are two kinds of quick suggest results, `suggest.quicksuggest.sponsored`
and `suggest.quicksuggest.nonsponsored`.

Also, Product says best match should be enabled by default (see
"design/interaction notes" at the bottom of [this Figma](https://www.figma.com/file/seJ2ZA4v3FgoV7jCxUR74B/Firefox-Suggest?node-id=6011%3A7701)),
so I set the default value of `browser.urlbar.suggest.bestmatch` to true, which
means it will be enabled by default when the feature gate is enabled.

Part 2 of this bug will update the preferences UI.

Differential Revision: https://phabricator.services.mozilla.com/D138583
2022-02-17 01:52:25 +00:00
Scott
a010b7ccee Bug 1755011 - Adding Pocket newtab interest profile prefs to Nimbus manifest. r=gvn
Differential Revision: https://phabricator.services.mozilla.com/D138552
2022-02-14 18:59:51 +00:00