Commit Graph

237 Commits

Author SHA1 Message Date
iulian moraru
83b2199691 Revert "Bug 1907633 - Add ExperimentAPI.optInToExperiment API r=nalexander,nimbus-reviewers,relud,omc-reviewers,aminomancer" for causing bc failures on browser_about_studies.js.
This reverts commit d50af79d99.
2025-05-19 18:39:25 +00:00
Beth Rennie
d50af79d99 Bug 1907633 - Add ExperimentAPI.optInToExperiment API r=nalexander,nimbus-reviewers,relud,omc-reviewers,aminomancer
Instead of calling this function on the `RemoteSettingsExperimentLoader`
from `RemoteSettingsExperimentLoader.sys.mjs`, we instead provide the
public API on the `ExperimentAPI`, which will delegate to its current
`RemoteSettingsExperimentLoader`.

Differential Revision: https://phabricator.services.mozilla.com/D248073
2025-05-19 17:21:37 +00:00
Cristina Horotan
2da93f3a7e Revert "Bug 1907633 - Use ExperimentAPI._rsLoader in browser_asrouter_experimentsAPILoader.js r=omc-reviewers,aminomancer" for causing ESlint failure at browser_asrouter_experimentsAPILoader.js
This reverts commit a7c081f8f6.
2025-05-19 16:41:19 +00:00
Beth Rennie
a7c081f8f6 Bug 1907633 - Use ExperimentAPI._rsLoader in browser_asrouter_experimentsAPILoader.js r=omc-reviewers,aminomancer
Differential Revision: https://phabricator.services.mozilla.com/D249869
2025-05-19 16:00:16 +00:00
Beth Rennie
af2f7883a2 Bug 1950237 - Use ExperimentAPI.manager in browser/components/asrouter r=omc-reviewers,emcminn
As part of this bug, the global ExperimentManager will no longer be
exported from ExperimentManager.sys.mjs and will only be available as a
property on the ExperimentAPI.

Differential Revision: https://phabricator.services.mozilla.com/D249108
2025-05-14 06:41:59 +00:00
Meg Viar
ac61100a31 Bug 1964816 - Support Localization in Universal Infobars r=omc-reviewers,emcminn
Differential Revision: https://phabricator.services.mozilla.com/D248136
2025-05-13 14:15:51 +00:00
Beth Rennie
80ea752013 Bug 1959207 - Use GleanPing::TestSubmission in browser/components/asrouter r=omc-reviewers,emcminn
Differential Revision: https://phabricator.services.mozilla.com/D247505
2025-05-12 22:32:26 +00:00
Beth Rennie
25f1aa8bdb Bug 1963183 - Add buildId to ASRouterTargeting and Nimbus targeting context r=omc-reviewers,nimbus-reviewers,emcminn
Differential Revision: https://phabricator.services.mozilla.com/D246994
2025-05-06 22:08:17 +00:00
Daniel Thorn
bf9652f4ff Bug 1959483 - Port tests from ExperimentFakes and ExperimentTestUtils to NimbusTestUtils for browser/components/aboutwelcome and browser/components/asrouter r=nimbus-reviewers,omc-reviewers,beth,pdahiya
Differential Revision: https://phabricator.services.mozilla.com/D247004
2025-05-06 03:33:22 +00:00
Meg Viar
d42d78e05a Bug 1964116 - Update infobar schema to reflect that 'text' can be an array r=jprickett,omc-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D247646
2025-05-05 09:43:25 +00:00
Beth Rennie
313e2dd2b1 Bug 1961629 - Use ExperimentFeature.getEnrollmentMetadata() in browser/components/asrouter (again) r=omc-reviewers,aminomancer
Missed a few occurrences.

Differential Revision: https://phabricator.services.mozilla.com/D247473
2025-05-02 03:21:27 +00:00
Alexandru Marc
aca9e5c747 Revert "Bug 1961629 - Use ExperimentFeature.getEnrollmentMetadata() in browser/components/asrouter (again) r=omc-reviewers,aminomancer" for causing lint failures @ browser_asrouter_experimentsAPILoader.js
This reverts commit 061b82e9ad.
2025-05-02 02:47:17 +00:00
Beth Rennie
061b82e9ad Bug 1961629 - Use ExperimentFeature.getEnrollmentMetadata() in browser/components/asrouter (again) r=omc-reviewers,aminomancer
Missed a few occurrences.

