Commit Graph

311 Commits

Author SHA1 Message Date
Mark Banner
9ecec1531f Bug 1800319 - Change newtab code so that the ESLint rule no-console is an error, except for console.error calls. r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D161942
2022-11-13 21:02:41 +00:00
hanna alemu
ad8c25fedf Bug 1796900 - Don't nag users about Firefox View r=mviar,barret
Differential Revision: https://phabricator.services.mozilla.com/D160284
2022-11-09 20:06:58 +00:00
Mark Banner
433fff5bca Bug 1795322 - Update toolkit modules references in browser/ code. r=mossop,Gijs,preferences-reviewers,desktop-theme-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D160031
2022-10-26 08:06:35 +00:00
Csoregi Natalia
5edbe31601 Backed out 12 changesets (bug 1795322) for causing multiple failures e.g. test_deletion_request_ping.py. CLOSED TREE
Backed out changeset aba25cbcda51 (bug 1795322)
Backed out changeset a4a35005ada9 (bug 1795322)
Backed out changeset 8e8d790eb0f4 (bug 1795322)
Backed out changeset db8903454bd3 (bug 1795322)
Backed out changeset 60cc71c61cad (bug 1795322)
Backed out changeset bc6a674994ad (bug 1795322)
Backed out changeset 6ac8a611f8c7 (bug 1795322)
Backed out changeset 9fb873ecfb31 (bug 1795322)
Backed out changeset c8a7a40c2a2f (bug 1795322)
Backed out changeset f2c118b6c6ce (bug 1795322)
Backed out changeset 38df43b4a70f (bug 1795322)
Backed out changeset 89aea8373411 (bug 1795322)
2022-10-25 23:47:58 +03:00
Mark Banner
6bff0ab996 Bug 1795322 - Update toolkit modules references in browser/ code. r=mossop,Gijs,preferences-reviewers,desktop-theme-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D160031
2022-10-25 19:49:26 +00:00
Mark Banner
92309dcd01 Bug 1792344 - Add targeting in ASRouter for distributions. r=Mardak,mkaply
Differential Revision: https://phabricator.services.mozilla.com/D158088
2022-09-27 18:58:57 +00:00
Cristian Tuns
379cbd0e59 Backed out changeset cd3ab0559b8a (bug 1792344) for causing node failures CLOSED TREE 2022-09-27 14:44:13 -04:00
Mark Banner
87cee1d460 Bug 1792344 - Add targeting in ASRouter for distributions. r=Mardak,mkaply
Differential Revision: https://phabricator.services.mozilla.com/D158088
2022-09-27 18:06:46 +00:00
Nick Alexander
e0bf9e65d7 Bug 1790444 - Allow to localize action title in Toast Notification actions messages. r=barret
Differential Revision: https://phabricator.services.mozilla.com/D157165
2022-09-14 17:47:24 +00:00
Barret Rennie
6b4a7f9717 Bug 1784101 - Add targeting for detecting MR2022 holdback study r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D156215
2022-09-12 20:37:17 +00:00
Nick Alexander
665fecfa56 Bug 1787962 - Add launch_url to ToastNotification message surface. r=barret
Everything here is Windows-only for now, since that's the immediate
use case and these implementation details are specific to Windows
native notifications relaunching Firefox when it is not running --
functionality not supported by the other system alert backends at this
time.

This commit adds a `launch_url` parameter to `ToastNotification`.
This should be viewed as the simplest possible "action" that a toast
notification can take when it is clicked, namely navigating to the
given URL.  In the future, we might generalize this to describe more
of the existing actions (like opening settings, snoozing or dismissing
the toast, etc), but for now, this handles my use case.

In addition, this uses `content.tag` as the alert `name`, allowing to
replace existing toast notifications.

