Commit Graph

55 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Andrei Oprea
14419b8a91 Bug 1725131 - Remove messaging system code related to the Bookmark panel r=pdahiya,Mardak,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D122342
2021-08-19 13:17:13 +00:00
Andrei Oprea
55a44da2ef Bug 1695764 - Remove code related to CFR ML Experiment r=k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D113963
2021-06-15 10:44:15 +00:00
Andrei Oprea
a72e360b17 Bug 1652513 - Use Remote Settings groups configuration to control message lifetime and frequency r=k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D85136
2020-09-08 16:26:54 +00:00
Narcis Beleuzu
096d372b5a Backed out changeset 79894e9a9ccc (bug 1652513) for bc failures on browser_asrouter_group_frequency.js . CLOSED TREE 2020-09-08 18:39:51 +03:00
Andrei Oprea
84957e1b87 Bug 1652513 - Use Remote Settings groups configuration to control message lifetime and frequency r=k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D85136
2020-09-08 13:12:00 +00:00
Csoregi Natalia
ce05370a4c Backed out changeset ed6c3abb15c2 (bug 1652513) for node failures. CLOSED TREE 2020-09-07 23:00:52 +03:00
Andrei Oprea
808dd579c4 Bug 1652513 - Use Remote Settings groups configuration to control message lifetime and frequency r=k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D85136
2020-09-01 12:04:25 +00:00
Andrei Oprea
876dfc6bf9 Bug 1578754 - Implement groups configuration for Messaging System content r=k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D56545
2019-12-19 16:54:17 +00:00
Kate Hudson
29a340f6fb Bug 1599546 - Add personalization and modelVersion to provider schema, message data r=nanj
Differential Revision: https://phabricator.services.mozilla.com/D54791
2019-11-26 23:25:25 +00:00
Ed Lee
135125c199 Bug 1548952 - Add offline fallback, request timeouts and bug fixes to Activity Stream r=k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D29909
2019-05-04 05:36:06 +00:00
Ed Lee
4cd7d62e31 Bug 1544126 - Add FxA snippet, pinned targeting and bug fixes to Activity Stream r=k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D27387
2019-04-15 14:12:34 +00:00
Ed Lee
c6b22007bf Bug 1541502 - Add Pocket menu, triggering improvements and bug fixes to Activity Stream r=k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D25984
2019-04-04 14:32:55 +00:00
k88hudson
3064862662 Bug 1496457 - Add Newsletter template, addon install telemetry, remove legacy onboarding code, and bug fixes to Activity Stream r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D7916
2018-10-05 19:16:25 +00:00
k88hudson
f7751bfaa1 Bug 1494427 - [Export] Add locale targeting, ASR onboarding/user pref fixes, test fixes to Activity Stream r=ursula
Differential Revision: https://phabricator.services.mozilla.com/D7196
2018-09-28 20:59:01 +00:00
Ursula Sarracini
d8f0c8f7df Bug 1489962 - Add snippets targeting, Pocket tagging and bug fixes to Activity Stream r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D5914
2018-09-20 18:36:20 +00:00
Bogdan Tara
959605aa80 Backed out changeset 8dde92f89a24 (bug 1489962) for browser_asrouter_cfr.js failures. a=backout 2018-09-20 02:42:00 +03:00
Ed Lee
f7f0cd229e Bug 1489962 - Add snippets targeting, Pocket tagging and bug fixes to Activity Stream r=k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D5914
2018-09-19 13:53:10 +00:00
Ed Lee
02816e5015 Bug 1487538 - Add localized doorhanger, frecency targeting and bug fixes to Activity Stream r=k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D4774
2018-08-31 18:19:47 +00:00
k88hudson
b9d133f60c Bug 1486631 - Add CFR, search shortcut fixes, and bug fixes to Activity Stream r=Mardak,ursula
MozReview-Commit-ID: HZbYyg4FGwi

Differential Revision: https://phabricator.services.mozilla.com/D4392
2018-08-29 14:08:31 +00:00
Ciure Andrei
e8aeceaa3d Backed out 2 changesets (bug 1486931, bug 1486631) for browser_onboarding_accessibility.js failures CLOSED TREE
Backed out changeset 8a25fc40764a (bug 1486931)
Backed out changeset a89328c87888 (bug 1486631)
2018-08-29 01:55:19 +03:00