Skip to content

Commit

Permalink
Merge branch 'vkraucunas/ntp-remotemessagingframwork-fe' of github.co…
Browse files Browse the repository at this point in the history
…m:duckduckgo/content-scope-scripts into vkraucunas/ntp-remotemessagingframwork-fe
  • Loading branch information
vkraucunas committed Oct 22, 2024
2 parents d2b87cf + f568272 commit 37cc1be
Show file tree
Hide file tree
Showing 13 changed files with 471 additions and 133 deletions.
3 changes: 3 additions & 0 deletions special-pages/messages/new-tab/rmf_getConfig.request.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"$schema": "http://json-schema.org/draft-07/schema#"
}
8 changes: 8 additions & 0 deletions special-pages/messages/new-tab/rmf_getConfig.response.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"allOf": [
{
"$ref": "./types/rmf-config.json"
}
]
}
3 changes: 3 additions & 0 deletions special-pages/messages/new-tab/rmf_getData.request.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"$schema": "http://json-schema.org/draft-07/schema#"
}
8 changes: 8 additions & 0 deletions special-pages/messages/new-tab/rmf_getData.response.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"allOf": [
{
"$ref": "types/rmf-message.json"
}
]
}
9 changes: 9 additions & 0 deletions special-pages/messages/new-tab/types/rmf-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "RMFConfig",
"type": "object",
"required": ["expansion"],
"properties": {
"expansion": {"$ref": "./expansion.json"}
}
}
258 changes: 130 additions & 128 deletions special-pages/messages/new-tab/types/rmf-message.json
Original file line number Diff line number Diff line change
@@ -1,133 +1,135 @@
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"required": [
"content"
],
"properties": {
"content": {
"title": "RMF Message",
"oneOf": [
{
"title": "Small Message",
"type": "object",
"properties": {
"messageType": {
"const": "small"
},
"id": {
"type": "string"
},
"titleText": {
"type": "string"
},
"descriptionText": {
"type": "string"
}
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"title": "RMF Data",
"required": [
"content"
],
"properties": {
"content": {
"title": "RMF Message",
"oneOf": [
{
"title": "Small Message",
"type": "object",
"properties": {
"messageType": {
"const": "small"
},
"id": {
"type": "string"
},
"titleText": {
"type": "string"
},
"descriptionText": {
"type": "string"
}
},
"required": [
"messageType",
"id",
"titleText",
"descriptionText"
]
},
"required": [
"messageType",
"id",
"titleText",
"descriptionText"
]
},
{
"title": "Medium Message",
"type": "object",
"properties": {
"messageType": {
"const": "medium"
},
"id": {
"type": "string"
},
"titleText": {
"type": "string"
},
"descriptionText": {
"type": "string"
},
"icon": {
"type": "string"
}
{
"title": "Medium Message",
"type": "object",
"properties": {
"messageType": {
"const": "medium"
},
"id": {
"type": "string"
},
"titleText": {
"type": "string"
},
"descriptionText": {
"type": "string"
},
"icon": {
"type": "string"
}
},
"required": [
"messageType",
"id",
"titleText",
"descriptionText",
"icon"
]
},
"required": [
"messageType",
"id",
"titleText",
"descriptionText",
"icon"
]
},
{
"title": "Big Single Action Message",
"type": "object",
"properties": {
"messageType": {
"const": "big_single_action"
},
"id": {
"type": "string"
},
"titleText": {
"type": "string"
},
"descriptionText": {
"type": "string"
},
"icon": {
"type": "string"
},
"primaryActionText": {
"type": "string"
}
},
"required": [
"messageType",
"id",
"titleText",
"descriptionText",
"icon",
"primaryActionText",
]
},
{
"title": "Big Two Action Message",
"type": "object",
"properties": {
"messageType": {
"const": "big_two_action"
},
"id": {
"type": "string"
},
"titleText": {
"type": "string"
},
"descriptionText": {
"type": "string"
},
"icon": {
"type": "string"
},
"primaryActionText": {
"type": "string"
},
"secondaryActionText": {
"type": "string"
}
{
"title": "Big Single Action Message",
"type": "object",
"properties": {
"messageType": {
"const": "big_single_action"
},
"id": {
"type": "string"
},
"titleText": {
"type": "string"
},
"descriptionText": {
"type": "string"
},
"icon": {
"type": "string"
},
"primaryActionText": {
"type": "string"
}
},
"required": [
"messageType",
"id",
"titleText",
"descriptionText",
"icon",
"primaryActionText"
]
},
"required": [
"messageType",
"id",
"titleText",
"descriptionText",
"icon",
"primaryActionText",
"secondaryActionText"
]
}
]
{
"title": "Big Two Action Message",
"type": "object",
"properties": {
"messageType": {
"const": "big_two_action"
},
"id": {
"type": "string"
},
"titleText": {
"type": "string"
},
"descriptionText": {
"type": "string"
},
"icon": {
"type": "string"
},
"primaryActionText": {
"type": "string"
},
"secondaryActionText": {
"type": "string"
}
},
"required": [
"messageType",
"id",
"titleText",
"descriptionText",
"icon",
"primaryActionText",
"secondaryActionText"
]
}
]
}
}
}
}
1 change: 1 addition & 0 deletions special-pages/pages/new-tab/app/components/Components.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export function Components() {

return (
<div>
<DebugBar id={ids[0]} ids={ids} entries={entries} />
<DebugBar id={ids[0]} ids={ids} entries={entries} />
<Stage entries={/** @type {any} */(filtered)} />
</div>
Expand Down
Loading

0 comments on commit 37cc1be

Please sign in to comment.