apps-android-commons
apps-android-commons copied to clipboard
Need to apply hidden categories
Description (required)
hidden categories should be shown when searched for example [[Category:United Kingdom photographs taken on 2021-01-19]]
Fixes #4192
What changes did you make and why?
added API call that will fetch hidden category when entered by user. Tested {build variant, e.g. ProdDebug} on {name of device or emulator} with API level {API level}. tested on prodDebug device: Redmi 6 pro API 28 android 9 (pie)
Codecov Report
Merging #4924 (7daba94) into master (50c4458) will increase coverage by
0.08%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #4924 +/- ##
============================================
+ Coverage 51.41% 51.50% +0.08%
- Complexity 2324 2334 +10
============================================
Files 345 345
Lines 16194 16209 +15
Branches 1430 1430
============================================
+ Hits 8326 8348 +22
+ Misses 7235 7229 -6
+ Partials 633 632 -1
Impacted Files | Coverage Δ | |
---|---|---|
...va/fr/free/nrw/commons/category/CategoriesModel.kt | 60.00% <100.00%> (+2.37%) |
:arrow_up: |
...ava/fr/free/nrw/commons/category/CategoryClient.kt | 81.81% <100.00%> (+1.17%) |
:arrow_up: |
.../free/nrw/commons/repository/UploadRepository.java | 95.83% <100.00%> (+0.05%) |
:arrow_up: |
...w/commons/upload/categories/CategoriesPresenter.kt | 100.00% <100.00%> (ø) |
|
...a/fr/free/nrw/commons/review/ReviewController.java | 87.20% <0.00%> (-4.66%) |
:arrow_down: |
...w/commons/upload/categories/BaseDelegateAdapter.kt | 47.05% <0.00%> (+11.76%) |
:arrow_up: |
.../nrw/commons/category/CategoryContentProvider.java | 26.78% <0.00%> (+14.28%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 50c4458...7daba94. Read the comment docs.
@nicolas-raoul can you please review this? thanks
- Start uploading an image.
- At the depictions step, search and select depiction Paris.
- Continue to the categories selection step.
- Problem: Normally the linked category Paris should be suggested, but instead no categories are shown, the activity is blank.
- Drag to the bottom (like if scrolling). That makes the suggestions appear.
This seems to work with most depictions I tried.
The problem seems to not exist on master.
The problem seems to not exist on master.
means is it caused by this PR?
hey, @nicolas-raoul I have fixed the issue. sorry for the delay.
edit: ~~for some reason the test that this pr has nothing to do with is failing.~~ changed the comment and test was resolved. may be issue in CI\CD pipeline
means is it caused by this PR?
It seems to be the case indeed. Are you able to reproduce the issue using the steps above?
Sorry I had not seen your last comments, thank you for fixing!
Strangely I can't find https://commons.wikimedia.org/wiki/Category:United_Kingdom_photographs_taken_on_2021-01-19 by typing
United Kingdom photographs taken on 2021-01-19
. Am I missing something?
That's strange I tried and it worked for me
@nicolas-raoul I tried to reproduce error on different device as well but it is not showing that error in my case
Here is what logcat shows when I paste United Kingdom photographs taken on 2021-01-19
in the categories search box:
04-01 23:47:57.629 5636 5803 I clp-JNI : Add pinfo. (channel) 6a86011 PopupWindow:edae80d (server) (pkg) AppWindowToken{8d03d8c token=Token{14b72bf ActivityRecord{f9840de u0 fr.free.nrw.commons/.upload.UploadActivity t35203}}} 14585 10408 (action) 0
04-01 23:47:57.631 14585 14585 D ViewRootImpl@88cc510[PopupWindow:edae80d]: ViewPostIme pointer 0
04-01 23:47:57.685 5636 5803 I clp-JNI : Add pinfo. (channel) 6a86011 PopupWindow:edae80d (server) (pkg) AppWindowToken{8d03d8c token=Token{14b72bf ActivityRecord{f9840de u0 fr.free.nrw.commons/.upload.UploadActivity t35203}}} 14585 10408 (action) 1
04-01 23:47:57.685 14585 14585 D ViewRootImpl@88cc510[PopupWindow:edae80d]: ViewPostIme pointer 1
04-01 23:47:57.689 14585 14585 D TextView: paste - clipdata type : HTML
04-01 23:47:57.700 14585 14585 D ViewRootImpl@88cc510[PopupWindow:edae80d]: dispatchDetachedFromWindow
04-01 23:47:57.704 14585 14585 D ViewRootImpl@88cc510[PopupWindow:edae80d]: Surface release. android.view.ViewRootImpl.doDie:7944 android.view.ViewRootImpl.die:7912 android.view.WindowManagerGlobal.removeViewLocked:497 android.view.WindowManagerGlobal.removeView:435 android.view.WindowManagerImpl.removeViewImmediate:124 android.widget.PopupWindow.dismissImmediate:2242 android.widget.PopupWindow.dismiss:2185 com.android.internal.widget.FloatingToolbar$FloatingToolbarPopup$4.onAnimationEnd:584
04-01 23:47:57.708 14585 14585 D InputTransport: Input channel destroyed: fd=146
04-01 23:47:58.205 14585 15198 D OkHttp : --> GET https://commons.wikimedia.org/w/api.php?action=query&format=json&formatversion=2&generator=allcategories&prop=categoryinfo|description|pageimages&piprop=thumbnail&pithumbsize=70&gacprefix=United%20Kingdom%20photographs%20taken%20on%202021-01-19&gaclimit=25&gacoffset=0
04-01 23:47:58.206 14585 15198 D CookieManager: Domain:commons.wikimedia.org
04-01 23:47:58.660 14585 15198 D OkHttp : <-- 200 https://commons.wikimedia.org/w/api.php?action=query&format=json&formatversion=2&generator=allcategories&prop=categoryinfo|description|pageimages&piprop=thumbnail&pithumbsize=70&gacprefix=United%20Kingdom%20photographs%20taken%20on%202021-01-19&gaclimit=25&gacoffset=0 (455ms, 278-byte body)
then No Categories found
appears.
hi @devarsh-mavani-19 , thanks for the PR. Is this PR still active?