From 63a6873ce10a791ab1a0ddcff49511fe3546963a Mon Sep 17 00:00:00 2001 From: supervoidcoder <88671013+supervoidcoder@users.noreply.github.com> Date: Fri, 7 Nov 2025 00:47:32 +0000 Subject: [PATCH 1/3] fix(playground): include compressed blocks and messages in horizontal compressed playground to restore toolbox/flyout --- README.md | 7 +- tests/horizontal_playground_compressed.html | 498 ++++++++++++++++++++ 2 files changed, 504 insertions(+), 1 deletion(-) create mode 100644 tests/horizontal_playground_compressed.html diff --git a/README.md b/README.md index d661f86a03..5412eec673 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,12 @@ Install dependencies: npm ci ``` -Open tests/vertical_playground.html in a browser for development. You don't need to rebuild compressed versions for most changes. Open tests/vertical_playground_compressed.html instead to test if the compressed versions built properly. +Open the playgrounds in a browser for development. For a local page that works without fetching Closure from node_modules, use the compressed playgrounds: + +- Horizontal (compressed): `tests/horizontal_playground_compressed.html` +- Vertical (compressed): `tests/vertical_playground_compressed.html` + +You don't need to rebuild compressed versions for most changes. Rebuild compressed versions when you want to update the bundled artifacts. To re-build compressed versions, run: diff --git a/tests/horizontal_playground_compressed.html b/tests/horizontal_playground_compressed.html new file mode 100644 index 0000000000..d58992a7a3 --- /dev/null +++ b/tests/horizontal_playground_compressed.html @@ -0,0 +1,498 @@ + + +
+ + + +
+
+
+
+
+
+
+ Log events: + +
+ ++ Log flyout events: + +
+ ++ Enable sounds (after refresh): + +
+ ++ Stress test: + + + +
+ ++ Glows: + + + + +
+ ++ + +
+ + From c6ad5757b9c142b7e5af4304644bacc1673bab22 Mon Sep 17 00:00:00 2001 From: supervoidcoder <88671013+supervoidcoder@users.noreply.github.com> Date: Thu, 6 Nov 2025 19:53:57 -0500 Subject: [PATCH 2/3] Incorrect setTimeout usage will cause immediate execution instead of delayed execution. The function call fakeDragWrapper() is being executed immediately and its return value (undefined) is passed to setTimeout. Critical bug in fakeDrag timing logic. Line 278 invokes fakeDragWrapper() immediately in the setTimeout call instead of passing a function reference. This breaks the intended asynchronous drag sequence and will cause premature execution of queued drags before the current mousemove/mouseup cycle completes. Co-authored-by: amazon-q-developer[bot] <208079219+amazon-q-developer[bot]@users.noreply.github.com> --- tests/horizontal_playground_compressed.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/horizontal_playground_compressed.html b/tests/horizontal_playground_compressed.html index d58992a7a3..cb8f9ea249 100644 --- a/tests/horizontal_playground_compressed.html +++ b/tests/horizontal_playground_compressed.html @@ -275,7 +275,7 @@ clientY: blockTop + dy}); blockToDrag.onMouseUp_(mouseUpEvent); - setTimeout(fakeDragWrapper(), 100); + setTimeout(fakeDragWrapper, 100); }, 30); }, 30); }; From 438bbf17ebf0ddbb80a3a91b5a6989f8074c8631 Mon Sep 17 00:00:00 2001 From: supervoidcoder <88671013+supervoidcoder@users.noreply.github.com> Date: Thu, 6 Nov 2025 19:54:18 -0500 Subject: [PATCH 3/3] Update tests/horizontal_playground_compressed.html Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- tests/horizontal_playground_compressed.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/horizontal_playground_compressed.html b/tests/horizontal_playground_compressed.html index cb8f9ea249..f7b6f7efbb 100644 --- a/tests/horizontal_playground_compressed.html +++ b/tests/horizontal_playground_compressed.html @@ -238,7 +238,7 @@ function setSoundsEnabled(state) { var checkbox = document.getElementById('soundsEnabled'); - checkbox.checked = (state) ? 'checked' : ''; + checkbox.checked = Boolean(state); if (sessionStorage) { sessionStorage.setItem('soundsEnabled', state); }