Differential Revision: https://phabricator.services.mozilla.com/D155912
2022-09-01 22:48:22 +00:00
Meg Viar
248755e275 Bug 1786647 - Split up Feature Callout messages and fetch from ASRouter on page load, focus, and screen advance r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D155524
2022-08-31 16:09:26 +00:00
Sandor Molnar
8aaea79f98 Backed out changeset 225b8bbe0912 (bug 1786647) for causing browser-chrome failures in toolkit/components/messaging-system/schemas/TriggerActionSchemas/test/browser/browser_asrouter_trigger_docs.js CLOSED TREE 2022-08-30 01:43:39 +03:00
Meg Viar
91ba440ce8 Bug 1786647 - Split up Feature Callout messages and fetch from ASRouter on page load, focus, and screen advance r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D155524
2022-08-29 20:19:16 +00:00
Csoregi Natalia
591eeff1af Backed out changeset ba0784c1646a (bug 1786647) for fxms failures. CLOSED TREE 2022-08-29 19:51:17 +03:00
Meg Viar
4f744927cf Bug 1786647 - Split up Feature Callout messages and fetch from ASRouter on page load, focus, and screen advance r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D155524
2022-08-29 16:18:42 +00:00
criss
351bc28d66 Backed out changeset 56ba242e0732 (bug 1786647) for causing python fxms failures . CLOSED TREE 2022-08-29 17:14:11 +03:00
Meg Viar
605bbe0b26 Bug 1786647 - Split up Feature Callout messages and fetch from ASRouter on page load, focus, and screen advance r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D155524
2022-08-29 13:29:31 +00:00
Meg Viar
8ad31e8913 Bug 1786646 - Add targeting in ASRouter for "colorways active" and "user has not set up colorways" r=pdahiya,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D155491
2022-08-26 21:54:52 +00:00
Cristian Tuns
60f732062a Backed out changeset 500d9526b586 (bug 1786646) for causing xpcshell failures test_backgroundtask_targeting.js CLOSED TREE 2022-08-26 09:38:56 -04:00
Meg Viar
14b3ddf157 Bug 1786646 - Add targeting in ASRouter for "colorways active" and "user has not set up colorways" r=pdahiya
Differential Revision: https://phabricator.services.mozilla.com/D155491
2022-08-26 12:55:27 +00:00
Meg Viar
ab3bcf30ba Bug 1784138 - Show the correct number of steps in the Feature Callout step indicator r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D154301
2022-08-15 12:41:59 +00:00
Barret Rennie
917e4a8282 Bug 1782113 - Add type field to message-group.schema.json r=pdahiya
The type field is present in the schema in messaging-system-inflight-assets and
all the message group definitions deployed have this field.

While I was here, I simplified the definition of `frequency.custom.period`
since it was using a `oneOf` subschema with a list containing one item.

Differential Revision: https://phabricator.services.mozilla.com/D153118
2022-08-03 15:35:58 +00:00
Barret Rennie
6d670c7a89 Bug 1782116 - Only support integer periods for frequencies in FxMS messages r=pdahiya
Bug 1652513 removed support for "daily" periods so we should remove support for
them from the schemas.

Some tests for ASRouter that were testing frequency normalization (that weren't
actually testing it because frequency normalization was removed) have been
removed.

Differential Revision: https://phabricator.services.mozilla.com/D153117
2022-07-29 04:38:06 +00:00
Meg Viar
9eb6f24939 Bug 1780015 - Add targeting for users who prefer reduced motion in AboutWelcome message surfaces r=pdahiya
Differential Revision: https://phabricator.services.mozilla.com/D152174
2022-07-22 17:10:26 +00:00
Meg Viar
f894cbcfc5 Bug 1779422 - Make push state updates configurable in aboutWelcome r=pdahiya
Differential Revision: https://phabricator.services.mozilla.com/D152061
2022-07-22 17:09:17 +00:00
Csoregi Natalia
52f52b1095 Backed out changeset 1a66d46b4b28 (bug 1779422) for causing fxms failures. CLOSED TREE 2022-07-22 18:39:58 +03:00
Meg Viar
a2828e0a11 Bug 1779422 - Make push state updates configurable in aboutWelcome r=pdahiya
Differential Revision: https://phabricator.services.mozilla.com/D152061
2022-07-22 14:34:00 +00:00
Barret Rennie
a8e3bb32ff Bug 1779950 - Keep FxMS test corpus up-to-date for make-schemas.py r=nalexander
The fxms schema job has been updated with a script that writes out the test
corpus for the test. This means we no longer need to keep these JSON files in
tree, since the test will automatically generate them.