Differential Revision: https://phabricator.services.mozilla.com/D247473
2025-05-02 02:14:51 +00:00
Reem H
29b06e65ba Bug 1949001 - Add OMC for inferred p13n card. r=home-newtab-reviewers,omc-reviewers,nbarrett,pdahiya
Differential Revision: https://phabricator.services.mozilla.com/D246376
2025-04-30 04:31:20 +00:00
Beth Rennie
85992a9d15 Bug 1961629 - Use ExperimentFeature.getEnrollmentMetadata() in browser/components/asrouter r=omc-reviewers,aminomancer
Differential Revision: https://phabricator.services.mozilla.com/D246149
2025-04-29 13:07:23 +00:00
Butkovits Atila
d5769ff5cb Backed out changeset 5591b71c7d59 (bug 1961629) for causing failures at browser_asrouter_toast_notification.js. 2025-04-29 15:45:16 +03:00
Beth Rennie
c8b5015aca Bug 1961629 - Use ExperimentFeature.getEnrollmentMetadata() in browser/components/asrouter r=omc-reviewers,aminomancer
Differential Revision: https://phabricator.services.mozilla.com/D246149
2025-04-29 11:28:57 +00:00
Meg Viar
81929eb72f Bug 1960078 - Add universal type to InfoBar to show notification across all current and new windows r=omc-reviewers,mimi
Differential Revision: https://phabricator.services.mozilla.com/D245309
2025-04-23 20:58:27 +00:00
negin
05fbc8e569 Bug 1930250 - Adds AppMenu configuration and styling for 'row' layout r=omc-reviewers,mconley,emcminn
Adds configuration for row layout design that we'd like to eventually rollout. See [figma](https://www.figma.com/design/qe9yX8x51jjbt6DJYgayg2/Device-Migration--Account-and-Multi-Device-Adoption-?node-id=8208-4895&m=dev)

{F19072665}

{F19072664}

{F19072663}

Differential Revision: https://phabricator.services.mozilla.com/D246145
2025-04-23 19:50:32 +00:00
Niklas Baumgardner
7276800327 Bug 1953884 - Eagerly create the profiles shared database. r=profiles-reviewers,mossop,jhirsch,firefox-desktop-core-reviewers ,omc-reviewers,emcminn
Differential Revision: https://phabricator.services.mozilla.com/D244621
2025-04-23 15:20:14 +00:00
Beth Rennie
39035fa485 Bug 1961036 - Remove ExperimentAPI.getExperiment r=relud,mconley,nimbus-reviewers,omc-reviewers,home-newtab-reviewers,aminomancer,chumphreys
All the callers of this function in tree can be replaced with
`get{Experiment,Rollout}MetaData`.

Differential Revision: https://phabricator.services.mozilla.com/D245985
2025-04-23 00:13:37 +00:00
Joel Maher
397e8ec3f4 Bug 1961608 - Green up macosx 15.30. r=aryx,necko-reviewers,extension-reviewers,media-playback-reviewers,credential-management-reviewers,sync-reviewers,anti-tracking-reviewers,sessionstore-reviewers,places-reviewers,omc-reviewers,profiles-reviewers,pdahiya,alwu,jhirsch,mtigley,skhamis,timhuang,valentin,robwu,nsharpley
Differential Revision: https://phabricator.services.mozilla.com/D246100
2025-04-22 18:12:28 +00:00
Meg Viar
3651f417fc Bug 1961230 - Allow for plain text after infobar links with optional spacing before and after r=omc-reviewers,jprickett
We want to be able to create the appears of links being embedded in the content text of an infobar.

