Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ntp: favorites schemas+icons #1191

Merged
merged 3 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion special-pages/messages/new-tab/examples/stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ const privacyStatsData = {
* @type {import("../../../types/new-tab").StatsConfig}
*/
const minimumConfig = {
expansion: "expanded"
expansion: "expanded",
animation: { kind: "none" }
}

/**
Expand Down
3 changes: 3 additions & 0 deletions special-pages/messages/new-tab/favorites_add.notify.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"$schema": "http://json-schema.org/draft-07/schema#"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"$schema": "http://json-schema.org/draft-07/schema#"
}
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/favorites-config.json"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"$schema": "http://json-schema.org/draft-07/schema#"
}
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/favorites-data.json"
}
]
}
19 changes: 19 additions & 0 deletions special-pages/messages/new-tab/favorites_move.notify.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Favorites Move Action",
"type": "object",
"required": [
"id",
"targetIndex"
],
"properties": {
"id": {
"description": "Entity ID",
"type": "string"
},
"targetIndex": {
"description": "zero-indexed target",
"type": "number"
}
}
}
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/favorites-config.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/favorites-data.json"
}
]
}
19 changes: 19 additions & 0 deletions special-pages/messages/new-tab/favorites_open.notify.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Favorites Open Action",
"type": "object",
"required": [
"id",
"target"
],
"properties": {
"id": {
"description": "Entity ID",
"type": "string"
},
"target": {
"type": "string",
"enum": ["same-tab", "new-tab", "new-window"]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Favorites Open Context Menu Action",
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"description": "Entity ID",
"type": "string"
}
}
}
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/favorites-config.json"
}
]
}
10 changes: 10 additions & 0 deletions special-pages/messages/new-tab/types/favorites-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FavoritesConfig",
"type": "object",
"required": ["expansion"],
"properties": {
"expansion": { "$ref": "./expansion.json" },
"animation": { "$ref": "./animation.json" }
}
}
47 changes: 47 additions & 0 deletions special-pages/messages/new-tab/types/favorites-data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Favorites Data",
"type": "object",
"required": ["favorites"],
"properties": {
"favorites": {
"type": "array",
"items": {
"type": "object",
"title": "Favorite",
"required": ["url", "id", "title", "favicon"],
"properties": {
"url": {
"type": "string"
},
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"favicon": {
"oneOf": [
{
"type": "null"
},
{
"type": "object",
"title": "Favorite Favicon",
"required": ["src", "maxAvailableSize"],
"properties": {
"src": {
"type": "string"
},
"maxAvailableSize": {
"type": "number"
}
}
}
]
}
}
}
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/a.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/b.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/c.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/d.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/e.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/f.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/g.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/h.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/i.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/j.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/k.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/l.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/m.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/n.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/o.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/p.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/q.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/r.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/s.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/t.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/u.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/v.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/w.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/x.svg
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/y.svg
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/z.svg
Loading
Loading