-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Add experimental import products task #32835
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
Add experimental import products task #32835
Conversation
chihsuan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested well. Just have three UI and webpack import issues.
| import { importTypes } from './importTypes'; | ||
| import './style.scss'; | ||
| import useProductTypeListItems from '../experimental-products/use-product-types-list-items'; | ||
| import Stacks from '../experimental-products/stack'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@moon0326 I found Webpack is showing warnings.
[0] Conflicting order. Following module has been added:
[0] * css ../../node_modules/.pnpm/[email protected][email protected]/node_modules/css-loader/dist/cjs.js!../../node_modules/.pnpm/[email protected]/node_modules/postcss-loader/src/index.js??ruleSet[1].rules[3].use[2]!../../node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[3].use[3]!./client/tasks/fills/experimental-import-products/cards.scss
[0] despite it was not able to fulfill desired ordering with these modules:
[0] * css ../../node_modules/.pnpm/[email protected][email protected]/node_modules/css-loader/dist/cjs.js!../../node_modules/.pnpm/[email protected]/node_modules/postcss-loader/src/index.js??ruleSet[1].rules[3].use[2]!../../node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[3].use[3]!./client/tasks/fills/experimental-products/stack.scss
[0] - couldn't fulfill desired order of chunk group(s)
[0]
[0] webpack 5.70.0 compiled with 1 warning in 10517 ms
[0] No issues found.
[0] assets by status 9.53 MiB [cached] 107 assets
[0] assets by path . 9.13 MiB 116 assets
[0] cached modules 4.44 MiB (javascript) 723 KiB (css/mini-extract) 32.1 KiB (runtime) [cached] 2087 modules
[0]
[0] WARNING in chunk client_tasks_fills_experimental-import-products_CardList_tsx-client_tasks_fills_experimental--c7ef12 [mini-css-extract-plugin]
[0] Conflicting order. Following module has been added:
[0] * css ../../node_modules/.pnpm/[email protected][email protected]/node_modules/css-loader/dist/cjs.js!../../node_modules/.pnpm/[email protected]/node_modules/postcss-loader/src/index.js??ruleSet[1].rules[3].use[2]!../../node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[3].use[3]!./client/tasks/fills/experimental-import-products/cards.scss
[0] despite it was not able to fulfill desired ordering with these modules:
[0] * css ../../node_modules/.pnpm/[email protected][email protected]/node_modules/css-loader/dist/cjs.js!../../node_modules/.pnpm/[email protected]/node_modules/postcss-loader/src/index.js??ruleSet[1].rules[3].use[2]!../../node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[3].use[3]!./client/tasks/fills/experimental-products/stack.scss
[0] - couldn't fulfill desired order of chunk group(s)
I think we could fix this by reordering Stacks/CardList imports.
import Stacks from '../experimental-products/stack';
import CardList from './CardList';
import { importTypes } from './importTypes';
import './style.scss';
import useProductTypeListItems from '../experimental-products/use-product-types-list-items';
The order needs to be consistent everywhere the imports are referenced; otherwise webpack doesn't know how to order them when it creates the chunks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the catch! Updated in d0b500a
| ), | ||
| }, | ||
| { | ||
| key: 'from-cart2cart' as const, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @verofasulo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For "FROM CART2CART", only the "Learn more" link is clickable. But for "FROM A CSV FILE", the entire card is clickable.
No, both the cards are entirely clickable :) We added the link 'Learn more" after conducting some tests as it reassures the users they are not starting any flow but only collecting information about this option. @chihsuan
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in 84fe952
| content: string | JSX.Element; | ||
| before: JSX.Element; | ||
| }; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The second screenshot from #32143 shows it as black. Do we need to change the color to blue on hover?
cc @verofasulo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@moon0326 Ah, sorry, I just checked again. It's actually blue now and I think we should change it to black.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chihsuan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! @moon0326 Looks good and tested well. 👍 🚀
|
Looks like two tests are failing with |
|
Hi @moon0326, thanks for merging this pull request. Please take a look at these follow-up tasks you may need to perform:
|



All Submissions:
Changes proposed in this Pull Request:
Closes #32788 .
This PR adds experimental import products task that replaces the default
Add my producttask only when the customers chooseYesto theCurrently selling elsewhere?question during the OBW.How to test the changes in this Pull Request:
plugins/woocommerce/client/admin/config/development.jsonand changeexperimental-import-products-task totruepnpm nx dev woocommerce-adminYes, on another platformin theBusiness Detailsstep.WoocCommerce -> Homeand clickAdd my productsImport your productsScreenshots
Collapsed:
Expanded:

Other information:
pnpm nx affected --target=changelog?FOR PR REVIEWER ONLY: