Commit Graph

191 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
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
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
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
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
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
Barret Rennie
ad38c46862 Bug 1766091 - Fix UpdateAction.schema.json r=emcminn
Differential Revision: https://phabricator.services.mozilla.com/D144504
2022-04-25 18:34:03 +00:00
Meg Viar
9bf58262eb Bug 1762273 - Adjust thank you screen square-ish sizing with noodles, transitions, auto advance without showing Home r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D142839
2022-04-04 17:27:24 +00:00
Meg Viar
48fd34f067 Bug 1762242 - Conditionally show Private Browsing page Focus promo r=dmose
Differential Revision: https://phabricator.services.mozilla.com/D142551
2022-04-01 12:36:30 +00:00
Barret Rennie
af694af439 Bug 1752665 - Make the Spotlight schema less strict with respect to images r=emcminn
The previous changes to the Spotlight schema made one of the logo.imageURL or
logo.imageId required. However, this is not backwards compatible with the older
Firefoxen, so we have to support the case where `logo` is present (e.g., for
`image.size`) without either of those properties, but `logoImageURL` *is*
present.

Differential Revision: https://phabricator.services.mozilla.com/D140761
2022-03-25 00:01:21 +00:00
Barret Rennie
4db190e51d Bug 1752665 - Rewrite PanelTestProvider test as xpcshell test with new json schema validator r=andreio
Differential Revision: https://phabricator.services.mozilla.com/D138927
2022-03-25 00:01:20 +00:00
Barret Rennie
570a0f103e Bug 1757809 - Provide a JsonSchema module that supports additional Mozilla-specific formats r=mossop,emcminn
In migrating from Ajv 6 to @cfworker/json-schema, some schemas will no longer
validate due to the `format: uri` annotation only being a suggestion for
strings in Ajv 6. Our URLs that use %PLACEHOLDERS% (e.g., `%LOCALE%`) will not
pass validation as URIs due to being interpreted as invalid URL encoding.

Here we add a facade in front of @cfworker/json-schema which defines a
`moz-url-format` format for strings, which runs them through
Services.urlFormatter.formatURL before attempting to validate them as URIs. We
don't simply find-replace all %PLACEHOLDERS% because the URL formatter service
only supports certain variables and will leave undefined variables as-is,
leading to a validation error (which is what we want).

Differential Revision: https://phabricator.services.mozilla.com/D138926
2022-03-25 00:01:18 +00:00
Marian-Vasile Laza
7cd6c33676 Backed out 3 changesets (bug 1757809, bug 1755599) for causing bc failures on browser_all_files_referenced.js. CLOSED TREE
Backed out changeset 63ae4c9485e9 (bug 1757809)
Backed out changeset 2297b7533b97 (bug 1755599)
Backed out changeset e021f9e97c76 (bug 1755599)
2022-03-10 12:08:13 -08:00
Barret Rennie
7fc61d9b42 Bug 1757809 - Provide a JsonSchema module that supports additional Mozilla-specific formats r=mossop,emcminn
In migrating from Ajv 6 to @cfworker/json-schema, some schemas will no longer
validate due to the `format: uri` annotation only being a suggestion for
strings in Ajv 6. Our URLs that use %PLACEHOLDERS% (e.g., `%LOCALE%`) will not
pass validation as URIs due to being interpreted as invalid URL encoding.

Here we add a facade in front of @cfworker/json-schema which defines a
`moz-url-format` format for strings, which runs them through
Services.urlFormatter.formatURL before attempting to validate them as URIs. We
don't simply find-replace all %PLACEHOLDERS% because the URL formatter service
only supports certain variables and will leave undefined variables as-is,
leading to a validation error (which is what we want).

Differential Revision: https://phabricator.services.mozilla.com/D138926
2022-03-10 18:53:32 +00:00
Ed Lee
44942cfc9a Bug 1752935 - Reuse welcome bundle from Spotlight for multistage template r=pdahiya,andreio
Detect about:welcome template usage and move modal shadow styling to content. Remove 93-backwards-compatible logoImageURL and update schema. Only basic functionality for initial testing.

