-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Allow the user to select multiple images in the Media Library #35722
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
Conversation
Test Results SummaryCommit SHA: 9a29f9c
To view the full API test report, click here. To view the full E2E test report, click here. To view all test reports, visit the WooCommerce Test Reports Dashboard. |
louwie17
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.
This overall tested well @octaedro, I did notice an issue when I tried to add several images were one of them would already be in the list. This prevented all the selected images from being added. Could we just filter out the already selected images?
| images, | ||
| files, | ||
| 'id' | ||
| ).length === 0 |
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.
This prevents any image from being added as soon as one duplicate image is part of the list.
Could we just filter out the duplicate images? and add all the newly selected images?
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.
Good idea! I fixed that in the commit 9a29f9c
# Conflicts: # packages/js/components/src/media-uploader/media-uploader.tsx
# Conflicts: # plugins/woocommerce-admin/client/products/sections/images-section.tsx
51a84ec to
9a29f9c
Compare
|
Thank you @louwie17 for your review. |
louwie17
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.
Thanks for fixing the repeated images issue, nice work!
This is still testing well, LGTM 🚀
All Submissions:
Changes proposed in this Pull Request:
This PR adds the code to allow users to select multiple images in the Media Library.
Closes #35181.
How to test the changes in this Pull Request:
new-product-management-experience.Products>Add New (MVP)>Images.Choose imagesand select more than one image (by pressingcommandand selecting them).Other information:
pnpm --filter=<project> changelog add?FOR PR REVIEWER ONLY: