diff --git a/projects/packages/jetpack-mu-wpcom/changelog/update-verbum-readme-sync-step b/projects/packages/jetpack-mu-wpcom/changelog/update-verbum-readme-sync-step new file mode 100644 index 0000000000000..a7a16379a2574 --- /dev/null +++ b/projects/packages/jetpack-mu-wpcom/changelog/update-verbum-readme-sync-step @@ -0,0 +1,4 @@ +Significance: minor +Type: changed + +Updated Readme to include Verbum issue board and clarify code syncing steps diff --git a/projects/packages/jetpack-mu-wpcom/composer.json b/projects/packages/jetpack-mu-wpcom/composer.json index a1c8eeed1957e..4c587a35cc6e6 100644 --- a/projects/packages/jetpack-mu-wpcom/composer.json +++ b/projects/packages/jetpack-mu-wpcom/composer.json @@ -50,7 +50,7 @@ }, "autotagger": true, "branch-alias": { - "dev-trunk": "5.11.x-dev" + "dev-trunk": "5.12.x-dev" }, "textdomain": "jetpack-mu-wpcom", "version-constants": { diff --git a/projects/packages/jetpack-mu-wpcom/package.json b/projects/packages/jetpack-mu-wpcom/package.json index 3119ad8383a86..b72001b13dfd5 100644 --- a/projects/packages/jetpack-mu-wpcom/package.json +++ b/projects/packages/jetpack-mu-wpcom/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@automattic/jetpack-mu-wpcom", - "version": "5.11.1-alpha", + "version": "5.12.0-alpha", "description": "Enhances your site with features powered by WordPress.com", "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/packages/jetpack-mu-wpcom/#readme", "bugs": { 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 936eda1090106..94d1c570c0c7e 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 @@ -13,7 +13,7 @@ * Jetpack_Mu_Wpcom main class. */ class Jetpack_Mu_Wpcom { - const PACKAGE_VERSION = '5.11.1-alpha'; + const PACKAGE_VERSION = '5.12.0-alpha'; const PKG_DIR = __DIR__ . '/../'; const BASE_DIR = __DIR__ . '/'; const BASE_FILE = __FILE__; diff --git a/projects/packages/jetpack-mu-wpcom/src/features/verbum-comments/README.md b/projects/packages/jetpack-mu-wpcom/src/features/verbum-comments/README.md index 777d1f80c307c..15025a0bb9d20 100644 --- a/projects/packages/jetpack-mu-wpcom/src/features/verbum-comments/README.md +++ b/projects/packages/jetpack-mu-wpcom/src/features/verbum-comments/README.md @@ -4,15 +4,13 @@ A word, discourse, or reason; connoting an appeal to rational discourse. ## Description -Verbum is the comment UX for WordPress.com and Jetpack and is the successor to [Highlander Comments](../highlander-comments/highlander-comments.php). It is built with [Preact](https://preactjs.com/) and uses [Vite](https://vitejs.dev/) for bundling. This was chosen to limit the size of the bundle and minimize impact on the page performance metrics. +Verbum is the comment UX for WordPress.com and Jetpack and is the successor to [Highlander Comments](../highlander-comments/highlander-comments.php). It is built with [Preact](https://preactjs.com/) and uses [Webpack](https://webpack.js.org/) for bundling. This was chosen to limit the size of the bundle and minimize impact on the page performance metrics. ## Technical Details ### Basics -Page performance impact was highly considered in this plugin. For that reason Preact was chosen to minimize the bundle size as the basic ReactDOM modules needed for rendering were very large. Preact is best utilized with Vite which compiles and bundles everything into the `dist` directory. - -From a developer experience it functions the same as React with Webpack. You can use all the typical npm scripts like `start`, `build`, and `lint`. +Page performance impact was highly considered in this plugin. For that reason Preact was chosen to minimize the bundle size as the basic ReactDOM modules needed for rendering were very large. Because we are using a Preact based plugin to manage the user experience, we overwrite and remove any of the basic WordPress comment section hooks. We remove everything that is not needed and output our plugin in place of the submit button. This also means that we do not utilize any of the default settings for the comment section that would allow others to overwrite them. These are typically used to change the wording on buttons and headings or inject your own custom components. If someone were to selfishly overwrite the submit button it would prevent the entire comment form from loading. @@ -98,14 +96,25 @@ Note: These commands should be ran from `/jetpack-mu-wpcom` root directory. * `pnpm build-production-js` - Build Verbum production code. * `pnpm lint` - Check for lint issues in the code. * `pnpm run watch` - Watch file changes -* `jetpack rsync mu-wpcom-plugin` - Sync local files to development environment. This command tool will ask you for the remote destination after your input it in the command line. Ensure the remote path is correct depending on the environment you're targetting. If you're targetting your sandbox, the remote destination should look like this: `USERNAME@HOSTNAME:~/public_html/wp-content/mu-plugins/jetpack-plugin/production`. You will also need to add `define( 'JETPACK_AUTOLOAD_DEV', true );` to mu-plugins/0-sandbox.php. More details for Simple site testing: [https://fieldguide.automattic.com/developing-jetpack/jetpack-mu-wpcom/#simple-testing]. If you're targetting your WoA site, the remote destination should look like this: `mywoadevsite.wordpress.com@sftp.wp.com:htdocs/wp-content/plugins/jetpack-mu-wpcom-plugin-dev`. More details for WoA testing: [https://fieldguide.automattic.com/developing-jetpack/jetpack-mu-wpcom/#woa]. +* `jetpack rsync mu-wpcom-plugin` - Sync local files to development environment. This command tool will ask you for the remote destination after your input it in the command line. Ensure the remote path is correct depending on the environment you're targetting. If you're targetting your sandbox, the remote destination should look like this: `USERNAME@HOSTNAME:~/public_html/wp-content/mu-plugins/jetpack-plugin/production`. You will also need to add `define( 'JETPACK_AUTOLOAD_DEV', true );` to mu-plugins/0-sandbox.php. More details for Simple site testing: [PCYsg-Osp-p2#simple-testing]. If you're targetting your WoA site, the remote destination should look like this: `mywoadevsite.wordpress.com@sftp.wp.com:htdocs/wp-content/plugins/jetpack-mu-wpcom-plugin-dev`. More details for WoA testing: [PCYsg-Osp-p2#woa]. + +In most cases you will only need to sync the code to your sandbox, since Verbum is loaded through a Simple Site in all scenarios. There may be a case where you want to confirm that your PHP changes are not negatively impacting WoA sites (for example, checking for any errors/warning on wp-admin pages). In this case, you will want to sync the code directly to your WoA using the steps above. ### Local Development: To test your changes, you will first need to build the Verbum code using one of the build commands above and sync the changes to your development environment. The build commands will clean the `jetpack-mu-wpcom/src/build` directory and output the newly bundled files (`/build/verbum-comments`). One method to quickly sync and test changes is to use the `jetpack rsync mu-wpcom-plugin` command. After syncing the files, make sure that you sandbox your testing site to see your latest changes. +Reminder: + +On Simple Sites: Sync the Verbum code changes to your sandbox and sandbox the site your testing. +On Atomic Sites: Sync the Verbum code changes to your sandbox and sandbox `jetpack.wordpress.com`. + ### After Merge - Deploy process 1. Create a Jetpack PR, review it, and merge. -2. To initiate a Simple Site deployment, follow these instructions: [https://fieldguide.automattic.com/developing-jetpack/jetpack-mu-wpcom/#simple-deployment]. The Jetpack release team (#jetpack-release) will also do a daily deployment for any merged changes, if you do not initiate a manual deployment. -3. To initate a WoA deployment, follow these instructions: [https://fieldguide.automattic.com/developing-jetpack/jetpack-mu-wpcom/#woa-deployment]. A new version of `jetpack-mu-wpcom` will be released weekly, if you do not initiate a manual deployment. \ No newline at end of file +2. To initiate a Simple Site deployment, follow these instructions: [PCYsg-Osp-p2#simple-deployment]. The Jetpack release team (#jetpack-release) will also do a daily deployment for any merged changes, if you do not initiate a manual deployment. +3. To initate a WoA deployment, follow these instructions: [PCYsg-Osp-p2#woa-deployment]. A new version of `jetpack-mu-wpcom` will be released weekly, if you do not initiate a manual deployment. + +### Where to track new Verbum Issues + +If you stumble upon any issues or have any suggestions for possible changes to Verbum, you can find the relevant project board here: https://github.com/orgs/Automattic/projects/908/views/1. \ No newline at end of file diff --git a/projects/plugins/mu-wpcom-plugin/changelog/update-verbum-readme-sync-step b/projects/plugins/mu-wpcom-plugin/changelog/update-verbum-readme-sync-step new file mode 100644 index 0000000000000..9aa70e3ec1f75 --- /dev/null +++ b/projects/plugins/mu-wpcom-plugin/changelog/update-verbum-readme-sync-step @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: Updated composer.lock. + + diff --git a/projects/plugins/mu-wpcom-plugin/composer.lock b/projects/plugins/mu-wpcom-plugin/composer.lock index 823a77a9f3fc7..4fe370498a9a8 100644 --- a/projects/plugins/mu-wpcom-plugin/composer.lock +++ b/projects/plugins/mu-wpcom-plugin/composer.lock @@ -129,7 +129,7 @@ "dist": { "type": "path", "url": "../../packages/jetpack-mu-wpcom", - "reference": "2aacc54b3f715dd4899aa9c3610c85b0e70b7e8b" + "reference": "dae0cc7eec39d1aa18226cc4a392bf989e4ee2eb" }, "require": { "automattic/jetpack-assets": "@dev", @@ -151,7 +151,7 @@ }, "autotagger": true, "branch-alias": { - "dev-trunk": "5.11.x-dev" + "dev-trunk": "5.12.x-dev" }, "textdomain": "jetpack-mu-wpcom", "version-constants": {