Differential Revision: https://phabricator.services.mozilla.com/D245969
2025-04-22 14:05:36 +00:00
pstanciu
c17bdcd640 Backed out changeset 118838e56e20 (bug 1961230) for causing failures on browser_asrouter_infobar.js CLOSED TREE 2025-04-22 16:43:03 +03:00
Meg Viar
685be9e86c Bug 1961230 - Allow for plain text after infobar links with optional spacing before and after r=omc-reviewers,jprickett
We want to be able to create the appears of links being embedded in the content text of an infobar.

Differential Revision: https://phabricator.services.mozilla.com/D245969
2025-04-22 12:34:24 +00:00
Beth Rennie
4981fe1c19 Bug 1957515 - Merge ExperimentFakes and ExperimentTestUtils r=nimbus-reviewers,emcminn,omc-reviewers
All the (relevant) methods of ExperimentFakes and ExperimentTestUtils
are now defined on a new object called NimbusTestUtils. For convenience,
the old aliases still work, but they will be removed in a future bug.

There are also some new goodies, like
`NimbusTestUtils.assert.storeIsEmpty`, which is a port of a method from
our head.js files, and `NimbusTestUtils.removeStore`. This does require
you to give NimbusTestUtils access to the test scope (via
`NimbusTestUtils.init(this)`), but it lets us do actual assertions
instead of just throwing errors.

Nimbus' browser and xpcshell tests have been updated to use these new
helpers by replacing the internals of `assertEmptyStore` in each head.js
file with calls to them. They will be cleaned up to remove the wrapper
in a follow-up.

Additionally, `NimbusTestUtils.factories.recipe` will now return a
recipe that will *always* enroll. `ExperimentFakes.recipe` returns a
recipe that would only enroll 10% of the time and most tests that were
using `ExperimentFakes.recipe` were replacing that `bucketConfig` with
one that guaranteed enrollment. Existing callers do not have to change
until we migrate everything to `NimbusTestUtils`.

Differential Revision: https://phabricator.services.mozilla.com/D244960
2025-04-14 19:40:51 +00:00
Jason Prickett
8b6faaef37 Bug 1953834 - Add profile group id to asrouter targeting r=omc-reviewers,mviar
Differential Revision: https://phabricator.services.mozilla.com/D244229
2025-04-14 18:01:54 +00:00
Gijs Kruitbosch
75052d346a Bug 1958070 - move DefaultBrowserCheck to its own file, r=omc-reviewers,firefox-desktop-core-reviewers ,mossop,hanna_a
Differential Revision: https://phabricator.services.mozilla.com/D244422
2025-04-14 14:04:33 +00:00
Meg Viar
0c85630592 Bug 1958972 - Add dismissable property configurable for infobars r=reusable-components-reviewers,omc-reviewers,emcminn,hanna_a,hjones
Differential Revision: https://phabricator.services.mozilla.com/D244668
2025-04-09 14:22:08 +00:00
Beth Rennie
149d1a110f Bug 1955169 - Simplify recording of enrollment status telemetry r=omc-reviewers,nimbus-reviewers,aminomancer,chumphreys,application-update-reviewers,nalexander
Previously we were recording enrollment status telemetry everywhere we
were calling into `enroll` and `_unenroll` from onRecipe and
`updateEnrollment`. Now we record the enrollment status telemetry from
inside `NimbusTelemetry.recordEnrollment` and
`NimbusTelemetry.recordUnenrollment`, so that the enrollment status
telemetry is recorded from *every* enrollment event, not just during
`RemoteSettingsExperimentLoader.updateRecipes()`.

To help with this, a new helper has been added, `UnenrollmentCause`,
which carries all the metadata required to unenroll from an experiment
(similar how `CheckRecipeResult` carries all the metadata for enrollment
and updating enrollment) and to submit the corresponding telemetry. Now
instead of calling `unenroll()` with a reason string, you must call it
with an object returned from one of the `UenrollmentCause` utilities.
All tests that were calling `unenroll()` with a string like
"test" or "cleanup" have been updated to remove the reason string. When
it is not present, the `UnenrollmentCause` will default to an "unknown"
reason, which is good enough for test cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D243212
2025-04-06 01:02:21 +00:00
Shane Hughes
68848bd409 Bug 1931454 - Allow feature callouts to have multiple screens without requiring a tour pref. r=omc-reviewers,mviar
This adds a new `advance_screens` pseudo-action to the `feature_callout`
messaging system template, which can be added to any action in the same
way `navigate` is used currently. This should generally be used instead
of `navigate`, which only advances the inner content but not the outer
wrapper, the anchor, the page event listeners, and other state relevant
for panel callouts.

