From 1dc91be12423b3b588f6fb8faaeb8452577077d6 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Wed, 21 Feb 2024 18:13:03 +0000 Subject: [PATCH 1/4] fix: restore respecting snap radius (#7873) (cherry picked from commit a517317b77c1e58727b748a99f9ae70b2c27d26a) --- core/block_dragger.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/block_dragger.ts b/core/block_dragger.ts index 26d265183a0..f914dfe20e0 100644 --- a/core/block_dragger.ts +++ b/core/block_dragger.ts @@ -333,7 +333,9 @@ export class BlockDragger implements IBlockDragger { delta: Coordinate, ): ConnectionCandidate | null { const localConns = this.getLocalConnections(draggingBlock); - let radius = config.snapRadius; + let radius = this.connectionCandidate + ? config.connectingSnapRadius + : config.snapRadius; let candidate = null; for (const conn of localConns) { From f15c1159642ba82ab51e38bb0656c0907038a153 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Tue, 20 Feb 2024 22:27:00 +0000 Subject: [PATCH 2/4] fix: insertion marker drag scaling (#7874) * fix: insertion marker drag scaling * chore: added docs for other params (cherry picked from commit 0e3a6e970590be375d3826917f15a8b0fbe4007e) --- core/block_dragger.ts | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/core/block_dragger.ts b/core/block_dragger.ts index f914dfe20e0..8d57344ea2e 100644 --- a/core/block_dragger.ts +++ b/core/block_dragger.ts @@ -204,6 +204,11 @@ export class BlockDragger implements IBlockDragger { this.updateConnectionPreview(block, delta); } + /** + * @param draggingBlock The block being dragged. + * @param dragDelta How far the pointer has moved from the position + * at the start of the drag, in pixel units. + */ private moveBlock(draggingBlock: BlockSvg, dragDelta: Coordinate) { const delta = this.pixelsToWorkspaceUnits_(dragDelta); const newLoc = Coordinate.sum(this.startXY_, delta); @@ -223,6 +228,11 @@ export class BlockDragger implements IBlockDragger { /** * Returns true if we would delete the block if it was dropped at this time, * false otherwise. + * + * @param e The most recent move event. + * @param draggingBlock The block being dragged. + * @param delta How far the pointer has moved from the position + * at the start of the drag, in pixel units. */ private wouldDeleteBlock( e: PointerEvent, @@ -245,7 +255,16 @@ export class BlockDragger implements IBlockDragger { ); } - private updateConnectionPreview(draggingBlock: BlockSvg, delta: Coordinate) { + /** + * @param draggingBlock The block being dragged. + * @param dragDelta How far the pointer has moved from the position + * at the start of the drag, in pixel units. + */ + private updateConnectionPreview( + draggingBlock: BlockSvg, + dragDelta: Coordinate, + ) { + const delta = this.pixelsToWorkspaceUnits_(dragDelta); const currCandidate = this.connectionCandidate; const newCandidate = this.getConnectionCandidate(draggingBlock, delta); if (!newCandidate) { From 7a03bb852af1a8661d10038aaaad7743fcbe587b Mon Sep 17 00:00:00 2001 From: Maribeth Moffatt Date: Wed, 21 Feb 2024 10:51:14 -0800 Subject: [PATCH 3/4] release: update version number to 10.4.2 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7ea0d49a0d0..e52061b0fe0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "blockly", - "version": "10.4.1", + "version": "10.4.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "blockly", - "version": "10.4.1", + "version": "10.4.2", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { diff --git a/package.json b/package.json index 88ec169ead6..a1c90ac803d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "blockly", - "version": "10.4.1", + "version": "10.4.2", "description": "Blockly is a library for building visual programming editors.", "keywords": [ "blockly" From a02b3c225afa0570958373a789e2e0a9a1b288c1 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Tue, 20 Feb 2024 22:15:29 +0000 Subject: [PATCH 4/4] chore: update webdriverio to fix chrome endpoint issue (#7875) (cherry picked from commit 3073e8d444ca6fd564a332ca55f36fc9f2817973) --- package-lock.json | 132 +++++++++++++++++++++++----------------------- package.json | 2 +- 2 files changed, 67 insertions(+), 67 deletions(-) diff --git a/package-lock.json b/package-lock.json index e52061b0fe0..08dcecf9743 100644 --- a/package-lock.json +++ b/package-lock.json @@ -49,7 +49,7 @@ "readline-sync": "^1.4.10", "rimraf": "^5.0.0", "typescript": "^5.0.2", - "webdriverio": "^8.16.7", + "webdriverio": "^8.32.2", "yargs": "^17.2.1" } }, @@ -1410,14 +1410,14 @@ "dev": true }, "node_modules/@wdio/config": { - "version": "8.29.1", - "resolved": "https://registry.npmjs.org/@wdio/config/-/config-8.29.1.tgz", - "integrity": "sha512-zNUac4lM429HDKAitO+fdlwUH1ACQU8lww+DNVgUyuEb86xgVdTqHeiJr/3kOMJAq9IATeE7mDtYyyn6HPm1JA==", + "version": "8.32.2", + "resolved": "https://registry.npmjs.org/@wdio/config/-/config-8.32.2.tgz", + "integrity": "sha512-ubqe4X+TgcERzXKIpMfisquNxPZNtRU5uPeV7hvas++mD75QyNpmWHCtea2+TjoXKxlZd1MVrtZAwtmqMmyhPw==", "dev": true, "dependencies": { "@wdio/logger": "8.28.0", - "@wdio/types": "8.29.1", - "@wdio/utils": "8.29.1", + "@wdio/types": "8.32.2", + "@wdio/utils": "8.32.2", "decamelize": "^6.0.0", "deepmerge-ts": "^5.0.0", "glob": "^10.2.2", @@ -1494,9 +1494,9 @@ } }, "node_modules/@wdio/protocols": { - "version": "8.24.12", - "resolved": "https://registry.npmjs.org/@wdio/protocols/-/protocols-8.24.12.tgz", - "integrity": "sha512-QnVj3FkapmVD3h2zoZk+ZQ8gevSj9D9MiIQIy8eOnY4FAneYZ9R9GvoW+mgNcCZO8S8++S/jZHetR8n+8Q808g==", + "version": "8.32.0", + "resolved": "https://registry.npmjs.org/@wdio/protocols/-/protocols-8.32.0.tgz", + "integrity": "sha512-inLJRrtIGdTz/YPbcsvpSvPlYQFTVtF3OYBwAXhG2FiP1ZwE1CQNLP/xgRGye1ymdGCypGkexRqIx3KBGm801Q==", "dev": true }, "node_modules/@wdio/repl": { @@ -1512,9 +1512,9 @@ } }, "node_modules/@wdio/types": { - "version": "8.29.1", - "resolved": "https://registry.npmjs.org/@wdio/types/-/types-8.29.1.tgz", - "integrity": "sha512-rZYzu+sK8zY1PjCEWxNu4ELJPYKDZRn7HFcYNgR122ylHygfldwkb5TioI6Pn311hQH/S+663KEeoq//Jb0f8A==", + "version": "8.32.2", + "resolved": "https://registry.npmjs.org/@wdio/types/-/types-8.32.2.tgz", + "integrity": "sha512-jq8LcBBQpBP9ZF5kECKEpXv8hN7irCGCjLFAN0Bd5ScRR6qu6MGWvwkDkau2sFPr0b++sKDCEaMzQlwrGFjZXg==", "dev": true, "dependencies": { "@types/node": "^20.1.0" @@ -1524,18 +1524,18 @@ } }, "node_modules/@wdio/utils": { - "version": "8.29.1", - "resolved": "https://registry.npmjs.org/@wdio/utils/-/utils-8.29.1.tgz", - "integrity": "sha512-Dm91DKL/ZKeZ2QogWT8Twv0p+slEgKyB/5x9/kcCG0Q2nNa+tZedTjOhryzrsPiWc+jTSBmjGE4katRXpJRFJg==", + "version": "8.32.2", + "resolved": "https://registry.npmjs.org/@wdio/utils/-/utils-8.32.2.tgz", + "integrity": "sha512-PJcP4d1Fr8Zp+YIfGN93G0fjDj/6J0I6Gf6p0IpJk8qKQpdFDm4gB+lc202iv2YkyC+oT6b4Ik2W9LzvpSKNoQ==", "dev": true, "dependencies": { "@puppeteer/browsers": "^1.6.0", "@wdio/logger": "8.28.0", - "@wdio/types": "8.29.1", + "@wdio/types": "8.32.2", "decamelize": "^6.0.0", "deepmerge-ts": "^5.1.0", "edgedriver": "^5.3.5", - "geckodriver": "^4.2.0", + "geckodriver": "^4.3.1", "get-port": "^7.0.0", "import-meta-resolve": "^4.0.0", "locate-app": "^2.1.0", @@ -1593,9 +1593,9 @@ } }, "node_modules/@wdio/utils/node_modules/http-proxy-agent": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", - "integrity": "sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", "dev": true, "dependencies": { "agent-base": "^7.1.0", @@ -1606,9 +1606,9 @@ } }, "node_modules/@wdio/utils/node_modules/https-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", - "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", + "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", "dev": true, "dependencies": { "agent-base": "^7.0.2", @@ -3389,9 +3389,9 @@ } }, "node_modules/devtools-protocol": { - "version": "0.0.1249869", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1249869.tgz", - "integrity": "sha512-Ctp4hInA0BEavlUoRy9mhGq0i+JSo/AwVyX2EFgZmV1kYB+Zq+EMBAn52QWu6FbRr10hRb6pBl420upbp4++vg==", + "version": "0.0.1261483", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1261483.tgz", + "integrity": "sha512-7vJvejpzA5DTfZVkr7a8sGpEAzEiAqcgmRTB0LSUrWeOicwL09lMQTzxHtFNVhJ1OOJkgYdH6Txvy9E5j3VOUQ==", "dev": true }, "node_modules/dir-glob": { @@ -3534,13 +3534,13 @@ } }, "node_modules/edgedriver": { - "version": "5.3.9", - "resolved": "https://registry.npmjs.org/edgedriver/-/edgedriver-5.3.9.tgz", - "integrity": "sha512-G0wNgFMFRDnFfKaXG2R6HiyVHqhKwdQ3EgoxW3wPlns2wKqem7F+HgkWBcevN7Vz0nN4AXtskID7/6jsYDXcKw==", + "version": "5.3.10", + "resolved": "https://registry.npmjs.org/edgedriver/-/edgedriver-5.3.10.tgz", + "integrity": "sha512-RFSHYMNtcF1PjaGZCA2rdQQ8hSTLPZgcYgeY1V6dC+tR4NhZXwFAku+8hCbRYh7ZlwKKrTbVu9FwknjFddIuuw==", "dev": true, "hasInstallScript": true, "dependencies": { - "@wdio/logger": "^8.16.17", + "@wdio/logger": "^8.28.0", "decamelize": "^6.0.0", "edge-paths": "^3.0.5", "node-fetch": "^3.3.2", @@ -4781,13 +4781,13 @@ "dev": true }, "node_modules/geckodriver": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/geckodriver/-/geckodriver-4.3.1.tgz", - "integrity": "sha512-ol7JLsj55o5k+z7YzeSy2mdJROXMAxIa+uzr3A1yEMr5HISqQOTslE3ZeARcxR4jpAY3fxmHM+sq32qbe/eXfA==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/geckodriver/-/geckodriver-4.3.2.tgz", + "integrity": "sha512-TNOoy+ULXJWI5XOq7CXD3PAD9TJa4NjMe7nKUXjlIsf+vezuaRsFgPwcgYdEem1K7106wabYsqr7Kqn51g0sJg==", "dev": true, "hasInstallScript": true, "dependencies": { - "@wdio/logger": "^8.24.12", + "@wdio/logger": "^8.28.0", "decamelize": "^6.0.0", "http-proxy-agent": "^7.0.0", "https-proxy-agent": "^7.0.2", @@ -4837,9 +4837,9 @@ } }, "node_modules/geckodriver/node_modules/http-proxy-agent": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", - "integrity": "sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", "dev": true, "dependencies": { "agent-base": "^7.1.0", @@ -4850,9 +4850,9 @@ } }, "node_modules/geckodriver/node_modules/https-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", - "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", + "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", "dev": true, "dependencies": { "agent-base": "^7.0.2", @@ -7283,12 +7283,12 @@ } }, "node_modules/locate-app": { - "version": "2.2.14", - "resolved": "https://registry.npmjs.org/locate-app/-/locate-app-2.2.14.tgz", - "integrity": "sha512-fqGE0IHZ3v+9kCjYvhwrP52aTGP1itOfp4TZZuv4dNl2gKN/pHCIlMhDSqPDb3qJ5Rti39y5T+/XrfCsiDRjKw==", + "version": "2.2.19", + "resolved": "https://registry.npmjs.org/locate-app/-/locate-app-2.2.19.tgz", + "integrity": "sha512-mjhvrYRHnLAVwreShl8NTwq9EUyfRoCqB0UsOlMKXo2KBmtb4dhlHbZH4mcfDsoNoLkHZ1Rq4TsWP/59Ix62Ww==", "dev": true, "dependencies": { - "n12": "1.8.17", + "n12": "1.8.22", "type-fest": "2.13.0", "userhome": "1.0.0" } @@ -7985,9 +7985,9 @@ } }, "node_modules/n12": { - "version": "1.8.17", - "resolved": "https://registry.npmjs.org/n12/-/n12-1.8.17.tgz", - "integrity": "sha512-/NdfkU7nyqq70E4RvDa3OrR/wkZrYjDGXjn4JgIZnn+ULcyW1f6BLjNqyFC+ND9FqzyWjcQhvagFJmVJ8k8Lew==", + "version": "1.8.22", + "resolved": "https://registry.npmjs.org/n12/-/n12-1.8.22.tgz", + "integrity": "sha512-nzPCOuLOIoUuninAMRXfrbkB7O9XkWS7iv7fzDW1pRUaQhMpatj8iX55evwcNRWnm0UF29uuoHpwubYbsV7OGw==", "dev": true }, "node_modules/nanoid": { @@ -11361,27 +11361,27 @@ } }, "node_modules/web-streams-polyfill": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.2.tgz", - "integrity": "sha512-3pRGuxRF5gpuZc0W+EpwQRmCD7gRqcDOMt688KmdlDAgAyaB1XlN0zq2njfDNm44XVdIouE7pZ6GzbdyH47uIQ==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", + "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", "dev": true, "engines": { "node": ">= 8" } }, "node_modules/webdriver": { - "version": "8.29.1", - "resolved": "https://registry.npmjs.org/webdriver/-/webdriver-8.29.1.tgz", - "integrity": "sha512-D3gkbDUxFKBJhNHRfMriWclooLbNavVQC1MRvmENAgPNKaHnFn+M+WtP9K2sEr0XczLGNlbOzT7CKR9K5UXKXA==", + "version": "8.32.2", + "resolved": "https://registry.npmjs.org/webdriver/-/webdriver-8.32.2.tgz", + "integrity": "sha512-uyCT2QzCqoz+EsMLTApG5/+RvHJR9MVbdEnjMoxpJDt+IeZCG2Vy/Gq9oNgNQfpxrvZme/EY+PtBsltZi7BAyg==", "dev": true, "dependencies": { "@types/node": "^20.1.0", "@types/ws": "^8.5.3", - "@wdio/config": "8.29.1", + "@wdio/config": "8.32.2", "@wdio/logger": "8.28.0", - "@wdio/protocols": "8.24.12", - "@wdio/types": "8.29.1", - "@wdio/utils": "8.29.1", + "@wdio/protocols": "8.32.0", + "@wdio/types": "8.32.2", + "@wdio/utils": "8.32.2", "deepmerge-ts": "^5.1.0", "got": "^12.6.1", "ky": "^0.33.0", @@ -11392,23 +11392,23 @@ } }, "node_modules/webdriverio": { - "version": "8.29.1", - "resolved": "https://registry.npmjs.org/webdriverio/-/webdriverio-8.29.1.tgz", - "integrity": "sha512-NZK95ivXCqdPraB3FHMw6ByxnCvtgFXkjzG2l3Oq5z0IuJS2aMow3AKFIyiuG6is/deGCe+Tb8eFTCqak7UV+w==", + "version": "8.32.2", + "resolved": "https://registry.npmjs.org/webdriverio/-/webdriverio-8.32.2.tgz", + "integrity": "sha512-Z0Wc/dHFfWGWJZpaQ8u910/LG0E9EIVTO7J5yjqWx2XtXz2LzQMxYwNRnvNLhY/1tI4y/cZxI6kFMWr8wD2TtA==", "dev": true, "dependencies": { "@types/node": "^20.1.0", - "@wdio/config": "8.29.1", + "@wdio/config": "8.32.2", "@wdio/logger": "8.28.0", - "@wdio/protocols": "8.24.12", + "@wdio/protocols": "8.32.0", "@wdio/repl": "8.24.12", - "@wdio/types": "8.29.1", - "@wdio/utils": "8.29.1", + "@wdio/types": "8.32.2", + "@wdio/utils": "8.32.2", "archiver": "^6.0.0", "aria-query": "^5.0.0", "css-shorthand-properties": "^1.1.1", "css-value": "^0.0.1", - "devtools-protocol": "^0.0.1249869", + "devtools-protocol": "^0.0.1261483", "grapheme-splitter": "^1.0.2", "import-meta-resolve": "^4.0.0", "is-plain-obj": "^4.1.0", @@ -11420,7 +11420,7 @@ "resq": "^1.9.1", "rgb2hex": "0.2.5", "serialize-error": "^11.0.1", - "webdriver": "8.29.1" + "webdriver": "8.32.2" }, "engines": { "node": "^16.13 || >=18" diff --git a/package.json b/package.json index a1c90ac803d..fd8013f0766 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "readline-sync": "^1.4.10", "rimraf": "^5.0.0", "typescript": "^5.0.2", - "webdriverio": "^8.16.7", + "webdriverio": "^8.32.2", "yargs": "^17.2.1" }, "dependencies": {