From 58f44246a60be6175aad25ac4c244891174a3187 Mon Sep 17 00:00:00 2001 From: Luis Herranz Date: Wed, 2 Aug 2023 10:33:49 +0200 Subject: [PATCH] Change fakeshow with show-mock --- .../interactive-blocks/directive-effect/render.php | 2 +- .../interactive-blocks/directive-effect/view.js | 8 ++++---- .../interactive-blocks/tovdom-islands/render.php | 10 +++++----- .../plugins/interactive-blocks/tovdom-islands/view.js | 8 ++++---- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/e2e-tests/plugins/interactive-blocks/directive-effect/render.php b/packages/e2e-tests/plugins/interactive-blocks/directive-effect/render.php index 243826aae35046..440edbf5881f68 100644 --- a/packages/e2e-tests/plugins/interactive-blocks/directive-effect/render.php +++ b/packages/e2e-tests/plugins/interactive-blocks/directive-effect/render.php @@ -7,7 +7,7 @@ ?>
-
+
{ const { store, directive } = wp.interactivity; - // Fake `data-wp-fakeshow` directive to test when things are removed from the + // Fake `data-wp-show-mock` directive to test when things are removed from the // DOM. Replace with `data-wp-show` when it's ready. directive( - 'fakeshow', + 'show-mock', ( { directives: { - fakeshow: { default: fakeshow }, + "show-mock": { default: showMock }, }, element, evaluate, } ) => { - if ( ! evaluate( fakeshow ) ) return null; + if ( ! evaluate( showMock ) ) return null; return element; } ); diff --git a/packages/e2e-tests/plugins/interactive-blocks/tovdom-islands/render.php b/packages/e2e-tests/plugins/interactive-blocks/tovdom-islands/render.php index f7a9700321795c..a3ebb7a87424e4 100644 --- a/packages/e2e-tests/plugins/interactive-blocks/tovdom-islands/render.php +++ b/packages/e2e-tests/plugins/interactive-blocks/tovdom-islands/render.php @@ -7,14 +7,14 @@ ?>
-
+
This should be shown because it is inside an island.
-
+
This should not be shown because it is inside an island. @@ -23,7 +23,7 @@
-
+
@@ -37,7 +37,7 @@
@@ -51,7 +51,7 @@
-
+
diff --git a/packages/e2e-tests/plugins/interactive-blocks/tovdom-islands/view.js b/packages/e2e-tests/plugins/interactive-blocks/tovdom-islands/view.js index 5f6039685c495f..f897368193ea8b 100644 --- a/packages/e2e-tests/plugins/interactive-blocks/tovdom-islands/view.js +++ b/packages/e2e-tests/plugins/interactive-blocks/tovdom-islands/view.js @@ -1,18 +1,18 @@ ( ( { wp } ) => { const { store, directive, createElement } = wp.interactivity; - // Fake `data-wp-fakeshow` directive to test when things are removed from the + // Fake `data-wp-show-mock` directive to test when things are removed from the // DOM. Replace with `data-wp-show` when it's ready. directive( - 'fakeshow', + 'show-mock', ( { directives: { - fakeshow: { default: fakeshow }, + "show-mock": { default: showMock }, }, element, evaluate, } ) => { - if ( ! evaluate( fakeshow ) ) + if ( ! evaluate( showMock ) ) element.props.children = createElement( "template", null, element.props.children ); }