Some callouts want to show even if the `cfr.features` pref is disabled,
such as surveys and important onboarding messages, and hard-coding that
check in FeatureCallout is heavy-handed as we already have better ways
to do it. Most callouts belong to the `cfr` group, which locks them
behind the features pref. Any that can't use groups, like the PDF
annotations callouts, can check the pref directly in their targeting.

Aside from blocking messages that don't want to be blocked by that pref,
it also results in a weird behavior where, if the pref changes while the
callout is still open (pretty unlikely), the callout will hide when you
click "next" instead of advancing to the next screen. If you clicked the
Next button, it should show you the next screen, even if you somehow
blocked the message by pref before clicking.

So it's cleaner to just let ASRouter handle that in the targeting phase.
If the pref changes while a message is showing, then we'll just leave it
open, and it won't apply until targeting is checked.

It's appropriate to make the change here, because this patch adds a new
screen advancement scheme, separate from the tour pref system. Since
we're reproducing the advancement logic, we're forced to decide whether
to reproduce the feature pref check in this new scheme. I realized 99%
of the time it's doing nothing, and in the rare cases where it does have
an effect that differs from the regular pref targeting, it's a negative
effect. And at that point, we might as well rip the bandaid off all at
once, to keep everything consistent.

Additionally, while adding documentation for this new feature, I also
corrected some existing errors in the documentation.

Differential Revision: https://phabricator.services.mozilla.com/D229084
2025-04-04 08:27:57 +00:00
Butkovits Atila
aeba1d05c8 Backed out 5 changesets (bug 1955169) for causing failures at test_nimbusTelemetry.js. CLOSED TREE
Backed out changeset c4164da0418a (bug 1955169)
Backed out changeset aec590ec0dcc (bug 1955169)
Backed out changeset 527cbe48536b (bug 1955169)
Backed out changeset dec22291ce40 (bug 1955169)
Backed out changeset 7523c66cf741 (bug 1955169)
2025-04-02 23:07:11 +03:00
Beth Rennie
884ce25bd3 Bug 1955169 - Simplify recording of enrollment status telemetry r=omc-reviewers,nimbus-reviewers,aminomancer,chumphreys,application-update-reviewers,nalexander
Previously we were recording enrollment status telemetry everywhere we
were calling into `enroll` and `_unenroll` from onRecipe and
`updateEnrollment`. Now we record the enrollment status telemetry from
inside `NimbusTelemetry.recordEnrollment` and
`NimbusTelemetry.recordUnenrollment`, so that the enrollment status
telemetry is recorded from *every* enrollment event, not just during
`RemoteSettingsExperimentLoader.updateRecipes()`.

