WordPress-FluxC-Android
WordPress-FluxC-Android copied to clipboard
Add Stock photo caption and include it when uploading a photo
Issue: https://github.com/wordpress-mobile/gutenberg-mobile/issues/1609
Related PRs
Description
Parse caption field from the response of Stock media search requests and add it to the Stock media model and item. This field is now also included in the payload when a photo is uploaded.
Test
The changes can be tested in two different flows:
Media screen
Steps
- Go to a site.
- Tap on
Mediabutton. - Tap on
+button. - Tap on
Choose from Free Photo Library - Search any term.
- Tap one or multiple photos.
- Tap on ✔️ button.
- Wait for the items to be uploaded.
- [Back in the Media screen] Tap on any of the recently uploaded photos.
- Check that
Captionfield has value.
Note: It's possible that in some cases the item doesn't have a caption value with the credit/attribution of the photo. In this case try another one.
Image block
Steps
- Go to a site.
- Open a post/page.
- Tap on
+button. - Tap on
Imageblock. - Tap on
ADD IMAGE. - Tap on
Choose from Free Photo Library - Search any term.
- Tap one photo.
- Tap on ✔️ button.
- Wait for the item to be uploaded.
- Check that below the photo the caption field has a value.
Note: It's possible that in some cases the item doesn't have a caption value with the credit/attribution of the photo. In this case try another one.
Merge Instructions: Only merger after WordPress Android PR has been tested and approved.
@fluiddot there's a conflict here that will require resolution :)
@fluiddot there's a conflict here that will require resolution :)
Thanks @jd-alexander for raising the issue, I've just solved the conflict in https://github.com/wordpress-mobile/WordPress-FluxC-Android/pull/1846/commits/f2e5d1094bb4dfc4752e22a014a1965cba66a03f.