Automattic / wc-calypso-bridge

20 stars 4 forks source link

Ecommerce Admin Menu: Remove the duplicate My Home menu #1460

Closed arthur791004 closed 6 months ago

arthur791004 commented 6 months ago

Changes proposed in this Pull Request:

Closes https://github.com/Automattic/wp-calypso/issues/89398.

The https://github.com/Automattic/wc-calypso-bridge/pull/1449 created a side effect so that there are duplicate My Home menu on the Woo Express site with the classic interface. Before that patch, the jetpack_admin_menu_class returned the Ecommerce_Atomic_Admin_Menu, and then the My Home menu that pointed to the Calypso wasn't added. However, after that patch, the filter returned the Admin_Menu from Jetpack and it registered the My Home menu here. As it's the side effect from that PR, I think it would be better to remove the menu by Woo Express.

In the future, we can discuss whether to avoid the Admin_Menu from Jetpack registering the My Home menu since the menu doesn't seem to be necessary on the classic view.

Before After
image image

How to test the changes in this Pull Request:

  1. Create a new WoA site with Entrepreneur plan
  2. Build and sync changes from your local to the WoA site
    npm install
    npm run build
    rsync -azP --delete --delete-after --exclude={'.config','.idea','.git','node_modules/'} ${WCCALYPSOBRIDGE_LOCAL_DIR} ${REMOTE_SSH_HOST}:/srv/htdocs/wp-content/mu-plugins/wpcomsh/vendor/automattic/wc-calypso-bridge/
  3. Go to https://wordpress.com/settings/general/
  4. Make sure there is only a single My Home menu that points to /wp-admin/admin.php?page=wc-admin

Other information:

FOR PR REVIEWER ONLY:

github-actions[bot] commented 6 months ago

Size Change: 0 B

Total Size: 197 kB

ℹ️ View Unchanged | Filename | Size | | :--- | :---: | | `./build/53.js` | 1.05 kB | | `./build/index.css` | 883 B | | `./build/index.js` | 122 kB | | `./build/marketing.js` | 58 kB | | `./build/payment-gateway-suggestions.css` | 1.25 kB | | `./build/payment-gateway-suggestions.js` | 6.46 kB | | `./build/plugins.js` | 3.92 kB | | `./build/style-index.css` | 2.15 kB | | `./build/style-marketing.css` | 805 B |

compressed-size-action