To help with this, a new helper has been added, `UnenrollmentCause`,
which carries all the metadata required to unenroll from an experiment
(similar how `CheckRecipeResult` carries all the metadata for enrollment
and updating enrollment) and to submit the corresponding telemetry. Now
instead of calling `unenroll()` with a reason string, you must call it
with an object returned from one of the `UenrollmentCause` utilities.
All tests that were calling `unenroll()` with a string like
"test" or "cleanup" have been updated to remove the reason string. When
it is not present, the `UnenrollmentCause` will default to an "unknown"
reason, which is good enough for test cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D243212
2025-04-02 17:08:23 +00:00
Joel Maher
34dc8fc793 Bug 1957450 - cleanup chrome.toml files to remove old conditions and standardize remaining conditions. r=aryx,devtools-reviewers,fxview-reviewers,profiler-reviewers,omc-reviewers,migration-reviewers,backup-reviewers,julienw,nchevobbe,mconley,pdahiya,nsharpley
Differential Revision: https://phabricator.services.mozilla.com/D243709
2025-04-01 21:16:45 +00:00
Cosmin Sabou
76d33e1b6c Backed out 5 changesets (bug 1955169) for causing xpcshell failures on test_RemoteSettingsExperimentLoader_updateRecipes. CLOSED TREE
Backed out changeset 2260624d1529 (bug 1955169)
Backed out changeset 6f249fd9c97e (bug 1955169)
Backed out changeset 04666fa6a9a4 (bug 1955169)
Backed out changeset 6c18b6e1178a (bug 1955169)
Backed out changeset 669a93c90421 (bug 1955169)
2025-03-31 22:51:10 +03:00
Beth Rennie
f0fb022626 Bug 1955169 - Simplify recording of enrollment status telemetry r=omc-reviewers,nimbus-reviewers,aminomancer,chumphreys,application-update-reviewers,nalexander
Previously we were recording enrollment status telemetry everywhere we
were calling into `enroll` and `_unenroll` from onRecipe and
`updateEnrollment`. Now we record the enrollment status telemetry from
inside `NimbusTelemetry.recordEnrollment` and
`NimbusTelemetry.recordUnenrollment`, so that the enrollment status
telemetry is recorded from *every* enrollment event, not just during
`RemoteSettingsExperimentLoader.updateRecipes()`.

To help with this, a new helper has been added, `UnenrollmentCause`,
which carries all the metadata required to unenroll from an experiment
(similar how `CheckRecipeResult` carries all the metadata for enrollment
and updating enrollment) and to submit the corresponding telemetry. Now
instead of calling `unenroll()` with a reason string, you must call it
with an object returned from one of the `UenrollmentCause` utilities.
All tests that were calling `unenroll()` with a string like
"test" or "cleanup" have been updated to remove the reason string. When
it is not present, the `UnenrollmentCause` will default to an "unknown"
reason, which is good enough for test cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D243212
2025-03-31 18:54:05 +00:00
Goloman Adrian
642c75059d Backed out 5 changesets (bug 1955169) for causing xpc failures @test_ExperimentManager_enroll.js.
Backed out changeset a07069ddb118 (bug 1955169)
Backed out changeset c717d831bbc4 (bug 1955169)
Backed out changeset 32059aa54193 (bug 1955169)
Backed out changeset ac2b71a2ef17 (bug 1955169)
Backed out changeset 64ae848c4a2b (bug 1955169)
2025-03-28 00:07:39 +02:00
Beth Rennie
245c8b795e Bug 1955169 - Simplify recording of enrollment status telemetry r=omc-reviewers,nimbus-reviewers,aminomancer,chumphreys
Previously we were recording enrollment status telemetry everywhere we
were calling into `enroll` and `_unenroll` from onRecipe and
`updateEnrollment`. Now we record the enrollment status telemetry from
inside `NimbusTelemetry.recordEnrollment` and
`NimbusTelemetry.recordUnenrollment`, so that the enrollment status
telemetry is recorded from *every* enrollment event, not just during
`RemoteSettingsExperimentLoader.updateRecipes()`.

