Skip to content

Commit

Permalink
Update/action button to be reusable (#41361)
Browse files Browse the repository at this point in the history
* Add redbubble and notice when paid plan is missing plugin(s).

* Add activate-multiple-plugins endpoint & logic.

* Delay last-backup-failed red-bubble until 30 min after purchase. Also fix $not_shown_products.

* Refactor how we derive shown_products & not_shown_products.

* Cleanup & add GlobalNotice after successfull activation/installation.

* Remove single product endpoints from mj REST_Products.

* First commit

* Move logic to action button component

* changelog

* Fix status loading indicator

* Get rid of outdated comments

* Remove unnecessary array slug

* Fix accidental duplicate functions

* Remove duplicate

* Fix warnings

* Remove duplicate endpoint

* Remove log

* Update phan

---------

Co-authored-by: Bryan Elliott <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/13042692163

Upstream-Ref: Automattic/jetpack@0818fd2
  • Loading branch information
CodeyGuyDylan authored and matticbot committed Jan 30, 2025
1 parent c99f801 commit 0c45a4a
Show file tree
Hide file tree
Showing 10 changed files with 175 additions and 174 deletions.
1 change: 1 addition & 0 deletions jetpack_vendor/automattic/jetpack-my-jetpack/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ This is an alpha version! The changes listed here are not final.
- My Jetpack: Add red bubble and notice when pain plan is missing plugin.

### Changed
- Make Action Button component more reusable
- Updated package dependencies.
- Updating My Jetpack interstitial modal with new styles and layout.

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('jetpack-connection', 'jetpack-script-data', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => 'ac994e8edce93a330553');
<?php return array('dependencies' => array('jetpack-connection', 'jetpack-script-data', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => 'f9de2142837259dab06d');

Large diffs are not rendered by default.

148 changes: 74 additions & 74 deletions jetpack_vendor/automattic/jetpack-my-jetpack/build/index.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ public static function edit_permissions_callback() {
* Callback for activating products
*
* @param \WP_REST_Request $request The request object.
* @return \WP_REST_Response
* @return \WP_REST_Response|\WP_Error
*/
public static function activate_products( $request ) {
$products_array = $request->get_param( 'products' );
Expand Down Expand Up @@ -273,7 +273,7 @@ public static function activate_products( $request ) {
* Callback for deactivating products
*
* @param \WP_REST_Request $request The request object.
* @return \WP_REST_Response
* @return \WP_REST_Response|\WP_Error
*/
public static function deactivate_products( $request ) {
$products_array = $request->get_param( 'products' );
Expand Down Expand Up @@ -306,7 +306,7 @@ public static function deactivate_products( $request ) {
* Callback for installing (and activating) multiple product plugins.
*
* @param \WP_REST_Request $request The request object.
* @return \WP_REST_Response
* @return \WP_REST_Response|\WP_Error
*/
public static function install_plugins( $request ) {
$products_array = $request->get_param( 'products' );
Expand Down
2 changes: 1 addition & 1 deletion jetpack_vendor/i18n-map.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
),
'jetpack-my-jetpack' => array(
'path' => 'jetpack_vendor/automattic/jetpack-my-jetpack',
'ver' => '5.4.1-alpha1738107648',
'ver' => '5.4.1-alpha1738194788',
),
'jetpack-password-checker' => array(
'path' => 'jetpack_vendor/automattic/jetpack-password-checker',
Expand Down
58 changes: 29 additions & 29 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-a8c-mc-stats",
"reference": "ad27ed599b508f92f30b980e18a54999fd23f055"
"reference": "de7e7ba0a0fbb20bdbacc672c7c123b038e3a9a1"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -63,7 +63,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-admin-ui",
"reference": "aa72b0ec1a541fd181d3926037df43d446c20acb"
"reference": "5f5c88b9a17e55ba358581fc67fa901a46a65c28"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -131,7 +131,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-assets",
"reference": "62365a61f358dae49d55c080e3edaed990054e0b"
"reference": "2c884f25e7f81156a44f534c2ea2a9bad265c871"
},
"require": {
"automattic/jetpack-constants": "^3.0.1",
Expand Down Expand Up @@ -203,7 +203,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-autoloader",
"reference": "b1806da700a9fc281ef66625e4410efd1db5f286"
"reference": "5ca8bd0d62b8f4d6141ef8040ca88beace478adc"
},
"require": {
"composer-plugin-api": "^2.2",
Expand Down Expand Up @@ -274,7 +274,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-boost-core",
"reference": "cd14426179adddb8936e1aa97df677b231596aad"
"reference": "98eb3b75348ae01966261bf005040133135b805d"
},
"require": {
"automattic/jetpack-connection": "^6.3.2-alpha",
Expand Down Expand Up @@ -332,7 +332,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-boost-speed-score",
"reference": "30971f077a67e02778298797b61546905c1f1e8c"
"reference": "41693c0a40e613fdc0df3fbb9eb5cef88fdec7de"
},
"require": {
"automattic/jetpack-boost-core": "^0.3.4",
Expand Down Expand Up @@ -399,7 +399,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-composer-plugin",
"reference": "537ffb55786ec268228b97e31e702166cd2c44d6"
"reference": "9b035249fffdcb745d9cf0187d7e6aa00f84b633"
},
"require": {
"composer-plugin-api": "^2.2",
Expand Down Expand Up @@ -462,7 +462,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-config",
"reference": "138ba5f19ac64740e999ab8c4c71028ee07759d7"
"reference": "dc3147b99ad47bbab7df4fd2536bd91aa2ce1636"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -537,7 +537,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-connection",
"reference": "002154936293ec7913fa0809680fa2e932ecefec"
"reference": "bdf753ca9408d860da9c70dab1fab24dd09575b9"
},
"require": {
"automattic/jetpack-a8c-mc-stats": "^3.0.0",
Expand Down Expand Up @@ -630,7 +630,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-constants",
"reference": "53e4f1c151ffac9c5d0bb351833fa056384bb676"
"reference": "755063e773137c66f534874292ee0407532513b3"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -687,7 +687,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-device-detection",
"reference": "f4f81592a6ccea14b6cf51e7a3bd80c32cdd5667"
"reference": "db963a4e1b15cb8e3697dbbba86f85c56f9db72b"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -743,7 +743,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-explat",
"reference": "37153ef690dc6a442f79956c5ee65a006cc1670a"
"reference": "a24a3e492389c7605d7c5159f57199a78827687c"
},
"require": {
"automattic/jetpack-connection": "^6.3.2-alpha",
Expand Down Expand Up @@ -821,7 +821,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-ip",
"reference": "09636c93a478c18244cc0ecd455a89a44cccf191"
"reference": "6997f4257e6699f25f66dfe33c36381577b2d1e3"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -882,7 +882,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-jitm",
"reference": "445b83e8de9852fe1b6ae80b0c7293c05816a2f6"
"reference": "d68e61621ac0e898ec19ecb9f520c918724cbe9d"
},
"require": {
"automattic/jetpack-a8c-mc-stats": "^3.0.0",
Expand Down Expand Up @@ -960,7 +960,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-licensing",
"reference": "eff0560b40689862094e9bfa36d49a0d73404e99"
"reference": "52328bcf74aedcbd92b1fc9d92a2592a8856bc46"
},
"require": {
"automattic/jetpack-connection": "^6.3.2-alpha",
Expand Down Expand Up @@ -1025,7 +1025,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-logo",
"reference": "d872dcd3164856f964af5df7b8af6a9f6b107ef5"
"reference": "26eff358c5ac041fb7713038f45b04bf3d642661"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -1076,12 +1076,12 @@
},
{
"name": "automattic/jetpack-my-jetpack",
"version": "5.4.1-alpha.1738107648",
"version_normalized": "5.4.1.0-alpha1738107648",
"version": "5.4.1-alpha.1738194788",
"version_normalized": "5.4.1.0-alpha1738194788",
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-my-jetpack",
"reference": "277e60307413dd291556683006ccaede5bf7aa6f"
"reference": "429df6723932490baa4721392f0439bac6cb24aa"
},
"require": {
"automattic/jetpack-admin-ui": "^0.5.1",
Expand Down Expand Up @@ -1186,7 +1186,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-password-checker",
"reference": "e4bde72955220b3ca881cbed528cb07116dbf45a"
"reference": "2103019061f4d2bf07cb4e09ccc6eed5120a669a"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -1250,7 +1250,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-plans",
"reference": "6226608a2b0c3998e6d6d418b1c5c08c0f10a163"
"reference": "d6bd905e20ee0d120b1ce29fb827a1d7fb52d73a"
},
"require": {
"automattic/jetpack-connection": "^6.3.2-alpha",
Expand Down Expand Up @@ -1321,7 +1321,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-plugins-installer",
"reference": "9d42c8192bc65bc916721608515fb9b14315ea3e"
"reference": "f5ae264c29cc39524779fc91892dfd8b3dba4fb7"
},
"require": {
"automattic/jetpack-a8c-mc-stats": "^3.0.0",
Expand Down Expand Up @@ -1380,7 +1380,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-protect-models",
"reference": "39bfddf03960ef4a8fb181c6a9199ee380b7b9d7"
"reference": "22b33c1858f85731ccfa36433c3a6bdc92a65b6c"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -1453,7 +1453,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-protect-status",
"reference": "f8e6b77abf6b3cc9de370e31935948d56a6ac842"
"reference": "588431893bae3c3bbf533f4ca4e4d8b55e62f0d4"
},
"require": {
"automattic/jetpack-connection": "^6.3.2-alpha",
Expand Down Expand Up @@ -1531,7 +1531,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-redirect",
"reference": "44d7f6d4637a6bd13622641611ab084d21cd5a03"
"reference": "354cfef13768d6dc5651074d8167e475a590f96e"
},
"require": {
"automattic/jetpack-status": "^5.0.2",
Expand Down Expand Up @@ -1589,7 +1589,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-roles",
"reference": "8976577ab445d6ee5cf95c9478067f290e5f8df2"
"reference": "7d24669164491403da245942f73d66fbb600e215"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -1646,7 +1646,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-status",
"reference": "07e9028f8bf7d128ec24856b1f492c8381d25ce0"
"reference": "2704c92be78e53d59e91334eece85b7889baf107"
},
"require": {
"automattic/jetpack-constants": "^3.0.1",
Expand Down Expand Up @@ -1713,7 +1713,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-sync",
"reference": "3e519f1cf637257499270b7b2fd9c9bb98a5d70b"
"reference": "154300c50693d72e114a82805191bffddea086dd"
},
"require": {
"automattic/jetpack-connection": "^6.3.2-alpha",
Expand Down Expand Up @@ -1794,7 +1794,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-videopress",
"reference": "256fa15e33063cbce5338d633ad9a65b97c82dc4"
"reference": "60af9434c00d74ee24b4220cf99a36a17f4dfe4f"
},
"require": {
"automattic/jetpack-admin-ui": "^0.5.1",
Expand Down
Loading

0 comments on commit 0c45a4a

Please sign in to comment.