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

Tenor GIF picker for Gutenberg editor #13910

Conversation

ngoctr
Copy link
Contributor

@ngoctr ngoctr commented Apr 16, 2020

This added Tenor Picker support for Gutenberg editor as part of #13803.

Testing

First steps

  1. Register your Tenor developer API here: https://tenor.com/gifapi
  2. Check out this branch
  3. Put your API Key into .configure-files/wpcom_app_credentials (TENOR_API_KEY line)
  4. Run rake dependencies
  5. Build and run

Verify Tenor support in Gutenberg Editor

  1. Go to Site -> Posts
  2. Tap any Post to edit it, if you are using Classic (Aztec) Editor, you will need to switch to Block Editor.
  3. Tap the + button at the bottom left corner
    image
  4. Choose an Image or Gallery block
    image
  5. Tap ADD IMAGE button to activate the media picker
    image
  6. Choose Free GIF Library
  7. Search and select the GIF(s) you want to insert, then tap Add button at the bottom right corner
    image
  8. Verify the selected GIF(s) have been added into the Post

There are other flows in the Block Editor also involved the Tenor Picker that you should also make tests:

  • Replace an image:
    image
  • Media & Text block:
    image

PR submission checklist:

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

@ScoutHarris ScoutHarris self-requested a review April 16, 2020 00:22
@ScoutHarris ScoutHarris added this to the 14.7 milestone Apr 16, 2020
Copy link
Contributor

@ScoutHarris ScoutHarris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @ngoctr .

Sometimes when previewing a post while GIFs are loading, some GIFs don't end up in published post.

  • While editing a post, select several GIFs.
  • While they are loading, preview the post.
  • Notice not all the GIFs appear in the preview.
  • Close the preview and return to the post.
  • After all the GIFs have loaded, preview again.
  • Notice not all the GIFs are present.
  • Publish the post.
  • Notice not all the GIFs are present.
  • Edit the post.
  • This does show all the GIFS, including the ones missing from the published post.

@ngoctr
Copy link
Contributor Author

ngoctr commented Apr 16, 2020

@ScoutHarris I noticed the same issue with Stock Photos too, it's not just happened only with GIFs. There are weird URLs in my debug log:
2020-04-16 10:56:07:539 WordPress[40899:911143] Unable to download image for attachment with url = Optional(https://i0.wp.com////Users/winter/Library/Developer/CoreSimulator/Devices/C2722B0E-AA32-48D5-A915-548DBFFD6216/data/Containers/Data/Application/BCB3B647-6AE5-4D5C-B753-5157A7EFC3D1/Library/Caches/Media/thumbnail-p26-1792x1792.jpeg?quality=80&w=1792). Details: Optional("The operation couldn’t be completed. (WordPress.ImageDownloaderError error 0.)")

@ScoutHarris
Copy link
Contributor

I noticed the same issue with Stock Photos too, it's not just happened only with GIFs.

Aaaahh. Would you mind creating an issue in the gutenburg repo (if one doesn't already exist) and we'll reference that here.

@ScoutHarris ScoutHarris self-requested a review April 16, 2020 01:00
@ngoctr
Copy link
Contributor Author

ngoctr commented Apr 16, 2020

I noticed the same issue with Stock Photos too, it's not just happened only with GIFs.

Aaaahh. Would you mind creating an issue in the gutenburg repo (if one doesn't already exist) and we'll reference that here.

Sure, I will do that. If I do update the Post before previewing, then everything is working ;-)

Copy link
Contributor

@ScoutHarris ScoutHarris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the known issue with some media not loading, this looks fine.

Thanks @ngoctr !

@ScoutHarris ScoutHarris merged commit 5fa137d into wordpress-mobile:feature/13803-tenor_integration Apr 16, 2020
@ScoutHarris
Copy link
Contributor

If I do update the Post before previewing, then everything is working

Well you know very well people are not that patient. How do you think I found it? 😆

@ngoctr
Copy link
Contributor Author

ngoctr commented Apr 16, 2020

If I do update the Post before previewing, then everything is working

Well you know very well people are not that patient. How do you think I found it? 😆

Haha, I see 😃 Thanks @ScoutHarris for approving this.

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

Successfully merging this pull request may close these issues.

2 participants