-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Gutenberg] Support Multiple uploads in Gallery #13404
[Gutenberg] Support Multiple uploads in Gallery #13404
Conversation
You can trigger an installable build for these changes by visiting CircleCI here. |
Generated by 🚫 dangerJS |
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 via Image, Media & Text, and Gallery blocks: everything works as expected. Nice work @chipsnyder 🎉
LGTM!
// Append the first item via callback given by Gutenberg. | ||
if let firstItem = assets.first { | ||
insertOnBlock(with: firstItem) | ||
insertOnBlock(with: [firstItem]) | ||
} | ||
// Append the rest of images via `.appendMedia` event. | ||
// Ideally we would send all picked images via the given callback, but that seems to not be possible yet. |
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.
np: although not part of the changeset, should this comment be updated (i.e. does this PR make this possible now)?
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 question! When I tested it out by forcing the Image Block down the multiple upload path with all of the images, it would only upload the first image and drop the rest. With the Gallery Block enabled now, it might be worth revisiting how to handle this case.
Fixes wordpress-mobile/gutenberg-mobile#1863
To Test:
Gallary Block:
Expect: All images should be added to the Gallery Block in the selected order
Image Block:
Expect: All images should be added as separate Image Blocks
Media & Text:
Expect: The first image should be added to the Media block and the rest of the images should be added as separate Image Blocks
PR submission checklist:
RELEASE-NOTES.txt
if necessary.