Differential Revision: https://phabricator.services.mozilla.com/D138866
2022-02-16 19:05:22 +00:00
Barret Rennie
2762bdaa49 Bug 1752183 - Support remote images in Spotlight r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D137210
2022-02-03 18:16:05 +00:00
Iulian Moraru
43e96c0e53 Backed out 2 changesets (bug 1752183) for causing multiple failures. CLOSED TREE
Backed out changeset b85880f20aa5 (bug 1752183)
Backed out changeset c4bd523a463a (bug 1752183)
2022-02-03 07:33:40 +02:00
Barret Rennie
c36b2cd877 Bug 1752183 - Support remote images in Spotlight r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D137210
2022-02-03 04:39:42 +00:00
Andrei Oprea
f64147a52f Bug 1746598 - Route MS messages to PB newtab r=dmose,extension-reviewers,rpl
Differential Revision: https://phabricator.services.mozilla.com/D134157
2022-01-25 13:02:30 +00:00
Sandor Molnar
3e20f2d917 Backed out changeset ea22083f5525 (bug 1746598) for causing bc failures in browser/components/extensions/test/browser/browser_ext_menus_incognito.js CLOSED TREE 2022-01-24 10:53:24 +02:00
Andrei Oprea
96287321db Bug 1746598 - Route MS messages to PB newtab r=dmose
Differential Revision: https://phabricator.services.mozilla.com/D134157
2022-01-24 07:49:45 +00:00
Andrei Oprea
02d7dc18a9 Bug 1740718 - Switch Messaging System to use the NimbusFeatures API r=k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D131241
2021-11-26 11:34:50 +00:00
Ed Lee
527bb6cf07 Bug 1735841 - Update template with hidden text that is shown on a link click for Total Cookie Protection r=andreio
Introduce an extra expanded text with a learn more toggle button. Allow for message configuration of various sizes.

Differential Revision: https://phabricator.services.mozilla.com/D129556
2021-10-28 14:24:59 +00:00
Andrei Oprea
52cf1b8ef5 Bug 1729943 - Fix json schema for Messaging System Spotlight component r=dmose
Differential Revision: https://phabricator.services.mozilla.com/D125389
2021-09-22 10:00:01 +00:00
Harry Twyford
bd18b6c4d2 Bug 1727319 - Part 2 - Remove intermediary variables in _theme.scss. r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D125608
2021-09-16 21:50:29 +00:00
Harry Twyford
2c68cf2971 Bug 1727317 - Define set of color variables to use in newtab. r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D125606
2021-09-16 21:50:29 +00:00
Harry Twyford
75f4dc3868 Bug 1727321 - Part 4 - Stop using color variables elsewhere in newtab. r=thecount
Differential Revision: https://phabricator.services.mozilla.com/D124401
2021-09-08 22:06:27 +00:00
Harry Twyford
a327978c95 Bug 1727321 - Part 2 - Stop using color variables in buttons. r=thecount
Differential Revision: https://phabricator.services.mozilla.com/D124398
2021-09-08 22:06:26 +00:00
Andrei Oprea
3cbae7f729 Bug 1728420 - New messaging surface Spotlight r=Mardak,dmose,nanj
Differential Revision: https://phabricator.services.mozilla.com/D121913
2021-09-03 13:41:21 +00:00
Andrei Oprea
559f418e53 Bug 1708681 - Remove assets associated with the addon recommendation CFRs r=desktop-theme-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D113964
2021-05-10 17:24:52 +00:00
Andrei Oprea
8fcf156dcf Bug 1707978 - Allow setting infobar priority through message configuration r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D113645
2021-04-29 15:27:34 +00:00
Andrei Oprea
d00578a88e Bug 1693787 - Remove SimpleAboutWelcome r=pdahiya
Differential Revision: https://phabricator.services.mozilla.com/D105958
2021-02-26 17:00:16 +00:00