From c414fb20f55084d949d4cf2b03bb9aba58664872 Mon Sep 17 00:00:00 2001 From: selul Date: Thu, 23 Apr 2026 17:13:18 +0300 Subject: [PATCH 1/2] fix(onboarding): source step 3 typography from imported site Mirrors the Palette control on step 3 by driving the Typography list from `importData.font_pairs` (returned by the demo site's `/wp-json/ti-demo-data/data` endpoint) instead of `tiobDash.fontParings`, which reflected the admin site's local Neve settings. This keeps the admin-side slugs in sync with the preview iframe's resolver, so clicked font pairs actually apply in the preview. Also fixes the broken "Default"/reset button: default fonts are now derived from `importDataDefault.theme_mods` inside `withDispatch` (removing the `useState` + `ownProps` pattern that resolved to `undefined` at click time). Falls back to `tiobDash.fontParings` when the demo site does not yet return `font_pairs`. Made-with: Cursor --- .../CustomizeControls/TypographyControl.js | 66 ++++++++++++------- onboarding/src/Components/SiteSettings.js | 3 + 2 files changed, 44 insertions(+), 25 deletions(-) diff --git a/onboarding/src/Components/CustomizeControls/TypographyControl.js b/onboarding/src/Components/CustomizeControls/TypographyControl.js index c8f3d0ac..f682f7f6 100644 --- a/onboarding/src/Components/CustomizeControls/TypographyControl.js +++ b/onboarding/src/Components/CustomizeControls/TypographyControl.js @@ -5,24 +5,42 @@ import classnames from 'classnames'; import SVG from '../../utils/svg'; import { withDispatch, withSelect } from '@wordpress/data'; import { compose } from '@wordpress/compose'; -import { useState } from '@wordpress/element'; -const TypographyControl = ( { siteStyle, handleFontClick, importData } ) => { - const themeMods = importData?.theme_mods; +const FALLBACK_FONT = 'Arial, Helvetica, sans-serif'; - const [ defaultBodyFont ] = useState( - themeMods?.neve_body_font_family || 'Arial, Helvetica, sans-serif' - ); +const getFontPairs = ( importData ) => { + if ( importData && importData.font_pairs && Object.keys( importData.font_pairs ).length ) { + return importData.font_pairs; + } + if ( tiobDash && tiobDash.fontParings ) { + return tiobDash.fontParings; + } + return null; +}; - const [ defaultHeadingsFont ] = useState( - themeMods?.neve_headings_font_family || 'Arial, Helvetica, sans-serif' - ); +const getDefaultFonts = ( importDataDefault ) => { + const themeMods = importDataDefault?.theme_mods; + return { + body: themeMods?.neve_body_font_family || FALLBACK_FONT, + heading: themeMods?.neve_headings_font_family || FALLBACK_FONT, + }; +}; - const { font } = siteStyle; - if ( ! tiobDash || ! tiobDash.fontParings ) { - return; +const TypographyControl = ( { + siteStyle, + handleFontClick, + importData, + importDataDefault, +} ) => { + const fontPairs = getFontPairs( importData ); + if ( ! fontPairs ) { + return null; } + const { body: defaultBodyFont, heading: defaultHeadingsFont } = + getDefaultFonts( importDataDefault ); + const { font } = siteStyle; + return (
@@ -45,9 +63,8 @@ const TypographyControl = ( { siteStyle, handleFontClick, importData } ) => { { __( 'Default', 'templates-patterns-collection' ) } - { Object.keys( tiobDash.fontParings ).map( ( slug ) => { - const { headingFont, bodyFont } = - tiobDash.fontParings[ slug ]; + { Object.keys( fontPairs ).map( ( slug ) => { + const { headingFont, bodyFont } = fontPairs[ slug ]; const headingStyle = { fontFamily: headingFont.font, }; @@ -82,15 +99,12 @@ export default compose( withDispatch( ( dispatch, - { - importData, - siteStyle, - setSiteStyle, - defaultBodyFont, - defaultHeadingsFont, - } + { importData, importDataDefault, siteStyle, setSiteStyle } ) => { const { setImportData, setRefresh } = dispatch( 'ti-onboarding' ); + const fontPairs = getFontPairs( importData ); + const { body: defaultBodyFont, heading: defaultHeadingsFont } = + getDefaultFonts( importDataDefault ); return { handleFontClick: ( fontKey ) => { @@ -100,14 +114,16 @@ export default compose( }; setSiteStyle( newStyle ); - const { bodyFont, headingFont } = - fontKey !== 'default' - ? tiobDash.fontParings[ fontKey ] + const pair = + fontKey !== 'default' && fontPairs && fontPairs[ fontKey ] + ? fontPairs[ fontKey ] : { bodyFont: { font: defaultBodyFont }, headingFont: { font: defaultHeadingsFont }, }; + const { bodyFont, headingFont } = pair; + const newImportData = { ...importData, theme_mods: { diff --git a/onboarding/src/Components/SiteSettings.js b/onboarding/src/Components/SiteSettings.js index d1281ad9..bd2d5527 100644 --- a/onboarding/src/Components/SiteSettings.js +++ b/onboarding/src/Components/SiteSettings.js @@ -189,6 +189,9 @@ export const SiteSettings = ( { ) } From 9731b4b0cc3437e04472d870d748e82b9de99f23 Mon Sep 17 00:00:00 2001 From: Ionut Neagu Date: Tue, 5 May 2026 15:07:43 +0200 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20optimize=20wp.org=20listing=20?= =?UTF-8?q?=E2=80=94=20tags=20+=20excerpt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Excerpt: rewrite to land 'Gutenberg', 'WordPress', 'starter sites', 'templates' anchors. Lead with 'Access' rather than 'This plugin' generic boilerplate. - Tags: 9 -> 5. Drop 'sites', 'demo', 'content', 'import' (weak standalone), 'starter' (replace with 'starter sites' as full long-phrase). Add 'block patterns' as differentiator. New: starter sites, templates, block patterns, neve, gutenberg. 'templates' is the universal tag across the starter-templates leaders (Astra Starter Templates, Kadence Starter Templates). Co-Authored-By: Claude Opus 4.7 (1M context) --- readme.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.txt b/readme.txt index 8022efb7..d72bd9a8 100644 --- a/readme.txt +++ b/readme.txt @@ -1,6 +1,6 @@ === Starter Sites & Templates by Neve === Contributors: themeisle -Tags: neve, templates, patterns, blocks, starter, sites, demo, content, import +Tags: starter sites, templates, block patterns, neve, gutenberg Requires at least: 5.5 Tested up to: 6.9 Requires PHP: 5.6 @@ -8,7 +8,7 @@ Stable tag: 1.2.27 License: GPLv3 License URI: https://www.gnu.org/licenses/gpl-3.0.en.html -This plugin gives you access to 100+ templates and ready-to-use starter sites. Neve theme is used for all the designs. +Access 100+ Gutenberg templates and ready-to-use starter sites for WordPress. All designs work with the Neve theme. One-click import, fully responsive. == Description ==