Skip to content

[Gutenberg] Support Multiple uploads in Gallery#13404

Merged
chipsnyder merged 2 commits intofeature/gallery-upload-optionsfrom
rnmobile/issue-1863-multiple-uploads
Feb 10, 2020
Merged

[Gutenberg] Support Multiple uploads in Gallery#13404
chipsnyder merged 2 commits intofeature/gallery-upload-optionsfrom
rnmobile/issue-1863-multiple-uploads

Conversation

@chipsnyder
Copy link
Copy Markdown
Contributor

@chipsnyder chipsnyder commented Feb 7, 2020

Fixes wordpress-mobile/gutenberg-mobile#1863

To Test:

Gallary Block:

  1. Add a Gallary Block.
  2. Open the Free Photo Library.
  3. Choose one (or many) images.
  4. Select add
    Expect: All images should be added to the Gallery Block in the selected order

Image Block:

  1. Add an Image block.
  2. Open the Free Photo Library.
  3. Choose one (or many) images.
  4. Select add

Expect: All images should be added as separate Image Blocks

Media & Text:

  1. Add a Media & Text Block.
  2. Open the Free Photo Library.
  3. Choose one (or many) images.
  4. Select add

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:

  • I have considered adding unit tests where possible.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@chipsnyder chipsnyder added [Type] Bug Gutenberg Editing and display of Gutenberg blocks. labels Feb 7, 2020
@chipsnyder chipsnyder requested review from geriux and mkevins February 7, 2020 21:10
@peril-wordpress-mobile
Copy link
Copy Markdown

You can trigger an installable build for these changes by visiting CircleCI here.

@peril-wordpress-mobile
Copy link
Copy Markdown

Warnings
⚠️ PR is not assigned to a milestone.

Generated by 🚫 dangerJS

@chipsnyder chipsnyder changed the title Rnmobile/issue 1863 multiple uploads [Gutenberg] Support Multiple uploads in Gallery Feb 7, 2020
@chipsnyder chipsnyder marked this pull request as ready for review February 7, 2020 21:47
Copy link
Copy Markdown
Contributor

@mkevins mkevins left a 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!

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.
Copy link
Copy Markdown
Contributor

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)?

Copy link
Copy Markdown
Contributor Author

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.

@chipsnyder chipsnyder merged commit d1e2d69 into feature/gallery-upload-options Feb 10, 2020
@chipsnyder chipsnyder deleted the rnmobile/issue-1863-multiple-uploads branch February 10, 2020 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Gutenberg Editing and display of Gutenberg blocks.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants