From 741dc0693239d1fd324a51019d98ad2c680217bb Mon Sep 17 00:00:00 2001 From: code-snippets-bot <139164393+code-snippets-bot@users.noreply.github.com> Date: Mon, 12 Oct 2026 09:24:03 +0000 Subject: [PATCH 1/7] chore(release): bump version to v4.0.0 --- package-lock.json | 4 ++-- package.json | 2 +- src/code-snippets.php | 6 +++--- src/readme.txt | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 29dbebaca..503890f93 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "code-snippets", - "version": "4.0.0-beta.3", + "version": "4.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "code-snippets", - "version": "4.0.0-beta.3", + "version": "4.0.0", "license": "GPL-2.0-or-later", "dependencies": { "@codemirror/fold": "^0.19.4", diff --git a/package.json b/package.json index f20cc6920..d1265a56b 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "code-snippets", "description": "Manage code snippets running on a WordPress-powered site through a graphical interface.", "homepage": "https://codesnippets.pro", - "version": "4.0.0-beta.3", + "version": "4.0.0", "main": "src/dist/edit.js", "directories": { "test": "tests" diff --git a/src/code-snippets.php b/src/code-snippets.php index d4e59c8c9..940595a10 100644 --- a/src/code-snippets.php +++ b/src/code-snippets.php @@ -8,11 +8,11 @@ * License: GPL-2.0-or-later * License URI: license.txt * Text Domain: code-snippets - * Version: 4.0.0-beta.3 + * Version: 4.0.0 * Requires PHP: 7.4 * Requires at least: 5.5 * - * @version 4.0.0-beta.3 + * @version 4.0.0 * @package Code_Snippets * @author Shea Bunge * @copyright 2012-2026 Code Snippets Pro @@ -37,7 +37,7 @@ * * @const string */ - define( 'CODE_SNIPPETS_VERSION', '4.0.0-beta.3' ); + define( 'CODE_SNIPPETS_VERSION', '4.0.0' ); /** * The full path to the main file of this plugin. diff --git a/src/readme.txt b/src/readme.txt index ed504b943..7b16725da 100644 --- a/src/readme.txt +++ b/src/readme.txt @@ -4,7 +4,7 @@ Donate link: https://codesnippets.pro Tags: code, snippets, multisite, php, css License: GPL-2.0-or-later License URI: license.txt -Stable tag: 3.10.2 +Stable tag: 4.0.0 Requires at least: 5.5 Tested up to: 7.1 Requires PHP: 7.4 From 0adf0f08c6252bccb0a7181331b25a05fef70199 Mon Sep 17 00:00:00 2001 From: code-snippets-bot <139164393+code-snippets-bot@users.noreply.github.com> Date: Mon, 12 Oct 2026 09:25:03 +0000 Subject: [PATCH 2/7] chore(release): regenerate changelog for v4.0.0 --- CHANGELOG.md | 79 +++----------------------------------------------- src/readme.txt | 7 +++++ 2 files changed, 11 insertions(+), 75 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8aff7200c..df5d3e1f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,82 +1,11 @@ # Changelog -## [4.0.0] (UPCOMING) - -### Added -* Stats page for viewing snippet totals and various snippet breakdowns. -* AI Agent for building snippets from a description: it proposes a plan you can refine or approve before any code is - written, and can revise the snippets it created. (PRO) -* Snippet revisions, with a history of past versions, a side-by-side diff against the current code, and one-click - restore. (PRO) -* Display conditions for controlling where and when a snippet runs, without writing the checks by hand. (PRO) -* Per-role snippet permissions, so you can decide which roles may view, edit, activate, or delete snippets. (PRO) -* Blueprints for setting up a site from a saved collection of snippets and settings. (PRO) -* Flat file storage, for keeping snippets as files so they can be version-controlled alongside the rest of a site. (PRO) -* "Ran on this page" tracking, showing which snippets actually executed on the page you are viewing. (PRO) -* Natural-language search in Community Cloud, so you can describe what you need instead of guessing keywords. (PRO) -* Snippet deployment from Code Snippets Cloud to connected sites, including deploying several snippets under one shared - display condition. (PRO) -* Installing a cloud bundle onto a connected site as a standalone plugin. (PRO) -* Updating Code Snippets Pro on a connected site from the cloud dashboard. (PRO) -* Drift detection, which reports when a snippet on the site no longer matches the copy stored in the cloud. (PRO) -* New admin interface for managing snippets, with a cleaner layout, faster interactions, and a more consistent - experience across plugin screens. (PRO) -* Card view for browsing snippets, with a view switcher on the snippets table and Community Cloud. (PRO) -* Snippet preview modal for viewing snippet code from the snippets table without opening the editor. (PRO) -* Automatic hiding of unrelated admin notices from other plugins on Code Snippets screens. (PRO) -* Admin bar snippet drawer, based on the Deckerweb Snippets workflow, for quick access to snippets and Safe Mode from - the WordPress admin bar. (PRO) -* Snippet locking to help prevent accidental edits or deletion of important snippets. Props - to https://github.com/mgiannopoulos24. (PRO) -* Improved screen options on the main snippets table, including controls for visible columns and truncating long snippet - names or descriptions. (PRO) -* Bulk actions and bulk code download support in the redesigned snippets table. (PRO) -* Featured snippets and improved browsing in Community Cloud. (PRO) -* WordPress modern theme admin styling compatibility. (PRO) -* Clearer accessibility labels, headings, tab markup, table checkboxes, sort buttons, copy buttons, and drag-and-drop - upload controls. (PRO) -* Feedback reporter for sending bug reports, feature requests and general feedback from the plugin screens, with an - optional summary of the site environment so the team can reproduce the problem. (PRO) + +## [4.0.0] (2026-10-12) ### Changed -* Redesigned the main snippets table with improved search, filtering, sorting, pagination, row actions, and bulk - selection. (PRO) -* Improved the snippet import and migration experience, including clearer file upload handling and third-party plugin - migration flows. (PRO) -* Improved snippet error handling so activation failures, validation errors, and stack traces are easier to understand. - (PRO) -* Improved Community Cloud search and filtering, including server-side filters, better result loading, and clearer empty - states. (PRO) -* Updated the welcome screen, toolbar, import screen, and cloud screens to match the new admin experience. (PRO) -* Updated internal plugin architecture to a cleaner PSR-4 structure for better long-term maintainability. (PRO) -* Improved accessibility across the snippets table, import screen, migration flow, Community Cloud, welcome screen, - toolbar, dialogs, tooltips, and code editor. (PRO) -* Improved colour contrast and reduced-motion support across admin screens. (PRO) -* Faster loading of large code vaults, which are now fetched a page at a time instead of all at once. (PRO) - -### Fixed -* Fixed AI conversations from one connected site being visible from another. (PRO) -* Fixed a snippet list stored in Code Snippets Cloud being emptied when the site was temporarily unable to read its own - snippets. (PRO) -* Fixed REST API server error responses on missing snippets. (PRO) -* Fixed redundant frontend logic, improving overall performance. (PRO) -* Fixed Community Cloud search results and pagination to respect WordPress screen options. (PRO) -* Fixed snippet saving and activation feedback to improve validation and runtime error display. (PRO) -* Fixed downloaded Community Cloud snippets appearing as not downloaded after a page reload. (PRO) -* Fixed network snippet lookups using the wrong database table on multisite. (PRO) -* Fixed the inactive snippets count including trashed snippets. (PRO) -* Fixed featured Community Cloud snippets failing to load with some cloud API responses. (PRO) -* Fixed bulk actions in Community Cloud running against an empty selection, so selected snippets were never downloaded. - (PRO) -* Fixed a fatal error in the Elementor editor on Elementor versions older than 3.19. -* Fixed snippet descriptions staying truncated after the "Truncate long snippet names and descriptions" screen option - was switched off. -* Fixed saving, activating or deactivating a snippet reporting its previous state, which could leave a deactivated - snippet running under file-based execution. -* Fixed the snippet editor reporting a save as failed and undelivered when no response was received, which it cannot - determine. -* Fixed translations being loaded too early, with a notice from WordPress, when posts were queried while plugins were - still loading. +* bump version to v4.0.0 +* prep release v4.0.0 (#584) ## [3.10.2] (2026-09-01) diff --git a/src/readme.txt b/src/readme.txt index 7b16725da..2b6ce92e5 100644 --- a/src/readme.txt +++ b/src/readme.txt @@ -106,6 +106,13 @@ You can report security bugs found in the source code of this plugin through the == Changelog == + += 4.0.0 (2026-10-12) = + +**Changed** +* bump version to v4.0.0 +* prep release v4.0.0 (#584) + = 3.10.2 (2026-09-01) = __Added__ From 8aae3c3ee38e3ee84eaa076e8e9d37a835a81aff Mon Sep 17 00:00:00 2001 From: code-snippets-bot <139164393+code-snippets-bot@users.noreply.github.com> Date: Mon, 12 Oct 2026 09:54:23 +0000 Subject: [PATCH 3/7] chore(release): regenerate changelog for v4.0.0 --- CHANGELOG.md | 79 ++++++++++++++++++++++++++++++++++++++++++++++++-- src/readme.txt | 79 ++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 154 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index df5d3e1f3..9076ad3fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,86 @@ # Changelog + +```markdown ## [4.0.0] (2026-10-12) +### Added +* Stats page for viewing snippet totals and various snippet breakdowns. +* AI Agent for building snippets from a description: it proposes a plan you can refine or approve before any code is + written, and can revise the snippets it created. (PRO) +* Snippet revisions, with a history of past versions, a side-by-side diff against the current code, and one-click + restore. (PRO) +* Display conditions for controlling where and when a snippet runs, without writing the checks by hand. (PRO) +* Per-role snippet permissions, so you can decide which roles may view, edit, activate, or delete snippets. (PRO) +* Blueprints for setting up a site from a saved collection of snippets and settings. (PRO) +* Flat file storage, for keeping snippets as files so they can be version-controlled alongside the rest of a site. (PRO) +* "Ran on this page" tracking, showing which snippets actually executed on the page you are viewing. (PRO) +* Natural-language search in Community Cloud, so you can describe what you need instead of guessing keywords. (PRO) +* Snippet deployment from Code Snippets Cloud to connected sites, including deploying several snippets under one shared + display condition. (PRO) +* Installing a cloud bundle onto a connected site as a standalone plugin. (PRO) +* Updating Code Snippets Pro on a connected site from the cloud dashboard. (PRO) +* Drift detection, which reports when a snippet on the site no longer matches the copy stored in the cloud. (PRO) +* New admin interface for managing snippets, with a cleaner layout, faster interactions, and a more consistent + experience across plugin screens. (PRO) +* Card view for browsing snippets, with a view switcher on the snippets table and Community Cloud. (PRO) +* Snippet preview modal for viewing snippet code from the snippets table without opening the editor. (PRO) +* Automatic hiding of unrelated admin notices from other plugins on Code Snippets screens. (PRO) +* Admin bar snippet drawer, based on the Deckerweb Snippets workflow, for quick access to snippets and Safe Mode from + the WordPress admin bar. (PRO) +* Snippet locking to help prevent accidental edits or deletion of important snippets. Props + to https://github.com/mgiannopoulos24. (PRO) +* Improved screen options on the main snippets table, including controls for visible columns and truncating long snippet + names or descriptions. (PRO) +* Bulk actions and bulk code download support in the redesigned snippets table. (PRO) +* Featured snippets and improved browsing in Community Cloud. (PRO) +* WordPress modern theme admin styling compatibility. (PRO) +* Clearer accessibility labels, headings, tab markup, table checkboxes, sort buttons, copy buttons, and drag-and-drop + upload controls. (PRO) +* Feedback reporter for sending bug reports, feature requests and general feedback from the plugin screens, with an + optional summary of the site environment so the team can reproduce the problem. (PRO) + ### Changed -* bump version to v4.0.0 -* prep release v4.0.0 (#584) +* Redesigned the main snippets table with improved search, filtering, sorting, pagination, row actions, and bulk + selection. (PRO) +* Improved the snippet import and migration experience, including clearer file upload handling and third-party plugin + migration flows. (PRO) +* Improved snippet error handling so activation failures, validation errors, and stack traces are easier to understand. + (PRO) +* Improved Community Cloud search and filtering, including server-side filters, better result loading, and clearer empty + states. (PRO) +* Updated the welcome screen, toolbar, import screen, and cloud screens to match the new admin experience. (PRO) +* Updated internal plugin architecture to a cleaner PSR-4 structure for better long-term maintainability. (PRO) +* Improved accessibility across the snippets table, import screen, migration flow, Community Cloud, welcome screen, + toolbar, dialogs, tooltips, and code editor. (PRO) +* Improved colour contrast and reduced-motion support across admin screens. (PRO) +* Faster loading of large code vaults, which are now fetched a page at a time instead of all at once. (PRO) + +### Fixed +* Fixed AI conversations from one connected site being visible from another. (PRO) +* Fixed a snippet list stored in Code Snippets Cloud being emptied when the site was temporarily unable to read its own + snippets. (PRO) +* Fixed REST API server error responses on missing snippets. (PRO) +* Fixed redundant frontend logic, improving overall performance. (PRO) +* Fixed Community Cloud search results and pagination to respect WordPress screen options. (PRO) +* Fixed snippet saving and activation feedback to improve validation and runtime error display. (PRO) +* Fixed downloaded Community Cloud snippets appearing as not downloaded after a page reload. (PRO) +* Fixed network snippet lookups using the wrong database table on multisite. (PRO) +* Fixed the inactive snippets count including trashed snippets. (PRO) +* Fixed featured Community Cloud snippets failing to load with some cloud API responses. (PRO) +* Fixed bulk actions in Community Cloud running against an empty selection, so selected snippets were never downloaded. + (PRO) +* Fixed a fatal error in the Elementor editor on Elementor versions older than 3.19. +* Fixed snippet descriptions staying truncated after the "Truncate long snippet names and descriptions" screen option + was switched off. +* Fixed saving, activating or deactivating a snippet reporting its previous state, which could leave a deactivated + snippet running under file-based execution. +* Fixed the snippet editor reporting a save as failed and undelivered when no response was received, which it cannot + determine. +* Fixed translations being loaded too early, with a notice from WordPress, when posts were queried while plugins were + still loading. +``` ## [3.10.2] (2026-09-01) diff --git a/src/readme.txt b/src/readme.txt index 2b6ce92e5..fd0a16353 100644 --- a/src/readme.txt +++ b/src/readme.txt @@ -107,11 +107,86 @@ You can report security bugs found in the source code of this plugin through the == Changelog == + +```markdown = 4.0.0 (2026-10-12) = +**Added** +* Stats page for viewing snippet totals and various snippet breakdowns. +* AI Agent for building snippets from a description: it proposes a plan you can refine or approve before any code is + written, and can revise the snippets it created. (PRO) +* Snippet revisions, with a history of past versions, a side-by-side diff against the current code, and one-click + restore. (PRO) +* Display conditions for controlling where and when a snippet runs, without writing the checks by hand. (PRO) +* Per-role snippet permissions, so you can decide which roles may view, edit, activate, or delete snippets. (PRO) +* Blueprints for setting up a site from a saved collection of snippets and settings. (PRO) +* Flat file storage, for keeping snippets as files so they can be version-controlled alongside the rest of a site. (PRO) +* "Ran on this page" tracking, showing which snippets actually executed on the page you are viewing. (PRO) +* Natural-language search in Community Cloud, so you can describe what you need instead of guessing keywords. (PRO) +* Snippet deployment from Code Snippets Cloud to connected sites, including deploying several snippets under one shared + display condition. (PRO) +* Installing a cloud bundle onto a connected site as a standalone plugin. (PRO) +* Updating Code Snippets Pro on a connected site from the cloud dashboard. (PRO) +* Drift detection, which reports when a snippet on the site no longer matches the copy stored in the cloud. (PRO) +* New admin interface for managing snippets, with a cleaner layout, faster interactions, and a more consistent + experience across plugin screens. (PRO) +* Card view for browsing snippets, with a view switcher on the snippets table and Community Cloud. (PRO) +* Snippet preview modal for viewing snippet code from the snippets table without opening the editor. (PRO) +* Automatic hiding of unrelated admin notices from other plugins on Code Snippets screens. (PRO) +* Admin bar snippet drawer, based on the Deckerweb Snippets workflow, for quick access to snippets and Safe Mode from + the WordPress admin bar. (PRO) +* Snippet locking to help prevent accidental edits or deletion of important snippets. Props + to https://github.com/mgiannopoulos24. (PRO) +* Improved screen options on the main snippets table, including controls for visible columns and truncating long snippet + names or descriptions. (PRO) +* Bulk actions and bulk code download support in the redesigned snippets table. (PRO) +* Featured snippets and improved browsing in Community Cloud. (PRO) +* WordPress modern theme admin styling compatibility. (PRO) +* Clearer accessibility labels, headings, tab markup, table checkboxes, sort buttons, copy buttons, and drag-and-drop + upload controls. (PRO) +* Feedback reporter for sending bug reports, feature requests and general feedback from the plugin screens, with an + optional summary of the site environment so the team can reproduce the problem. (PRO) + **Changed** -* bump version to v4.0.0 -* prep release v4.0.0 (#584) +* Redesigned the main snippets table with improved search, filtering, sorting, pagination, row actions, and bulk + selection. (PRO) +* Improved the snippet import and migration experience, including clearer file upload handling and third-party plugin + migration flows. (PRO) +* Improved snippet error handling so activation failures, validation errors, and stack traces are easier to understand. + (PRO) +* Improved Community Cloud search and filtering, including server-side filters, better result loading, and clearer empty + states. (PRO) +* Updated the welcome screen, toolbar, import screen, and cloud screens to match the new admin experience. (PRO) +* Updated internal plugin architecture to a cleaner PSR-4 structure for better long-term maintainability. (PRO) +* Improved accessibility across the snippets table, import screen, migration flow, Community Cloud, welcome screen, + toolbar, dialogs, tooltips, and code editor. (PRO) +* Improved colour contrast and reduced-motion support across admin screens. (PRO) +* Faster loading of large code vaults, which are now fetched a page at a time instead of all at once. (PRO) + +**Fixed** +* Fixed AI conversations from one connected site being visible from another. (PRO) +* Fixed a snippet list stored in Code Snippets Cloud being emptied when the site was temporarily unable to read its own + snippets. (PRO) +* Fixed REST API server error responses on missing snippets. (PRO) +* Fixed redundant frontend logic, improving overall performance. (PRO) +* Fixed Community Cloud search results and pagination to respect WordPress screen options. (PRO) +* Fixed snippet saving and activation feedback to improve validation and runtime error display. (PRO) +* Fixed downloaded Community Cloud snippets appearing as not downloaded after a page reload. (PRO) +* Fixed network snippet lookups using the wrong database table on multisite. (PRO) +* Fixed the inactive snippets count including trashed snippets. (PRO) +* Fixed featured Community Cloud snippets failing to load with some cloud API responses. (PRO) +* Fixed bulk actions in Community Cloud running against an empty selection, so selected snippets were never downloaded. + (PRO) +* Fixed a fatal error in the Elementor editor on Elementor versions older than 3.19. +* Fixed snippet descriptions staying truncated after the "Truncate long snippet names and descriptions" screen option + was switched off. +* Fixed saving, activating or deactivating a snippet reporting its previous state, which could leave a deactivated + snippet running under file-based execution. +* Fixed the snippet editor reporting a save as failed and undelivered when no response was received, which it cannot + determine. +* Fixed translations being loaded too early, with a notice from WordPress, when posts were queried while plugins were + still loading. +``` = 3.10.2 (2026-09-01) = From dcd748576c9bbf8f7b5408709d0bf1b9c8b7c4fc Mon Sep 17 00:00:00 2001 From: code-snippets-bot <139164393+code-snippets-bot@users.noreply.github.com> Date: Mon, 12 Oct 2026 09:56:30 +0000 Subject: [PATCH 4/7] chore(release): regenerate changelog for v4.0.0 --- CHANGELOG.md | 5 +++++ src/readme.txt | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9076ad3fb..bcbe72deb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,9 @@ + ```markdown + ## [4.0.0] (2026-10-12) ### Added @@ -80,8 +82,11 @@ determine. * Fixed translations being loaded too early, with a notice from WordPress, when posts were queried while plugins were still loading. + + ``` +```markdown ## [3.10.2] (2026-09-01) ### Added diff --git a/src/readme.txt b/src/readme.txt index fd0a16353..cdb1f4f20 100644 --- a/src/readme.txt +++ b/src/readme.txt @@ -108,7 +108,9 @@ You can report security bugs found in the source code of this plugin through the + ```markdown + = 4.0.0 (2026-10-12) = **Added** @@ -186,8 +188,11 @@ You can report security bugs found in the source code of this plugin through the determine. * Fixed translations being loaded too early, with a notice from WordPress, when posts were queried while plugins were still loading. + + ``` +```markdown = 3.10.2 (2026-09-01) = __Added__ From a044a4b6598fd257c6575cc812b9acee5f2fbc37 Mon Sep 17 00:00:00 2001 From: Imants <2894954+imantsk@users.noreply.github.com> Date: Mon, 12 Oct 2026 10:03:58 +0000 Subject: [PATCH 5/7] fix: changelog formating --- CHANGELOG.md | 9 --------- src/readme.txt | 18 ++++++------------ 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bcbe72deb..2ac9ee1ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,5 @@ # Changelog - - - -```markdown - ## [4.0.0] (2026-10-12) ### Added @@ -83,10 +78,6 @@ * Fixed translations being loaded too early, with a notice from WordPress, when posts were queried while plugins were still loading. - -``` - -```markdown ## [3.10.2] (2026-09-01) ### Added diff --git a/src/readme.txt b/src/readme.txt index cdb1f4f20..fcee3a40f 100644 --- a/src/readme.txt +++ b/src/readme.txt @@ -106,14 +106,10 @@ You can report security bugs found in the source code of this plugin through the == Changelog == - - - -```markdown - = 4.0.0 (2026-10-12) = -**Added** +__Added__ + * Stats page for viewing snippet totals and various snippet breakdowns. * AI Agent for building snippets from a description: it proposes a plan you can refine or approve before any code is written, and can revise the snippets it created. (PRO) @@ -149,7 +145,8 @@ You can report security bugs found in the source code of this plugin through the * Feedback reporter for sending bug reports, feature requests and general feedback from the plugin screens, with an optional summary of the site environment so the team can reproduce the problem. (PRO) -**Changed** +__Changed__ + * Redesigned the main snippets table with improved search, filtering, sorting, pagination, row actions, and bulk selection. (PRO) * Improved the snippet import and migration experience, including clearer file upload handling and third-party plugin @@ -165,7 +162,8 @@ You can report security bugs found in the source code of this plugin through the * Improved colour contrast and reduced-motion support across admin screens. (PRO) * Faster loading of large code vaults, which are now fetched a page at a time instead of all at once. (PRO) -**Fixed** +__Fixed__ + * Fixed AI conversations from one connected site being visible from another. (PRO) * Fixed a snippet list stored in Code Snippets Cloud being emptied when the site was temporarily unable to read its own snippets. (PRO) @@ -189,10 +187,6 @@ You can report security bugs found in the source code of this plugin through the * Fixed translations being loaded too early, with a notice from WordPress, when posts were queried while plugins were still loading. - -``` - -```markdown = 3.10.2 (2026-09-01) = __Added__ From 8b11a680c49154b0e14569adfefb7efe65f87078 Mon Sep 17 00:00:00 2001 From: Imants <2894954+imantsk@users.noreply.github.com> Date: Mon, 12 Oct 2026 12:16:34 +0000 Subject: [PATCH 6/7] fix: humanize copy and remove em-dashes --- src/js/components/FeedbackReporter/FeedbackForm.tsx | 4 ++-- src/js/components/ManageMenu/AiAgentDemo/DemoUpsell.tsx | 4 ++-- src/js/components/ManageMenu/AiAgentDemo/callouts.ts | 4 ++-- src/js/components/ManageMenu/AiAgentDemo/demoScript.ts | 2 +- .../components/ManageMenu/BlueprintsDemo/BlueprintsDemo.tsx | 4 ++-- src/js/components/ManageMenu/BlueprintsDemo/callouts.ts | 4 ++-- .../ManageMenu/CloudLibraryDemo/CloudLibraryDemo.tsx | 2 +- src/js/components/ManageMenu/CloudLibraryDemo/callouts.ts | 4 ++-- src/js/utils/errors.ts | 4 ++-- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/js/components/FeedbackReporter/FeedbackForm.tsx b/src/js/components/FeedbackReporter/FeedbackForm.tsx index 3dd3c7e76..d6395e925 100644 --- a/src/js/components/FeedbackReporter/FeedbackForm.tsx +++ b/src/js/components/FeedbackReporter/FeedbackForm.tsx @@ -9,8 +9,8 @@ import type { FeedbackConfig, FeedbackDraft } from '../../types/Feedback' const TYPE_OPTIONS = [ { label: __('Choose one…', 'code-snippets'), value: '' }, - { label: __('Bug — something is broken', 'code-snippets'), value: 'bug' }, - { label: __('Feature request — something is missing', 'code-snippets'), value: 'feature' }, + { label: __('Bug: something is broken', 'code-snippets'), value: 'bug' }, + { label: __('Feature request: something is missing', 'code-snippets'), value: 'feature' }, { label: __('General feedback', 'code-snippets'), value: 'feedback' } ] diff --git a/src/js/components/ManageMenu/AiAgentDemo/DemoUpsell.tsx b/src/js/components/ManageMenu/AiAgentDemo/DemoUpsell.tsx index bfc8ad75b..69d3a849e 100644 --- a/src/js/components/ManageMenu/AiAgentDemo/DemoUpsell.tsx +++ b/src/js/components/ManageMenu/AiAgentDemo/DemoUpsell.tsx @@ -4,9 +4,9 @@ import { DemoUpsell } from '../../common/demo/DemoUpsell' export const AiAgentDemoUpsell: React.FC<{ onReplay: VoidFunction }> = ({ onReplay }) =>

