-
Notifications
You must be signed in to change notification settings - Fork 1.3k
#3780 Create media using a combination of Entities & MwQueryResult #3786
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
Conversation
…goryDepictionsRenderer
… to be easier to use
…archDepictionsFragment
…tions-pagination # Conflicts: # app/src/main/java/fr/free/nrw/commons/category/CategoryClient.java # app/src/main/java/fr/free/nrw/commons/nearby/fragments/NearbyParentFragment.java # app/src/main/java/fr/free/nrw/commons/upload/categories/UploadCategoriesFragment.java # app/src/main/res/values/strings.xml # gradle.properties
…ter unit tests now that view is not nullable - fix Category prefix imports
…ource related classes
…cheduler - ignore failing test
…nctionality of pagination to base classes - add category pagination
…ImagesFragment - tidy up showing the empty view - make search fragments show snackbar with appropriate text
…r to load more data
…ories-pagination # Conflicts: # app/src/main/java/fr/free/nrw/commons/explore/SearchActivity.java # app/src/main/java/fr/free/nrw/commons/explore/SearchModule.java # app/src/main/java/fr/free/nrw/commons/explore/categories/SearchCategoryFragment.java # app/src/main/java/fr/free/nrw/commons/explore/depictions/DepictionAdapter.kt # app/src/main/java/fr/free/nrw/commons/explore/depictions/SearchDepictionsFragment.kt # app/src/main/java/fr/free/nrw/commons/explore/depictions/SearchDepictionsFragmentContract.kt # app/src/main/java/fr/free/nrw/commons/explore/depictions/SearchDepictionsFragmentPresenter.kt # app/src/main/java/fr/free/nrw/commons/nearby/PlaceAdapterDelegate.kt # app/src/main/java/fr/free/nrw/commons/nearby/fragments/NearbyParentFragment.java
…-images-pagination # Conflicts: # app/src/main/java/fr/free/nrw/commons/Media.java # app/src/main/java/fr/free/nrw/commons/media/MediaClient.java # app/src/main/java/fr/free/nrw/commons/media/MediaDetailInterface.java # app/src/main/java/fr/free/nrw/commons/media/MediaInterface.java
…construct media with an entity - move fields from media down to contribution - move dynamic fields outside of media - remove unused constructors - remove all unnecessary fetching of captions/descriptions - bump database version
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.
Could you please add tests to make sure this change works as expected?
Codecov Report
@@ Coverage Diff @@
## macgills/3772-images-pagination #3786 +/- ##
====================================================================
- Coverage 8.63% 8.26% -0.37%
+ Complexity 367 347 -20
====================================================================
Files 312 310 -2
Lines 12370 12220 -150
Branches 983 961 -22
====================================================================
- Hits 1068 1010 -58
+ Misses 11231 11154 -77
+ Partials 71 56 -15
Continue to review full report at Codecov.
|
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.
I think this will PR will take a few days to merge as its a relatively big PR.
@macgills It would be great if you could create a separate PR for any existing files that you are converting to Kotlin. I am working on #872 and I guess there might be some conflicts in a few media related classes. We can merge the Kotlin PR quickly and I can rebase my branch.
@maskaravivek so just a ticket to convert MediaClient? MediaDataExtractor is heavily changed from what it was because I ripped out fields that don't belong in |
@maskaravivek if it is okay by you I will integrate your changes once your PR is merged which is looking like it will be soon. |
…generator to construct media for DepictedImages
…-construction # Conflicts: # app/src/main/java/fr/free/nrw/commons/Media.java # app/src/main/java/fr/free/nrw/commons/MediaDataExtractor.kt # app/src/main/java/fr/free/nrw/commons/contributions/Contribution.java # app/src/main/java/fr/free/nrw/commons/contributions/ContributionViewHolder.java # app/src/main/java/fr/free/nrw/commons/explore/BaseSearchFragment.kt # app/src/main/java/fr/free/nrw/commons/explore/depictions/SearchDepictionsFragment.kt # app/src/main/java/fr/free/nrw/commons/explore/media/MediaConverter.kt # app/src/main/java/fr/free/nrw/commons/explore/media/PageableMediaDataSource.kt # app/src/main/java/fr/free/nrw/commons/explore/media/SearchMediaAdapter.kt # app/src/main/java/fr/free/nrw/commons/media/MediaClient.kt # app/src/main/java/fr/free/nrw/commons/media/MediaInterface.java # app/src/main/java/fr/free/nrw/commons/upload/WikidataPlace.kt # app/src/test/kotlin/fr/free/nrw/commons/explore/BaseSearchPresenterTest.kt # app/src/test/kotlin/fr/free/nrw/commons/explore/media/PageableMediaDataSourceTest.kt # app/src/test/kotlin/fr/free/nrw/commons/media/MediaClientTest.kt
…update wikicode to align with expected behaviour
…replace old site of thumbnail title with most relevant caption
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.
Tested on real device running Android 10, works well.
…-construction # Conflicts: # app/src/test/kotlin/ModelFunctions.kt
…ryResult (commons-app#3786) * commons-app#3468 Switch from RvRenderer to AdapterDelegates - replace SearchDepictionsRenderer * commons-app#3468 Switch from RvRenderer to AdapterDelegates - replace UploadCategoryDepictionsRenderer * commons-app#3468 Switch from RvRenderer to AdapterDelegates - update BaseAdapter to be easier to use * commons-app#3468 Switch from RvRenderer to AdapterDelegates - replace SearchImagesRenderer * commons-app#3468 Switch from RvRenderer to AdapterDelegates - replace SearchCategoriesRenderer * commons-app#3468 Switch from RvRenderer to AdapterDelegates - replace NotificationRenderer * commons-app#3468 Switch from RvRenderer to AdapterDelegates - replace UploadDepictsRenderer * commons-app#3468 Switch from RvRenderer to AdapterDelegates - replace PlaceRenderer * commons-app#3756 Convert SearchDepictionsFragment to use Pagination - convert SearchDepictionsFragment * commons-app#3756 Convert SearchDepictionsFragment to use Pagination - fix presenter unit tests now that view is not nullable - fix Category prefix imports * commons-app#3756 Convert SearchDepictionsFragment to use Pagination - test DataSource related classes * commons-app#3756 Convert SearchDepictionsFragment to use Pagination - reset rx scheduler - ignore failing test * commons-app#3760 Convert SearchCategoriesFragment to use Pagination - extract functionality of pagination to base classes - add category pagination * commons-app#3772 Convert SearchImagesFragment to use Pagination - convert SearchImagesFragment - tidy up showing the empty view - make search fragments show snackbar with appropriate text * commons-app#3772 Convert SearchImagesFragment to use Pagination - allow viewpager to load more data * commons-app#3760 remove test that got re-added by merge * commons-app#3760 remove duplicate dependency * commons-app#3772 fix compilation * commons-app#3780 Create media using a combination of Entities & MwQueryResult - construct media with an entity - move fields from media down to contribution - move dynamic fields outside of media - remove unused constructors - remove all unnecessary fetching of captions/descriptions - bump database version * commons-app#3808 Construct media objects that depict an item id correctly - use generator to construct media for DepictedImages * commons-app#3780 Create media using a combination of Entities & MwQueryResult - update wikicode to align with expected behaviour * commons-app#3780 Create media using a combination of Entities & MwQueryResult - replace old site of thumbnail title with most relevant caption
…ryResult (commons-app#3786) * commons-app#3468 Switch from RvRenderer to AdapterDelegates - replace SearchDepictionsRenderer * commons-app#3468 Switch from RvRenderer to AdapterDelegates - replace UploadCategoryDepictionsRenderer * commons-app#3468 Switch from RvRenderer to AdapterDelegates - update BaseAdapter to be easier to use * commons-app#3468 Switch from RvRenderer to AdapterDelegates - replace SearchImagesRenderer * commons-app#3468 Switch from RvRenderer to AdapterDelegates - replace SearchCategoriesRenderer * commons-app#3468 Switch from RvRenderer to AdapterDelegates - replace NotificationRenderer * commons-app#3468 Switch from RvRenderer to AdapterDelegates - replace UploadDepictsRenderer * commons-app#3468 Switch from RvRenderer to AdapterDelegates - replace PlaceRenderer * commons-app#3756 Convert SearchDepictionsFragment to use Pagination - convert SearchDepictionsFragment * commons-app#3756 Convert SearchDepictionsFragment to use Pagination - fix presenter unit tests now that view is not nullable - fix Category prefix imports * commons-app#3756 Convert SearchDepictionsFragment to use Pagination - test DataSource related classes * commons-app#3756 Convert SearchDepictionsFragment to use Pagination - reset rx scheduler - ignore failing test * commons-app#3760 Convert SearchCategoriesFragment to use Pagination - extract functionality of pagination to base classes - add category pagination * commons-app#3772 Convert SearchImagesFragment to use Pagination - convert SearchImagesFragment - tidy up showing the empty view - make search fragments show snackbar with appropriate text * commons-app#3772 Convert SearchImagesFragment to use Pagination - allow viewpager to load more data * commons-app#3760 remove test that got re-added by merge * commons-app#3760 remove duplicate dependency * commons-app#3772 fix compilation * commons-app#3780 Create media using a combination of Entities & MwQueryResult - construct media with an entity - move fields from media down to contribution - move dynamic fields outside of media - remove unused constructors - remove all unnecessary fetching of captions/descriptions - bump database version * commons-app#3808 Construct media objects that depict an item id correctly - use generator to construct media for DepictedImages * commons-app#3780 Create media using a combination of Entities & MwQueryResult - update wikicode to align with expected behaviour * commons-app#3780 Create media using a combination of Entities & MwQueryResult - replace old site of thumbnail title with most relevant caption
Description (required)
Fixes #3780
Fixes #3808
What changes did you make and why?
Tests performed (required)
Tested ProdDebug on Nexus5X with API level 27