To help with this, a new helper has been added, `UnenrollmentCause`,
which carries all the metadata required to unenroll from an experiment
(similar how `CheckRecipeResult` carries all the metadata for enrollment
and updating enrollment) and to submit the corresponding telemetry. Now
instead of calling `unenroll()` with a reason string, you must call it
with an object returned from one of the `UenrollmentCause` utilities.
All tests that were calling `unenroll()` with a string like
"test" or "cleanup" have been updated to remove the reason string. When
it is not present, the `UnenrollmentCause` will default to an "unknown"
reason, which is good enough for test cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D243212
2025-03-27 20:22:21 +00:00
Florian Quèze
2ea57560fd Bug 1950710 - Migrate histograms to use Glean APIs for MS_MESSAGE_REQUEST_TIME_MS, r=chutten,omc-reviewers,mviar.
Differential Revision: https://phabricator.services.mozilla.com/D242518
2025-03-26 14:41:10 +00:00
Jason Prickett
9e27050c4b Bug 1955715 - update addonsInfo asrouter targeting to include if user has installed addons r=omc-reviewers,mviar
Differential Revision: https://phabricator.services.mozilla.com/D242819
2025-03-25 18:21:07 +00:00
Nathan Barrett
3df69e20a2 Bug 1951426 - Request messages from OMC in newtab r=home-newtab-reviewers,omc-reviewers,mconley,aminomancer,maxx
Differential Revision: https://phabricator.services.mozilla.com/D240175
2025-03-25 14:34:05 +00:00
Stanca Serban
92c3bbb32a Backed out 4 changesets (bug 1954848, bug 1951426, bug 1951782, bug 1953632) for causing xpcshell failures in test_NewTabMessaging.js. CLOSED TREE
Backed out changeset b2ee50813323 (bug 1954848)
Backed out changeset 211563f87799 (bug 1953632)
Backed out changeset 5003a2a06685 (bug 1951782)
Backed out changeset 4a882623c86d (bug 1951426)
2025-03-24 20:46:17 +02:00
Nathan Barrett
84c498dc3b Bug 1951426 - Request messages from OMC in newtab r=home-newtab-reviewers,omc-reviewers,mconley,aminomancer,maxx
Differential Revision: https://phabricator.services.mozilla.com/D240175
2025-03-24 17:42:04 +00:00
Beth Rennie
ab06202815 Bug 1953530 - Move most Nimbus telemetry code into a single module r=nimbus-reviewers,chumphreys,omc-reviewers,aminomancer
This patch does not change the targeting context telemetry as it is
sufficiently complicated and isolated from the rest of the telemetry.

Differential Revision: https://phabricator.services.mozilla.com/D241325
2025-03-21 17:53:20 +00:00
Goloman Adrian
ac2cd44a24 Backed out 4 changesets (bug 1953632, bug 1951782, bug 1951426, bug 1954848) for causing build bustages. CLOSED TREE
Backed out changeset 6825e2911771 (bug 1954848)
Backed out changeset 56f68e9e9ab5 (bug 1953632)
Backed out changeset bda4413155d7 (bug 1951782)
Backed out changeset 04623acb0ff2 (bug 1951426)
2025-03-21 20:38:15 +02:00
Nathan Barrett
3957775da8 Bug 1951426 - Request messages from OMC in newtab r=home-newtab-reviewers,omc-reviewers,mconley,aminomancer
Differential Revision: https://phabricator.services.mozilla.com/D240175
2025-03-21 15:26:34 +00:00
Stanca Serban
81fcbe2dae Backed out 2 changesets (bug 1953530) for causing mochitests failures in browser_asrouter_experimentsAPILoader.js.
Backed out changeset 40e98c849875 (bug 1953530)
Backed out changeset fc38ba906d3f (bug 1953530)
2025-03-21 03:44:47 +02:00
Beth Rennie
af8fe3e1c9 Bug 1953530 - Move most Nimbus telemetry code into a single module r=nimbus-reviewers,chumphreys,omc-reviewers,aminomancer
This patch does not change the targeting context telemetry as it is
sufficiently complicated and isolated from the rest of the telemetry.

Differential Revision: https://phabricator.services.mozilla.com/D241325
2025-03-20 16:21:40 +00:00
Stanca Serban
4380403c09 Backed out 4 changesets (bug 1951426, bug 1954848, bug 1953632, bug 1951782) for causing Node tests failures. CLOSED TREE
Backed out changeset 2a8c811ce373 (bug 1954848)
Backed out changeset 04b8c4b9620a (bug 1953632)
Backed out changeset b51759b5f846 (bug 1951782)
Backed out changeset fc971f683077 (bug 1951426)
2025-03-20 23:36:40 +02:00
Nathan Barrett
9e01a2ba3e Bug 1951426 - Request messages from OMC in newtab r=home-newtab-reviewers,omc-reviewers,mconley,aminomancer
Differential Revision: https://phabricator.services.mozilla.com/D240175
2025-03-20 14:12:21 +00:00