{__('The whole walkthrough was scripted and ran inside this plugin. No prompt or snippet left your site, and none were added to it.', 'code-snippets')}

-

{__('In Code Snippets Pro the AI Agent does all of this for whatever you ask it to build, and the snippets it writes are real — saved to your site inactive, until you have read them and switched them on.', 'code-snippets')}

+

{__('In Code Snippets Pro, the AI Agent does all of this for whatever you ask it to build, and the snippets it writes are real. They are saved to your site switched off, so nothing runs until you have read them and turned them on.', 'code-snippets')}

diff --git a/src/js/components/ManageMenu/AiAgentDemo/callouts.ts b/src/js/components/ManageMenu/AiAgentDemo/callouts.ts index c9884711d..8433fb500 100644 --- a/src/js/components/ManageMenu/AiAgentDemo/callouts.ts +++ b/src/js/components/ManageMenu/AiAgentDemo/callouts.ts @@ -12,12 +12,12 @@ const STEPS: Record = { ask: { step: __('Step 1 of 5', 'code-snippets'), title: __('Ask in plain English', 'code-snippets'), - body: __('No syntax to learn and no boilerplate to copy — describe what you want the site to do, and the agent works out what that means in code.', 'code-snippets') + body: __('No syntax to learn and no boilerplate to copy. Describe what you want the site to do, and the agent works out what that means in code.', 'code-snippets') }, plan: { step: __('Step 2 of 5', 'code-snippets'), title: __('Sent for planning', 'code-snippets'), - body: __('Your request goes to Code Snippets Cloud, which works out what needs building — and whether that is one snippet or several — before writing anything.', 'code-snippets') + body: __('Your request goes to Code Snippets Cloud, which works out what needs building, whether that is one snippet or several, before writing anything.', 'code-snippets') }, approve: { step: __('Step 3 of 5', 'code-snippets'), diff --git a/src/js/components/ManageMenu/AiAgentDemo/demoScript.ts b/src/js/components/ManageMenu/AiAgentDemo/demoScript.ts index 8f5c98f0b..800216e85 100644 --- a/src/js/components/ManageMenu/AiAgentDemo/demoScript.ts +++ b/src/js/components/ManageMenu/AiAgentDemo/demoScript.ts @@ -52,7 +52,7 @@ export const getRefinementPrompt = (siteName: string): string => siteName ) -export const DEMO_REFINEMENT_REPLY = __('Done — the banner now greets visitors by name and uses a warmer gradient.', 'code-snippets') +export const DEMO_REFINEMENT_REPLY = __('Done. The banner now greets visitors by name and uses a warmer gradient.', 'code-snippets') /** * Escape a value for embedding inside a single-quoted PHP string literal. diff --git a/src/js/components/ManageMenu/BlueprintsDemo/BlueprintsDemo.tsx b/src/js/components/ManageMenu/BlueprintsDemo/BlueprintsDemo.tsx index fc1a9d7c9..f485024a7 100644 --- a/src/js/components/ManageMenu/BlueprintsDemo/BlueprintsDemo.tsx +++ b/src/js/components/ManageMenu/BlueprintsDemo/BlueprintsDemo.tsx @@ -124,11 +124,11 @@ const BlueprintsDemoPage: React.FC = () => { {showGenerated && } {isFinished &&

{__('The whole walkthrough was scripted and ran inside this plugin. No code was generated and nothing was saved.', 'code-snippets')}

-

{__('Code Snippets Pro ships blueprints for shortcodes, post types, taxonomies, settings pages, and more — fill in the form and it writes the snippet for you.', 'code-snippets')}

+

{__('Code Snippets Pro ships blueprints for shortcodes, post types, taxonomies, settings pages, and more. Fill in the form and it writes the snippet for you.', 'code-snippets')}

} diff --git a/src/js/components/ManageMenu/BlueprintsDemo/callouts.ts b/src/js/components/ManageMenu/BlueprintsDemo/callouts.ts index fce392802..83aef337d 100644 --- a/src/js/components/ManageMenu/BlueprintsDemo/callouts.ts +++ b/src/js/components/ManageMenu/BlueprintsDemo/callouts.ts @@ -10,7 +10,7 @@ const CALLOUTS: Partial> = { general: { step: __('Step 1 of 3', 'code-snippets'), title: __('Name the shortcode', 'code-snippets'), - body: __('Every blueprint starts with the basics — the tag you type into a post, and the function that powers it.', 'code-snippets') + body: __('Every blueprint starts with the basics: the tag you type into a post, and the function that powers it.', 'code-snippets') }, attributes: { step: __('Step 2 of 3', 'code-snippets'), @@ -25,7 +25,7 @@ const CALLOUTS: Partial> = { generating: { step: __('Generating', 'code-snippets'), title: __('Building the snippet', 'code-snippets'), - body: __('Pro turns the whole form into a finished, working snippet — no boilerplate to write yourself.', 'code-snippets') + body: __('Pro turns the whole form into a finished, working snippet, with no boilerplate for you to write.', 'code-snippets') }, generated: { step: __('Done', 'code-snippets'), diff --git a/src/js/components/ManageMenu/CloudLibraryDemo/CloudLibraryDemo.tsx b/src/js/components/ManageMenu/CloudLibraryDemo/CloudLibraryDemo.tsx index 8c77f8d3e..128efe128 100644 --- a/src/js/components/ManageMenu/CloudLibraryDemo/CloudLibraryDemo.tsx +++ b/src/js/components/ManageMenu/CloudLibraryDemo/CloudLibraryDemo.tsx @@ -93,7 +93,7 @@ export const CloudLibraryDemo: React.FC = () => { {isFinished &&

{__('The whole walkthrough was scripted and ran inside this plugin. These snippets are examples, and nothing was downloaded or saved.', 'code-snippets')}

diff --git a/src/js/components/ManageMenu/CloudLibraryDemo/callouts.ts b/src/js/components/ManageMenu/CloudLibraryDemo/callouts.ts index b426df099..baf9a4b9e 100644 --- a/src/js/components/ManageMenu/CloudLibraryDemo/callouts.ts +++ b/src/js/components/ManageMenu/CloudLibraryDemo/callouts.ts @@ -6,7 +6,7 @@ const STEPS: Partial> = { library: { step: __('Step 1 of 4', 'code-snippets'), title: __('Your whole cloud, in one place', 'code-snippets'), - body: __('Every snippet and bundle saved to your Code Snippets Cloud account is listed here, on every site you connect — so work you did once is never more than a click away.', 'code-snippets') + body: __('Every snippet and bundle saved to your Code Snippets Cloud account is listed here, on every site you connect. Work you did once is never more than a click away.', 'code-snippets') }, preview: { step: __('Step 2 of 4', 'code-snippets'), @@ -16,7 +16,7 @@ const STEPS: Partial> = { download: { step: __('Step 3 of 4', 'code-snippets'), title: __('Download in one click', 'code-snippets'), - body: __('The snippet lands in your snippets table straight away — and inactive, so nothing runs until you have looked it over and switched it on.', 'code-snippets') + body: __('The snippet lands in your snippets table straight away, switched off, so nothing runs until you have looked it over and switched it on.', 'code-snippets') }, synced: { step: __('Step 4 of 4', 'code-snippets'), diff --git a/src/js/utils/errors.ts b/src/js/utils/errors.ts index 1f35d7da5..797ce0774 100644 --- a/src/js/utils/errors.ts +++ b/src/js/utils/errors.ts @@ -54,8 +54,8 @@ export const describeRequestError = (error: unknown): string => { if (!error.response) { return __( - 'No response came back, so this could not be confirmed. The change may already have been saved — ' + - 'check in another tab before trying again.', + 'No response came back, so this could not be confirmed. The change may already be saved, ' + + 'so check in another tab before trying again.', 'code-snippets' ) } From b7744dbadf29bdb7205d77681b77f8d04ff843af Mon Sep 17 00:00:00 2001 From: Imants Date: Mon, 12 Oct 2026 12:54:12 +0000 Subject: [PATCH 7/7] feat: add close button to demo callout to exit mid-demo (#586) Co-authored-by: Imants <2894954+imantsk@users.noreply.github.com> --- src/css/common/_demo.scss | 12 ++++++++++ .../ManageMenu/AiAgentDemo/AiAgentDemo.tsx | 2 +- .../BlueprintsDemo/BlueprintsDemo.tsx | 2 +- .../CloudLibraryDemo/CloudLibraryDemo.tsx | 2 +- src/js/components/common/demo/DemoCallout.tsx | 23 +++++++++++++------ tests/e2e/blueprints-demo.spec.ts | 11 +++++++++ 6 files changed, 42 insertions(+), 10 deletions(-) diff --git a/src/css/common/_demo.scss b/src/css/common/_demo.scss index b5ce9765e..1bbc005fc 100644 --- a/src/css/common/_demo.scss +++ b/src/css/common/_demo.scss @@ -77,6 +77,18 @@ } } +.wp-core-ui .button.demo-callout__close { + position: absolute; + inset-block-start: 8px; + inset-inline-end: 8px; + color: var(--cs-color-text-secondary); + text-decoration: none; + + &:hover:not(:disabled) { + color: var(--cs-color-text); + } +} + .demo-callout__step { display: block; margin-block-end: 6px; diff --git a/src/js/components/ManageMenu/AiAgentDemo/AiAgentDemo.tsx b/src/js/components/ManageMenu/AiAgentDemo/AiAgentDemo.tsx index c36bd7794..5dd9ade30 100644 --- a/src/js/components/ManageMenu/AiAgentDemo/AiAgentDemo.tsx +++ b/src/js/components/ManageMenu/AiAgentDemo/AiAgentDemo.tsx @@ -100,7 +100,7 @@ const AiAgentDemoPage: React.FC = () => {
{STAGE_ANNOUNCEMENTS[stage]}
- + diff --git a/src/js/components/ManageMenu/BlueprintsDemo/BlueprintsDemo.tsx b/src/js/components/ManageMenu/BlueprintsDemo/BlueprintsDemo.tsx index f485024a7..4f2eed02b 100644 --- a/src/js/components/ManageMenu/BlueprintsDemo/BlueprintsDemo.tsx +++ b/src/js/components/ManageMenu/BlueprintsDemo/BlueprintsDemo.tsx @@ -102,7 +102,7 @@ const BlueprintsDemoPage: React.FC = () => {
{STAGE_ANNOUNCEMENTS[stage]}
- + diff --git a/src/js/components/ManageMenu/CloudLibraryDemo/CloudLibraryDemo.tsx b/src/js/components/ManageMenu/CloudLibraryDemo/CloudLibraryDemo.tsx index 128efe128..8d574781c 100644 --- a/src/js/components/ManageMenu/CloudLibraryDemo/CloudLibraryDemo.tsx +++ b/src/js/components/ManageMenu/CloudLibraryDemo/CloudLibraryDemo.tsx @@ -76,7 +76,7 @@ export const CloudLibraryDemo: React.FC = () => {
{STAGE_ANNOUNCEMENTS[stage]}
- + diff --git a/src/js/components/common/demo/DemoCallout.tsx b/src/js/components/common/demo/DemoCallout.tsx index 4df0a8c14..69f2746ac 100644 --- a/src/js/components/common/demo/DemoCallout.tsx +++ b/src/js/components/common/demo/DemoCallout.tsx @@ -1,4 +1,6 @@ import React from 'react' +import { __ } from '@wordpress/i18n' +import { Button } from '../Button' export interface CalloutContent { step: string @@ -10,17 +12,24 @@ export interface CalloutContent { * Commentary on what a walkthrough is doing at the current stage, floating in * the corner of the viewport so it stays out of the page's flow. * - * The demo pages announce each stage through their own live region, so this is - * hidden from assistive technology rather than repeating it. + * The demo pages announce each stage through their own live region, so the + * commentary is hidden from assistive technology rather than repeating it. The + * close button stays exposed, since it is the walkthrough's exit. */ -export const DemoCallout: React.FC<{ callout?: CalloutContent }> = ({ callout }) => +export const DemoCallout: React.FC<{ callout?: CalloutContent, onClose: VoidFunction }> = ({ callout, onClose }) => callout // Keyed on the content rather than the stage: consecutive stages can // share a callout, and remounting between them replays the entrance // animation as a flicker. - ?