Differential Revision: https://phabricator.services.mozilla.com/D151985
2022-07-21 00:47:46 +00:00
Barret Rennie
d99b4d74d4 Bug 1779142 - Support generating multiple schemas in make-schemas.py r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D151568
2022-07-21 00:47:45 +00:00
Barret Rennie
6c9a4ed36a Bug 1775187 - Refactor out common elements of FxMS schema r=Mardak
The following propertie have been refactored out into the top-level message
schema so that they don't have to be repeated in each template's schema:

- `frequency`
- `groups`
- `id`
- `priority`

A definition for the `trigger` property has been added to the common schemas as
`MessageTrigger` so that messages that require triggering can reference this
definition.

Each template schema now requires only its template (as a const value or enum)
and its content, as well as any additional top-level properties that are
message specific (e.g., `order` for `WhatsNewMessage`).

`id`, `content`, and `template` properties are required for all messages.
Individual template schemas do not need to mark `content` and `template` as
required since they are required by the top-level schema. Messages that
require triggering or targeting must define those properties.

Differential Revision: https://phabricator.services.mozilla.com/D150705
2022-07-21 00:47:45 +00:00
Barret Rennie
e30f98e555 Bug 1779109 - Add a schema for protections_panel template r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D151560
2022-07-21 00:47:44 +00:00
Barret Rennie
8fbde5b119 Bug 1775187 - Refactor out localizableText and localizedText from FxMS schemas r=nalexander,dmose
Several kinds of FxMS messages support a common pattern of taking either a
string or an object containing a string ID, allowing for both raw strings and
translated string IDs to be used in messages. This patch refactors that pattern
out into a common definition (localizedText and localizableText) in a common
schema which other schemas can then reference.

Our schema bundling script has been updated to bundle these definitions from
the common schema as top-level definitions (and subsequently rewrite the
references from FxMSCOmmon.schema.json to the generated schema) because Nimbus
and Experimenter only support a single schema file per feature.

To ensure compatability with Experimenter, all our in-tree messages have been
extracted into a test corpus that is validated with the Experimenter JSON
Schema validator. A future patch in this series will clean this up so we don't
need to have separate copies of messages in the tree.

We are now also validating all messages from the CFRMessageProvider with our
in-tree JSON Schema validator that Nimbus uses. The OnboardingMessageProvider
and PanelTestProvider tests have also been updated so that all three are using
the same testing infrastructure.

Differential Revision: https://phabricator.services.mozilla.com/D150704
2022-07-21 00:47:44 +00:00
Nick Alexander
232384a3e0 Bug 1780299 - Add isBackgroundTaskMode and backgroundTaskName to ASRouterTargeting. r=barret
These will allow targeting Nimbus experiments and Firefox Messaging
System messages only to background tasks.

Differential Revision: https://phabricator.services.mozilla.com/D152289
2022-07-20 19:15:18 +00:00
Nick Alexander
6e9303448d Bug 1775128 - Add toast_notification message template for displaying (native) toast notifications. r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D150073
2022-07-20 02:58:42 +00:00
Jason Prickett
e31905c4cb Bug 1779048 - Adding PIN and OTHER as promo types in PbNewTab message schema r=pdahiya,barret
Differential Revision: https://phabricator.services.mozilla.com/D151664
2022-07-15 15:52:04 +00:00
Barret Rennie
3b75183455 Bug 1776478 - Support empty messages in the FxMS experiment schema r=emcminn
Differential Revision: https://phabricator.services.mozilla.com/D150691
2022-07-12 00:27:18 +00:00
Butkovits Atila
5d193db1cf Backed out changeset 8fe694b12df5 (bug 1776478) as requested by Barret. CLOSED TREE 2022-07-11 23:16:02 +03:00
Barret Rennie
c6fa8e2893 Bug 1776478 - Support empty messages in the FxMS experiment schema r=emcminn
Differential Revision: https://phabricator.services.mozilla.com/D150691
2022-07-11 19:36:17 +00:00
Barret Rennie
acd1cb8603 Bug 1778422 - Fix secondary buttons in ExtensionDoorhanger.schema.json r=emcminn
Additionally, the secondary property is actually an array of objects, not an object.

