From 710fda659f2547077a2a5d5dfbd82ed98bfb96fc Mon Sep 17 00:00:00 2001 From: mmtr <1233880+mmtr@users.noreply.github.com> Date: Fri, 9 Aug 2024 13:57:09 +0200 Subject: [PATCH 1/4] MU WPCOM: Stop loading wpcom block editor nux feature --- .../jetpack-mu-wpcom/changelog/fix-pagte-patterns-error | 4 ++++ .../jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php | 1 - .../starter-page-templates/page-patterns-plugin.tsx | 6 +++--- 3 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 projects/packages/jetpack-mu-wpcom/changelog/fix-pagte-patterns-error diff --git a/projects/packages/jetpack-mu-wpcom/changelog/fix-pagte-patterns-error b/projects/packages/jetpack-mu-wpcom/changelog/fix-pagte-patterns-error new file mode 100644 index 0000000000000..f6a3e1b1e1387 --- /dev/null +++ b/projects/packages/jetpack-mu-wpcom/changelog/fix-pagte-patterns-error @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +Block Editor Nux: Temporary stop load feature from MU WPCOM diff --git a/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php b/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php index 15940f9e6833b..0fe6cf6a1c6dc 100644 --- a/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php +++ b/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php @@ -218,7 +218,6 @@ public static function load_etk_features() { require_once __DIR__ . '/features/paragraph-block-placeholder/paragraph-block-placeholder.php'; require_once __DIR__ . '/features/tags-education/tags-education.php'; require_once __DIR__ . '/features/wpcom-block-description-links/wpcom-block-description-links.php'; - require_once __DIR__ . '/features/wpcom-block-editor-nux/class-wpcom-block-editor-nux.php'; require_once __DIR__ . '/features/wpcom-blocks/a8c-posts-list/a8c-posts-list.php'; require_once __DIR__ . '/features/wpcom-blocks/event-countdown/event-countdown.php'; require_once __DIR__ . '/features/wpcom-blocks/timeline/timeline.php'; diff --git a/projects/packages/jetpack-mu-wpcom/src/features/starter-page-templates/page-patterns-plugin.tsx b/projects/packages/jetpack-mu-wpcom/src/features/starter-page-templates/page-patterns-plugin.tsx index 0eb6d3f32e52d..0babb1b3d6fd3 100644 --- a/projects/packages/jetpack-mu-wpcom/src/features/starter-page-templates/page-patterns-plugin.tsx +++ b/projects/packages/jetpack-mu-wpcom/src/features/starter-page-templates/page-patterns-plugin.tsx @@ -30,7 +30,7 @@ type CoreNuxPlaceholder = { */ export function PagePatternsPlugin( props: PagePatternsPluginProps ) { const { setOpenState } = useDispatch( pageLayoutStore ); - const { setUsedPageOrPatternsModal } = useDispatch( 'automattic/wpcom-welcome-guide' ); + //const { setUsedPageOrPatternsModal } = useDispatch( 'automattic/wpcom-welcome-guide' ); const { replaceInnerBlocks } = useDispatch( 'core/block-editor' ); const { editPost } = useDispatch( 'core/editor' ); const { toggleFeature } = useDispatch( 'core/edit-post' ); @@ -118,8 +118,8 @@ export function PagePatternsPlugin( props: PagePatternsPluginProps ) { const handleClose = useCallback( () => { setOpenState( 'CLOSED' ); - setUsedPageOrPatternsModal?.(); - }, [ setOpenState, setUsedPageOrPatternsModal ] ); + //setUsedPageOrPatternsModal?.(); + }, [ setOpenState /*setUsedPageOrPatternsModal*/ ] ); return ( Date: Fri, 9 Aug 2024 13:59:58 +0200 Subject: [PATCH 2/4] Revert unintended changes --- .../starter-page-templates/page-patterns-plugin.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/packages/jetpack-mu-wpcom/src/features/starter-page-templates/page-patterns-plugin.tsx b/projects/packages/jetpack-mu-wpcom/src/features/starter-page-templates/page-patterns-plugin.tsx index 0babb1b3d6fd3..0eb6d3f32e52d 100644 --- a/projects/packages/jetpack-mu-wpcom/src/features/starter-page-templates/page-patterns-plugin.tsx +++ b/projects/packages/jetpack-mu-wpcom/src/features/starter-page-templates/page-patterns-plugin.tsx @@ -30,7 +30,7 @@ type CoreNuxPlaceholder = { */ export function PagePatternsPlugin( props: PagePatternsPluginProps ) { const { setOpenState } = useDispatch( pageLayoutStore ); - //const { setUsedPageOrPatternsModal } = useDispatch( 'automattic/wpcom-welcome-guide' ); + const { setUsedPageOrPatternsModal } = useDispatch( 'automattic/wpcom-welcome-guide' ); const { replaceInnerBlocks } = useDispatch( 'core/block-editor' ); const { editPost } = useDispatch( 'core/editor' ); const { toggleFeature } = useDispatch( 'core/edit-post' ); @@ -118,8 +118,8 @@ export function PagePatternsPlugin( props: PagePatternsPluginProps ) { const handleClose = useCallback( () => { setOpenState( 'CLOSED' ); - //setUsedPageOrPatternsModal?.(); - }, [ setOpenState /*setUsedPageOrPatternsModal*/ ] ); + setUsedPageOrPatternsModal?.(); + }, [ setOpenState, setUsedPageOrPatternsModal ] ); return ( Date: Fri, 9 Aug 2024 14:07:19 +0200 Subject: [PATCH 3/4] Disable MU_WPCOM_BLOCK_EDITOR_NUX constant --- .../packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php b/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php index 0fe6cf6a1c6dc..c7e31d1586e98 100644 --- a/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php +++ b/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php @@ -174,7 +174,7 @@ public static function load_etk_features_flags() { define( 'MU_WPCOM_STARTER_PAGE_TEMPLATES', true ); define( 'MU_WPCOM_TAGS_EDUCATION', true ); define( 'MU_WPCOM_BLOCK_DESCRIPTION_LINKS', true ); - define( 'MU_WPCOM_BLOCK_EDITOR_NUX', true ); + define( 'MU_WPCOM_BLOCK_EDITOR_NUX', false ); define( 'MU_WPCOM_POSTS_LIST_BLOCK', true ); define( 'MU_WPCOM_JETPACK_COUNTDOWN_BLOCK', true ); define( 'MU_WPCOM_JETPACK_TIMELINE_BLOCK', true ); @@ -218,6 +218,7 @@ public static function load_etk_features() { require_once __DIR__ . '/features/paragraph-block-placeholder/paragraph-block-placeholder.php'; require_once __DIR__ . '/features/tags-education/tags-education.php'; require_once __DIR__ . '/features/wpcom-block-description-links/wpcom-block-description-links.php'; + require_once __DIR__ . '/features/wpcom-block-editor-nux/class-wpcom-block-editor-nux.php'; require_once __DIR__ . '/features/wpcom-blocks/a8c-posts-list/a8c-posts-list.php'; require_once __DIR__ . '/features/wpcom-blocks/event-countdown/event-countdown.php'; require_once __DIR__ . '/features/wpcom-blocks/timeline/timeline.php'; From e6fb6dd3f838a634e7ce74d5b278b23c509c5609 Mon Sep 17 00:00:00 2001 From: mmtr <1233880+mmtr@users.noreply.github.com> Date: Fri, 9 Aug 2024 14:08:32 +0200 Subject: [PATCH 4/4] Revert unintended change --- .../packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php | 1 - 1 file changed, 1 deletion(-) diff --git a/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php b/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php index c7e31d1586e98..0fce0b25c59fb 100644 --- a/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php +++ b/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php @@ -218,7 +218,6 @@ public static function load_etk_features() { require_once __DIR__ . '/features/paragraph-block-placeholder/paragraph-block-placeholder.php'; require_once __DIR__ . '/features/tags-education/tags-education.php'; require_once __DIR__ . '/features/wpcom-block-description-links/wpcom-block-description-links.php'; - require_once __DIR__ . '/features/wpcom-block-editor-nux/class-wpcom-block-editor-nux.php'; require_once __DIR__ . '/features/wpcom-blocks/a8c-posts-list/a8c-posts-list.php'; require_once __DIR__ . '/features/wpcom-blocks/event-countdown/event-countdown.php'; require_once __DIR__ . '/features/wpcom-blocks/timeline/timeline.php';