Open mattsherman opened 3 years ago
Thanks for creating this clean-up issue @mattsherman 🙇 - I was wondering if we have searched the wp-calypso code base to make sure there are no other parts of calypso that might be importing components from the extensions/woocommerce
directory?
I did a quick ( read not exhaustive ) search locally and found the following:
blocks/signup-form/index.jsx
58:import TextControl from 'calypso/extensions/woocommerce/components/text-control';
blocks/login/login-form.jsx
28:import TextControl from 'calypso/extensions/woocommerce/components/text-control';
blocks/login/index.jsx
45:import WooCommerceConnectCartHeader from 'calypso/extensions/woocommerce/components/woocommerce-connect-cart-header';
signup/steps/user/index.jsx
39:import WooCommerceConnectCartHeader from 'calypso/extensions/woocommerce/components/woocommerce-connect-cart-header';
state/stats/lists/utils.js
145: * Return delta data in a format used by 'extensions/woocommerce/app/store-stats`. The fields array is matched to
Looks like we might need to relocate the TextControl
component that is being used in a few other places - iirc that is a pretty lightweight rich text editor that uses TinyMCE.
There are also some image assets located in https://github.com/Automattic/wp-calypso/tree/trunk/static/images/extensions/woocommerce that we could likely remove too after validating they aren't used elsewhere.
@timmyc I should have done that search. Good catch. Wow, that seems pretty "wrong" to me to have non-extension code in Calypso importing bits from the extension... seems to violate the separation that should exist. I'll add those things to the task list, and also bump up the estimate a bit on this to accomodate those.
Yeah I totally agree that the code probably should have been moved to a shared components folder prior to being used elsewhere. The only reason I thought to search for that was I had been pinged for reviews on that component in the past year so figured it must have been in use by others.
I'll add those things to the task list, and also bump up the estimate a bit on this to accomodate those.
You da best! Thank you!!!
Implementer: note that WooCommerceConnectCartHeader
is WooCommercConnectCartHeader
in the component source file (note the missing e
).
Move the client/extensions/woocommerce/components/text-control component to shared components folder (this is used by code outside of the extension) (@mattsherman)
I'm grabbing this first task. Other tasks should be able to be worked on in parallel by others
Part of the Sunset Store project. See pbIJXs-sE-p2 for more details.
Once Store removal has been in production for a few weeks, and we are confident that users are accessing the new WooCommerce experience without issue, we should cleanup the codebase and remove
client/extensions/woocommerce
code.Acceptance criteria
Tasks
client/extensions/woocommerce/components/text-control
component to shared components folder (this is used by code outside of the extension) (@mattsherman)~ Moved to separate issue (https://github.com/Automattic/wp-calypso/issues/50809)client/extensions/woocommerce/components/woocommerce-connect-cart-header
component to shared components fold (this is used by code outside of the extension) (@mattsherman)/static/images/extensions/woocommerce
calypso_store_post_sunset
MC stat and see if there are enough redirects still occurring to warrant doing anything about them