apps-android-commons icon indicating copy to clipboard operation
apps-android-commons copied to clipboard

Need to apply hidden categories

Open devarsh-mavani-19 opened this issue 2 years ago • 13 comments

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)

devarsh-mavani-19 avatar Mar 27 '22 15:03 devarsh-mavani-19

Codecov Report

Merging #4924 (7daba94) into master (50c4458) will increase coverage by 0.08%. The diff coverage is 100.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.

codecov[bot] avatar Mar 27 '22 18:03 codecov[bot]

@nicolas-raoul can you please review this? thanks

devarsh-mavani-19 avatar Mar 27 '22 18:03 devarsh-mavani-19

  1. Start uploading an image.
  2. At the depictions step, search and select depiction Paris.
  3. Continue to the categories selection step.
  4. Problem: Normally the linked category Paris should be suggested, but instead no categories are shown, the activity is blank.
  5. Drag to the bottom (like if scrolling). That makes the suggestions appear.

nicolas-raoul avatar Mar 28 '22 14:03 nicolas-raoul

This seems to work with most depictions I tried.

nicolas-raoul avatar Mar 29 '22 11:03 nicolas-raoul

The problem seems to not exist on master.

nicolas-raoul avatar Mar 29 '22 12:03 nicolas-raoul

The problem seems to not exist on master.

means is it caused by this PR?

devarsh-mavani-19 avatar Mar 29 '22 14:03 devarsh-mavani-19

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

devarsh-mavani-19 avatar Mar 29 '22 17:03 devarsh-mavani-19

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?

nicolas-raoul avatar Mar 30 '22 01:03 nicolas-raoul

Sorry I had not seen your last comments, thank you for fixing!

nicolas-raoul avatar Mar 30 '22 01:03 nicolas-raoul

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? adb

That's strange I tried and it worked for me Screenshot_2022-03-30-09-15-51-111_fr free nrw commons

devarsh-mavani-19 avatar Mar 30 '22 03:03 devarsh-mavani-19

@nicolas-raoul I tried to reproduce error on different device as well but it is not showing that error in my case

devarsh-mavani-19 avatar Mar 31 '22 04:03 devarsh-mavani-19

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.

nicolas-raoul avatar Apr 01 '22 14:04 nicolas-raoul

hi @devarsh-mavani-19 , thanks for the PR. Is this PR still active?

neslihanturan avatar Apr 25 '22 18:04 neslihanturan