Skip to content
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

Free photo library: Allow uploading multiple images into Gallery #1863

Closed
pinarol opened this issue Feb 6, 2020 · 2 comments
Closed

Free photo library: Allow uploading multiple images into Gallery #1863

pinarol opened this issue Feb 6, 2020 · 2 comments
Assignees

Comments

@pinarol
Copy link
Contributor

pinarol commented Feb 6, 2020

Choose from the free photo library
Gallery block should allow uploading images from the free photo library.

Note: ❌ On iOS, I observed that only the first image is added to the gallery block, with the rest appended as image blocks.

Steps:

Add a gallery block and tap "Add Media"
Select "Choose from the free photo library" option
Select multiple images from the device and confirm the selection
Expected behavior:

Gallery should show all images being uploaded as dimmed
Progress bars should be displayed indicating the upload progress
After each image upload has completed:
Image should not be dim
Image url scheme should be https:// (not file:///) in HTML mode

Root cause analysis

Refer here

We are actually passing "multipleSelection" but it is ignored intentionally since the desired behavior is to let user select multiple pics.

What we need to do differently for Gallery is, using that flag for to decide to go for "insertOnBlock" option:

// Append the first item via callback given by Gutenberg.
if let firstItem = assets.first {
    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.
appendOnNewBlocks(assets: assets.dropFirst())

@pinarol
Copy link
Contributor Author

pinarol commented Feb 6, 2020

We can target this PR's branch for this fix

@chipsnyder
Copy link
Contributor

This was merged to develop and closed by #1855

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants