Bug 1880544 — Add action params to MessageData

This is a breaking change, for experimenter users of the messaging feature.

It tightens up the type of `action` to use the string-alias `ActionName`,
i.e. only keys of the `actions` table.

This is a large improvment in usability for message senders using the
experimenter UI.

This removes the ability to open URLs directly in the action.

For this, the new `action-params` map is used to parameterize the
action's deeplink URL.

For example, whereas before you may have said:

```json
"action": "https://example.com/survey?client={uuid}"
```

now you might write:

```json
"action": "OPEN_URL"
"action-params": {
    "private": "true",
    "url": "https://example.com/survey?client={uuid}"
}
```

`action-params` are specific to each action, and so cannot be validated by
the messsaging system.
fenix/125.0
James Hugman 4 months ago committed by mergify[bot]
parent 53e1028749
commit cb7afcb65c

@ -55,7 +55,7 @@ class NimbusMessagingHomescreenTest : TestSetup() {
Messaging(
messages = mapOf(
"test-message" to MessageData(
action = Res.string("TEST ACTION"),
action = "TEST ACTION",
style = "TEST STYLE",
buttonLabel = Res.string(messageButtonLabel),
text = Res.string(messageText),

Loading…
Cancel
Save