diff --git a/composer.json b/composer.json index be07ecd2f..1bb90cc70 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,7 @@ "newfold-labs/wp-module-onboarding-data": "^0.1.0", "newfold-labs/wp-module-patterns": "^0.1.12", "newfold-labs/wp-module-install-checker": "^1.0", - "newfold-labs/wp-module-facebook": "1.0.0" + "newfold-labs/wp-module-facebook": "^1.0.2" }, "require-dev": { "wp-phpunit/wp-phpunit": "^6.2", diff --git a/composer.lock b/composer.lock index 216d4ccad..821c6877f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e9414ea34a5260c76cff581c26a6856d", + "content-hash": "ecc1023e4ef1e6b2bd33c3597d78c06e", "packages": [ { "name": "mustache/mustache", @@ -195,16 +195,16 @@ }, { "name": "newfold-labs/wp-module-facebook", - "version": "v1.0.0", + "version": "v1.0.2", "source": { "type": "git", "url": "git@github.com:newfold-labs/wp-module-facebook.git", - "reference": "9b0caa8311bd13b72cb8c03075e7832302109cf4" + "reference": "21ad4a3db764633307b680b3bb693d6ed8390a3b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-facebook/zipball/9b0caa8311bd13b72cb8c03075e7832302109cf4", - "reference": "9b0caa8311bd13b72cb8c03075e7832302109cf4", + "url": "https://api.github.com/repos/newfold-labs/wp-module-facebook/zipball/21ad4a3db764633307b680b3bb693d6ed8390a3b", + "reference": "21ad4a3db764633307b680b3bb693d6ed8390a3b", "shasum": "" }, "require": { @@ -230,10 +230,10 @@ } ], "support": { - "source": "https://github.com/newfold-labs/wp-module-facebook/tree/v1.0.0", + "source": "https://github.com/newfold-labs/wp-module-facebook/tree/v1.0.2", "issues": "https://github.com/newfold-labs/wp-module-facebook/issues" }, - "time": "2024-01-24T10:00:53+00:00" + "time": "2024-01-29T09:15:30+00:00" }, { "name": "newfold-labs/wp-module-install-checker", diff --git a/package-lock.json b/package-lock.json index fa543b786..76b7f14fb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4816,6 +4816,12 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "prettier": { + "version": "npm:wp-prettier@3.0.3", + "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-3.0.3.tgz", + "integrity": "sha512-X4UlrxDTH8oom9qXlcjnydsjAOD2BmB6yFmvS4Z2zdTzqqpRWb+fbqrH412+l+OUXmbzJlSXjlMFYPgYG12IAA==", + "dev": true + }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -14654,12 +14660,6 @@ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, - "prettier": { - "version": "npm:wp-prettier@3.0.3", - "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-3.0.3.tgz", - "integrity": "sha512-X4UlrxDTH8oom9qXlcjnydsjAOD2BmB6yFmvS4Z2zdTzqqpRWb+fbqrH412+l+OUXmbzJlSXjlMFYPgYG12IAA==", - "dev": true - }, "prettier-linter-helpers": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", diff --git a/src/OnboardingSPA/components/Sidebar/components/SitegenEditorPatterns/Sidebar.js b/src/OnboardingSPA/components/Sidebar/components/SitegenEditorPatterns/Sidebar.js index 9ac83796c..9c96c9c08 100644 --- a/src/OnboardingSPA/components/Sidebar/components/SitegenEditorPatterns/Sidebar.js +++ b/src/OnboardingSPA/components/Sidebar/components/SitegenEditorPatterns/Sidebar.js @@ -110,6 +110,12 @@ const SitegenEditorPatternsSidebar = () => { const newPreviewSettings = cloneDeep( globalStyles[ 0 ] ); newPreviewSettings.settings.color.palette = data.color.palette; + let blockGrammar = ''; + [ 'header', 'content', 'footer' ].forEach( ( part ) => { + if ( part in data ) { + blockGrammar += data[ part ]; + } + } ); return (
{ ? 'custom' : 'custom__highlighted' } - blockGrammer={ data.content } + blockGrammer={ blockGrammar } viewportWidth={ 1300 } previewSettings={ newPreviewSettings } skeletonLoadingTime={ 0 } @@ -206,6 +212,17 @@ const SitegenEditorPatternsSidebar = () => { ); newPreviewSettings.settings.color.palette = data.color.palette; + let blockGrammar = ''; + [ + 'header', + 'content', + 'footer', + ].forEach( ( part ) => { + if ( part in data ) { + blockGrammar += + data[ part ]; + } + } ); return (
{ : 'custom__highlighted' } blockGrammer={ - data.content + blockGrammar } viewportWidth={ 1300 @@ -306,6 +323,17 @@ const SitegenEditorPatternsSidebar = () => { ); newPreviewSettings.settings.color.palette = data.color.palette; + let blockGrammar = ''; + [ + 'header', + 'content', + 'footer', + ].forEach( ( part ) => { + if ( part in data ) { + blockGrammar += + data[ part ]; + } + } ); return (
{ : 'custom__highlighted' } blockGrammer={ - data.content + blockGrammar } viewportWidth={ 1300 diff --git a/src/OnboardingSPA/steps/SiteGen/Editor/index.js b/src/OnboardingSPA/steps/SiteGen/Editor/index.js index 02d588571..e1dc70210 100644 --- a/src/OnboardingSPA/steps/SiteGen/Editor/index.js +++ b/src/OnboardingSPA/steps/SiteGen/Editor/index.js @@ -81,9 +81,16 @@ const StepSiteGenEditor = () => { populateFontsInPreviewSettings( newPreviewSettings ); } + let blockGrammar = ''; + [ 'header', 'content', 'footer' ].forEach( ( part ) => { + if ( part in homepage ) { + blockGrammar += homepage[ part ]; + } + } ); + return ( { const data = homepages[ slug ]; const newPreviewSettings = cloneDeep( globalStyles[ 0 ] ); newPreviewSettings.settings.color.palette = data.color.palette; + let blockGrammar = ''; + [ 'header', 'content', 'footer' ].forEach( ( part ) => { + if ( part in data ) { + blockGrammar += data[ part ]; + } + } ); return (