WordPress-FluxC-Android icon indicating copy to clipboard operation
WordPress-FluxC-Android copied to clipboard

Add Stock photo caption and include it when uploading a photo

Open fluiddot opened this issue 4 years ago • 2 comments

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

  1. Go to a site.
  2. Tap on Media button.
  3. Tap on + button.
  4. Tap on Choose from Free Photo Library
  5. Search any term.
  6. Tap one or multiple photos.
  7. Tap on ✔️ button.
  8. Wait for the items to be uploaded.
  9. [Back in the Media screen] Tap on any of the recently uploaded photos.
  10. Check that Caption field 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

  1. Go to a site.
  2. Open a post/page.
  3. Tap on + button.
  4. Tap on Image block.
  5. Tap on ADD IMAGE.
  6. Tap on Choose from Free Photo Library
  7. Search any term.
  8. Tap one photo.
  9. Tap on ✔️ button.
  10. Wait for the item to be uploaded.
  11. 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 avatar Jan 20 '21 13:01 fluiddot

@fluiddot there's a conflict here that will require resolution :)

jd-alexander avatar Feb 02 '21 00:02 jd-alexander

@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.

fluiddot avatar Feb 02 '21 17:02 fluiddot