Differential Revision: https://phabricator.services.mozilla.com/D151194
2022-07-09 01:17:05 +00:00
Barret Rennie
7b181b5725 Bug 1778592 - Fix template uniqueness check in make-schemas.py r=emcminn
Differential Revision: https://phabricator.services.mozilla.com/D151338
2022-07-09 01:17:05 +00:00
Barret Rennie
a91de82338 Bug 1778368 - Add Python jsonschema tests for FxMS schema r=dmose
To ensure that we don't ship a schema that breaks Experimenter, we now have
in-tree tests that validate FxMS messages against our schema using the same
JSON Schema evaluator (python-jsonchema).

Our test corpus is the same as test_PanelTestProvider.js. We cannot have
PanelTestProvider.jsm fetch the messages from the JSON due to fetch() not being
supported in the newtab npm tests.

Differential Revision: https://phabricator.services.mozilla.com/D151169
2022-07-09 01:17:05 +00:00
Barret Rennie
66549c9869 Bug 1778368 - Patch relative refs into absolute refs in the FxMS mega schema r=dmose
Differential Revision: https://phabricator.services.mozilla.com/D151159
2022-07-06 19:54:39 +00:00
Barret Rennie
ad911a3922 Bug 1771073 - Make make-schemas.py executable r=dmose
Depends on D147332

Differential Revision: https://phabricator.services.mozilla.com/D150398
2022-06-29 23:01:37 +00:00
Barret Rennie
b3e2605f2b Bug 1771073 - Correct FxMS features and keep them up to date with tests r=dmose,pdahiya
The Nimbus Features corresponding to FxMS messaging surfaces are actually
intended to map to FxMS message groups, which can accept *any* FxMS message.
The features have been updated with schemas that accept any FxMS message.

As part of this, all FxMS schemas have been updated with an `$id` so that they
can be bundled into feature schemas and have their internal `$ref`s work.
(Otherwise, a `$ref` would be relative to the top-level schema instead of the
sub-schema).

Schemas for individual message types are no longer exposed as resource:// URIs,
except in tests, as indivual schemas are no longer required at runtime.

Additionally, each FxMS schema has had its `template` field become required and
requires a constant value for that schema (e.g., Spotlight requires a template
value of "spotlight").

A test has been added to ensure that if any of the messaging surfaces schemas
change that the feature schemas are also updated. The feature schemas can be
regenerated via:

```
cd ./browser/components/newtab/content-src/asrouter/schemas
../../../../../../mach make-schemas.py
```

Differential Revision: https://phabricator.services.mozilla.com/D147332
2022-06-29 23:01:37 +00:00
Meg Viar
4c527f9886 Bug 1772025 - Add targeting for users who have private Firefox browser pinned r=pdahiya,barret
Differential Revision: https://phabricator.services.mozilla.com/D148446
2022-06-22 18:30:03 +00:00
Barret Rennie
f86903b198 Bug 1768727 - Make messaging systems more backwards compatible and update schemas to match in-flight messages r=emcminn
Differential Revision: https://phabricator.services.mozilla.com/D146028
2022-05-12 21:39:18 +00:00
Barret Rennie
188cd9ed5c Bug 1767302 - Fix UpdateAction.schema.json, again r=emcminn
Differential Revision: https://phabricator.services.mozilla.com/D145239
2022-05-04 01:26:48 +00:00
Barret Rennie
bbdc3c3536 Bug 1767266 - Make ExtensionDoorhanger.schema.json more lenient r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D145241
2022-05-03 16:37:19 +00:00
Barret Rennie
f726644db9 Bug 1766430 - Allow additional properties in Spotlight content r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D144722
2022-04-26 16:22:50 +00:00