Skip to content

Commit

Permalink
favorites drag and drop
Browse files Browse the repository at this point in the history
  • Loading branch information
Shane Osbourne committed Oct 10, 2024
1 parent 4472616 commit d9c584e
Show file tree
Hide file tree
Showing 37 changed files with 1,663 additions and 242 deletions.
98 changes: 98 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"packages/messaging"
],
"dependencies": {
"@atlaskit/pragmatic-drag-and-drop": "^1.3.1",
"immutable-json-patch": "^5.1.3",
"parse-address": "^1.1.2",
"seedrandom": "^3.0.5",
Expand All @@ -67,8 +68,8 @@
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-replace": "^5.0.7",
"@types/chrome": "^0.0.248",
"@types/node": "^20.16.10",
"@types/jasmine": "^5.1.4",
"@types/node": "^20.16.10",
"@typescript-eslint/eslint-plugin": "^6.9.1",
"config-builder": "github:duckduckgo/privacy-configuration#main",
"esbuild": "^0.19.5",
Expand Down
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"
}
]
}
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"
}
]
}
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"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FavoritesConfig",
"type": "object",
"required": ["expansion"],
"properties": {
"expansion": {"$ref": "./expansion.json"}
}
}
30 changes: 30 additions & 0 deletions packages/special-pages/messages/new-tab/types/favorites-data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"$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": ["data", "id", "title", "favicon"],
"properties": {
"data": {
"type": "string"
},
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"favicon": {
"type": "string"
}
}
}
}
}
}
8 changes: 5 additions & 3 deletions packages/special-pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@
"web-resource-inliner": "^6.0.1"
},
"dependencies": {
"preact": "^10.19.3",
"classnames": "^2.3.2",
"@atlaskit/pragmatic-drag-and-drop": "^1.3.1",
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.3",
"@formkit/auto-animate": "^0.8.0",
"@rive-app/canvas-single": "^2.21.5"
"@rive-app/canvas-single": "^2.21.5",
"classnames": "^2.3.2",
"preact": "^10.19.3"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ body {
font-size: var(--body-font-size);
font-weight: var(--body-font-weight);
line-height: var(--body-line-height);
padding-left: var(--sp-6);
padding-right: var(--sp-6);
}

.layout {
Expand Down
11 changes: 11 additions & 0 deletions packages/special-pages/pages/new-tab/app/components/Chevron.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { h } from 'preact'

export function Chevron () {
return (
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M13.5 10L8 4.5L2.5 10" stroke="currentColor" stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"/>
</svg>
)
}
Loading

0 comments on commit d9c584e

Please sign in to comment.