Skip to content

Fixes 4620 : Editing categories of an existing picture: Reuse categories selection UI from the Upload Wizard#4928

Merged
nicolas-raoul merged 16 commits intocommons-app:masterfrom
Ayan-10:4620_category_ui_update
Apr 11, 2022
Merged

Fixes 4620 : Editing categories of an existing picture: Reuse categories selection UI from the Upload Wizard#4928
nicolas-raoul merged 16 commits intocommons-app:masterfrom
Ayan-10:4620_category_ui_update

Conversation

@Ayan-10
Copy link
Contributor

@Ayan-10 Ayan-10 commented Apr 10, 2022

Description (required)

Fixes #4620

What changes did you make and why?

App currently uses a special UI, which takes time to improve and maintain. It would be better if it reused the existing category selection UI of the Upload Wizard.

  • Reuse categories selection UI from the Upload Wizard
  • Deleted old UI
  • Added tests for new lines

Tests performed (required)

Tested latest prodDebug on Pixel 3 with API level 30.

Screenshots (for UI changes only)

New UI

Old UI

@codecov
Copy link

codecov bot commented Apr 10, 2022

Codecov Report

Merging #4928 (c262744) into master (0d25c24) will increase coverage by 0.72%.
The diff coverage is 53.87%.

❗ Current head c262744 differs from pull request most recent head 10bf8fb. Consider uploading reports for the commit 10bf8fb to get more accurate results

@@             Coverage Diff              @@
##             master    #4928      +/-   ##
============================================
+ Coverage     51.42%   52.14%   +0.72%     
- Complexity     2327     2373      +46     
============================================
  Files           345      344       -1     
  Lines         16194    16265      +71     
  Branches       1430     1430              
============================================
+ Hits           8327     8482     +155     
+ Misses         7236     7145      -91     
- Partials        631      638       +7     
Impacted Files Coverage Δ
...rw/commons/bookmarks/BookmarkListRootFragment.java 92.03% <ø> (+0.73%) ⬆️
.../nrw/commons/category/CategoryDetailsActivity.java 64.63% <ø> (+1.53%) ⬆️
...va/fr/free/nrw/commons/explore/SearchActivity.java 86.36% <ø> (-0.25%) ⬇️
...xplore/depictions/WikidataItemDetailsActivity.java 71.90% <ø> (-0.46%) ⬇️
...ee/nrw/commons/media/MediaDetailPagerFragment.java 25.00% <ø> (+0.12%) ⬆️
...ns/upload/categories/UploadCategoriesFragment.java 57.53% <37.34%> (-30.88%) ⬇️
...w/commons/upload/categories/CategoriesPresenter.kt 66.66% <43.93%> (-33.34%) ⬇️
...fr/free/nrw/commons/media/MediaDetailFragment.java 45.71% <62.50%> (+8.60%) ⬆️
...va/fr/free/nrw/commons/category/CategoriesModel.kt 76.08% <78.37%> (+16.76%) ⬆️
.../free/nrw/commons/category/CategoryEditHelper.java 47.50% <87.50%> (+31.71%) ⬆️
... and 13 more

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 2bb2cbc...10bf8fb. Read the comment docs.

@Ayan-10
Copy link
Contributor Author

Ayan-10 commented Apr 10, 2022

@nicolas-raoul @4D17Y4 For now, I removed values-zh-hk directory so that the PR can be tested and reviewed. After approval of the PR, I can add the directory if required.

Thanks.

Copy link
Member

@nicolas-raoul nicolas-raoul left a comment

Choose a reason for hiding this comment

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

It works great, and the code looks fine to me.
Just two minor change requests.

import fr.free.nrw.commons.utils.ViewUtilWrapper;
import io.reactivex.Observable;
import io.reactivex.Single;
import io.reactivex.schedulers.Schedulers;
Copy link
Member

Choose a reason for hiding this comment

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

This line is not needed, right?

})
{
Timber.e(
"Failed to update depictions"
Copy link
Member

Choose a reason for hiding this comment

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

Do you mean categories?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes.

@nicolas-raoul nicolas-raoul merged commit 11292ab into commons-app:master Apr 11, 2022
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.

Editing categories of an existing picture: Reuse categories selection UI from the Upload Wizard

2 participants