-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add Tenor support #11587
Add Tenor support #11587
Conversation
Generated by 🚫 dangerJS |
e0ce4cf
to
009684b
Compare
Hello @planarvoid! Just for your information, I've added four additional commits directly to this branch. The c604372736bfb3366aab5ee46cdee3222bd73ebb to adjust the The 74082b99a8612d026dcea26a65ea1520a17e67a7, e163ac84c6b444e2e1744750d4b67c89fc0296db and 009684b9e1e1e034aa4fd3af37a1c4933cefab6e to fix the checkstyle and lint reports. Also, I've done some rebases with the What do you think? |
50086ea
to
3b9a13d
Compare
Hey @ThomazFB, thanks for the PR! I was wondering about why you moved the error string from the |
Hello @planarvoid! It was exactly because of the lint warning! The report was pointing out about the unused strings. And so I thought that the project was restricted about using strings for Exception messages instead of UI ones, should we suppress those errors then? |
…ed to the PickerDataSourceFactory
…ewModel and GifPickerDataSource
…dded more documentation
3b9a13d
to
ceac897
Compare
Hey @planarvoid! Thank you for your feedback! Just letting you know that I committed a fix with your proposed string suppression for unused warnings and reverted the translatable string usage. Here's the commit: 0c09c88. What do you think? edit: I've also done another rebase because of a new conflict with the |
thanks for the changes @ThomazFB, we usually do
|
Thank you for the suggestions @planarvoid! I'll prioritize merges instead of rebases then! Also, I've just modified the suppression declaration right here: 13e88ec. Let me know what you think. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all the changes and the great PR description. It works nicely 👍
This dependency seems that was lastly used only for the no longer existing 'TenorProviderTest' test class (see 47ac89a), which was added as part of this #11587 PR. However, as part of this #14727 PR, this 'TenorProviderTest' test class got removed (see f29f6d0). As such, this leftover from back then can be now safely removed. PS: And with this change, the corresponding 'androidxTestCoreVersion' version is no longer necessary for unit test. As such, it is being moved from the more inclusive 'test' section to the more specific 'android test' section.
Summary
This pull request proposes a solution that brings a complete integration for the Tenor API within the pre-existent GIF selection code inside the WordPress application, solving the issue 11456.
This is an aggregation branch for four different branches:
Changelog
Tenor integration changes
GifProvider
interface is now the only coupling between all code for the GIF picker and the Tenor implementation, avoiding any reference to the Tenor library and making it easy to replace the Provider as we're doing now.TenorProvider
implements theGifProvider
interface and is injected within theDataSource
via Dagger, this way only theAppplicationModule
knows about theTenorProvider
. Also, theTenorProvider
is covered by unit tests in theTenorProviderTest
class.GifProvider
, this integration happens through the availablePositionalDataSource
, The Tenor implementation makes sure that positioning tracking is respected.MediaBrowserActivity
was restored, making GIF selection available again.EditPostActivity
was restored, making GIF selection available again when writing or editing posts.UI changes
Giphy
information was replaced withTenor
.Refactoring and improvements changes
GiphyPickerDataSource
in order to better enforce the business logic when consuming anyGifProvider
implementation.giphy
packages insideui
andviewmodel
were both renamed to onlygif
.Giphy
naming convention were renamed to onlyGif
to better fit the agnostic gif provider implementation strategy.Giphy
or the Giphy SDK were readapted to better fit theGifProvider
structure.Build configuration changes
BuildConfig
now receive the declaration of the booleanTENOR_AVAILABLE
field directly from thebuild.gradle
.TENOR_AVAILABLE
value, if the value is false, the button doesn't get configured and should never appear on the screen.TENOR_AVAILABLE
is set astrue
for the Wasabi and Zalpha builds andfalse
for the Vanilla build.build.gradle
.Testing
Before doing any tests, make sure that to create a Tenor API key and paste it associated with the
wp.tenor.api_key
as the value inside yourgradle.properties
GIF picking from Media Browser
How to test
Choose from Tenor
optionselection
,preview
andadd
are all working as expectedGIF picking from the Editor
How to test
Switch to classic editor
Choose from Tenor
optionselection
,preview
andadd
are all working as expectedTenor GIF picker feature flag - Post Editor
How to test with Wasabi and Zalpha build
Switch to classic editor
Choose from Tenor
option is availableselection
,preview
andadd
are all working as expectedHow to test with Vanilla build
Switch to classic editor
Choose from Tenor
option isn't thereTenor GIF picker feature flag - Media Browser
How to test with Wasabi and Zalpha build
Choose from Tenor
option is availableselection
,preview
andadd
are all working as expectedHow to test with Vanilla build
Choose from Tenor
option isn't therePR submission checklist
RELEASE-NOTES.txt
if necessary.