Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MU WPCOM: Port the starter-page-templates feature from ETK #38475

Merged
merged 30 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
2fe2d69
Initial commit
miksansegundo Jul 23, 2024
8e92ee9
Fix build compilation errors due to dependencies
miksansegundo Jul 23, 2024
cb3b0c3
changelog
miksansegundo Jul 23, 2024
6653c30
Update dependency
miksansegundo Jul 24, 2024
3eac478
Remove typing to avoid adding peer dependency
miksansegundo Jul 24, 2024
0715f7f
Update dependency
miksansegundo Jul 24, 2024
535a281
Fix for SassError: Can't find stylesheet to import
miksansegundo Jul 24, 2024
97e16f0
Update page-pattern-modal package
miksansegundo Jul 24, 2024
a96e716
Revert import path change
miksansegundo Jul 24, 2024
e758694
Fix missing __i18n_text_domain__ in page-pattern-modal package
miksansegundo Jul 24, 2024
941fae2
Refactoring and cleaning up feature code
miksansegundo Jul 25, 2024
552dfe0
Show starter-page-templates feature instead of core modal
miksansegundo Jul 25, 2024
8f507e3
Fix lint
miksansegundo Jul 25, 2024
1d2890c
Fix lint
miksansegundo Jul 25, 2024
0d49aa2
Revert cleaning code
miksansegundo Jul 25, 2024
6ea7227
Fix namespace
miksansegundo Jul 25, 2024
f5c821e
Fix lint
miksansegundo Jul 25, 2024
61edf76
Fix lint
miksansegundo Jul 25, 2024
d31c36b
Fix lint
miksansegundo Jul 25, 2024
fc9cadb
Add back sideload images
miksansegundo Jul 26, 2024
692dd9f
Add comment
miksansegundo Jul 26, 2024
477b844
Fix lint and disable some Phan checks
miksansegundo Jul 26, 2024
fc062e1
Fix version
miksansegundo Jul 26, 2024
e670036
Fix lint
miksansegundo Jul 26, 2024
277f6d9
Move initialization and checks
miksansegundo Jul 26, 2024
eeacab4
Move class initialization
miksansegundo Jul 26, 2024
a310063
Fix versions
arthur791004 Jul 29, 2024
ddcc4e3
Fix tests
arthur791004 Jul 29, 2024
36e2449
Fix the modal is not shown
arthur791004 Jul 29, 2024
9ce7827
Merge branch 'trunk' into port/starter-page-templates
arthur791004 Jul 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 40 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: added

MU WPCOM: Port the starter-page-templates feature from ETK
2 changes: 1 addition & 1 deletion projects/packages/jetpack-mu-wpcom/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
},
"autotagger": true,
"branch-alias": {
"dev-trunk": "5.52.x-dev"
"dev-trunk": "5.53.x-dev"
},
"textdomain": "jetpack-mu-wpcom",
"version-constants": {
Expand Down
5 changes: 4 additions & 1 deletion projects/packages/jetpack-mu-wpcom/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@automattic/jetpack-mu-wpcom",
"version": "5.52.1-alpha",
"version": "5.53.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": {
Expand Down Expand Up @@ -45,10 +45,12 @@
"webpack-cli": "4.9.1"
},
"dependencies": {
"@automattic/color-studio": "2.6.0",
"@automattic/i18n-utils": "1.2.3",
"@automattic/jetpack-base-styles": "workspace:*",
"@automattic/jetpack-shared-extension-utils": "workspace:*",
"@automattic/typography": "1.0.0",
"@automattic/page-pattern-modal": "1.1.5",
"@preact/signals": "^1.2.2",
"@sentry/browser": "7.80.1",
"@tanstack/react-query": "^5.15.5",
Expand All @@ -68,6 +70,7 @@
"preact": "^10.13.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"redux": "^4.2.1",
"wpcom-proxy-request": "^7.0.3"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* Jetpack_Mu_Wpcom main class.
*/
class Jetpack_Mu_Wpcom {
const PACKAGE_VERSION = '5.52.1-alpha';
const PACKAGE_VERSION = '5.53.0-alpha';
const PKG_DIR = __DIR__ . '/../';
const BASE_DIR = __DIR__ . '/';
const BASE_FILE = __FILE__;
Expand Down Expand Up @@ -146,7 +146,7 @@ public static function load_wpcom_user_features() {
}

/**
* Laod ETK features that need higher priority than the ETK plugin.
* Load ETK features that need higher priority than the ETK plugin.
* Can be moved back to load_features() once the feature no longer exists in the ETK plugin.
*/
public static function load_etk_features() {
Expand All @@ -165,6 +165,7 @@ public static function load_etk_features() {
require_once __DIR__ . '/features/wpcom-documentation-links/wpcom-documentation-links.php';
require_once __DIR__ . '/features/wpcom-global-styles/index.php';
require_once __DIR__ . '/features/wpcom-whats-new/wpcom-whats-new.php';
require_once __DIR__ . '/features/starter-page-templates/class-starter-page-templates.php';
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function register_patterns() {
// We prefer to show the starter page patterns modal of wpcom instead of core
// if it's available. Hence, we have to update the block types of patterns
// to disable the core's.
if ( class_exists( '\A8C\FSE\Starter_Page_Templates' ) ) {
if ( class_exists( '\A8C\FSE\Starter_Page_Templates' ) || class_exists( '\Automattic\Jetpack\Jetpack_Mu_Wpcom\Starter_Page_Templates' ) ) {
$this->update_pattern_block_types();
}

Expand Down
Loading
Loading