Skip to content

Nearby: make list resize and display message when empty #3746

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

Merged
merged 5 commits into from
May 19, 2020

Conversation

CloeARiva
Copy link
Contributor

Description
Make the list of nearby places resize up to its old size, depending on the content. Handle the empty case by displaying a message.

Fixes #3727

What changes did you make and why?

  • Made the list wrap-content and wrapped it in a transparent layout of fixed size (the old size).
  • Added a textview with a message to be displayed when the list is empty.

Tests performed

Tested betaDebug on Pixel XL with API level 29.

Screenshots
List at full size
image

List resized
image

Message displayed when list is empty
image

Copy link

@tests-checker tests-checker bot left a 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?

@CloeARiva CloeARiva marked this pull request as ready for review May 12, 2020 15:55
@codecov-io
Copy link

codecov-io commented May 12, 2020

Codecov Report

Merging #3746 into master will decrease coverage by 0.14%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##             master   #3746      +/-   ##
===========================================
- Coverage      7.41%   7.26%   -0.15%     
+ Complexity      340     333       -7     
===========================================
  Files           290     290              
  Lines         12842   12700     -142     
  Branches       1004    1009       +5     
===========================================
- Hits            952     923      -29     
+ Misses        11815   11704     -111     
+ Partials         75      73       -2     
Impacted Files Coverage Δ Complexity Δ
...commons/nearby/fragments/NearbyParentFragment.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...mons/upload/mediaDetails/UploadMediaPresenter.java 61.76% <0.00%> (-6.10%) 17.00% <0.00%> (ø%)
...va/fr/free/nrw/commons/upload/UploadMediaDetail.kt 35.71% <0.00%> (-2.75%) 3.00% <0.00%> (ø%)
.../depictions/SearchDepictionsFragmentPresenter.java 59.64% <0.00%> (-2.33%) 7.00% <0.00%> (-2.00%)
...ommons/upload/structure/depictions/DepictedItem.kt 15.15% <0.00%> (-2.24%) 6.00% <0.00%> (+1.00%) ⬇️
...rc/main/java/fr/free/nrw/commons/nearby/Place.java 1.35% <0.00%> (-0.02%) 1.00% <0.00%> (ø%)
...n/java/fr/free/nrw/commons/upload/UploadModel.java 0.00% <0.00%> (ø) 0.00% <0.00%> (ø%)
.../java/fr/free/nrw/commons/di/NetworkingModule.java 0.00% <0.00%> (ø) 0.00% <0.00%> (ø%)
...fr/free/nrw/commons/media/MediaDetailFragment.java 0.00% <0.00%> (ø) 0.00% <0.00%> (ø%)
...fr/free/nrw/commons/mwapi/OkHttpJsonApiClient.java 0.00% <0.00%> (ø) 0.00% <0.00%> (ø%)
... and 24 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 6d687c3...53a8ca6. Read the comment docs.

@codecov-commenter
Copy link

Codecov Report

Merging #3746 into master will decrease coverage by 0.42%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##             master   #3746      +/-   ##
===========================================
- Coverage      7.41%   6.99%   -0.43%     
+ Complexity      340     317      -23     
===========================================
  Files           290     290              
  Lines         12842   12616     -226     
  Branches       1004    1005       +1     
===========================================
- Hits            952     882      -70     
+ Misses        11815   11666     -149     
+ Partials         75      68       -7     
Impacted Files Coverage Δ Complexity Δ
...commons/nearby/fragments/NearbyParentFragment.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...mons/upload/mediaDetails/UploadMediaPresenter.java 61.76% <0.00%> (-6.10%) 17.00% <0.00%> (ø%)
...va/fr/free/nrw/commons/upload/UploadMediaDetail.kt 35.71% <0.00%> (-2.75%) 3.00% <0.00%> (ø%)
.../depictions/SearchDepictionsFragmentPresenter.java 59.64% <0.00%> (-2.33%) 7.00% <0.00%> (-2.00%)
...ommons/upload/structure/depictions/DepictedItem.kt 15.15% <0.00%> (-2.24%) 6.00% <0.00%> (+1.00%) ⬇️
...rc/main/java/fr/free/nrw/commons/nearby/Place.java 1.35% <0.00%> (-0.02%) 1.00% <0.00%> (ø%)
...n/java/fr/free/nrw/commons/upload/UploadModel.java 0.00% <0.00%> (ø) 0.00% <0.00%> (ø%)
.../java/fr/free/nrw/commons/di/NetworkingModule.java 0.00% <0.00%> (ø) 0.00% <0.00%> (ø%)
...ava/fr/free/nrw/commons/upload/UploadActivity.java 0.00% <0.00%> (ø) 0.00% <0.00%> (ø%)
...fr/free/nrw/commons/media/MediaDetailFragment.java 0.00% <0.00%> (ø) 0.00% <0.00%> (ø%)
... and 37 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 6d687c3...beb7952. Read the comment docs.

@macgills macgills merged commit 7084fd2 into commons-app:master May 19, 2020
@CloeARiva CloeARiva deleted the 3727-nearby_list_handle_empty branch May 19, 2020 12:45
ashishkumar468 pushed a commit to ashishkumar468/apps-android-commons that referenced this pull request Oct 10, 2020
…3746)

* Nearby: make list resize and display message when empty

* refactored and renamed for clarity

* refactoring and simplifying based on comments

* refactoring and simplifying based on comments

* removing vertical orientation
ashishkumar468 pushed a commit to ashishkumar468/apps-android-commons that referenced this pull request Oct 10, 2020
…3746)

* Nearby: make list resize and display message when empty

* refactored and renamed for clarity

* refactoring and simplifying based on comments

* refactoring and simplifying based on comments

* removing vertical orientation
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.

Nearby list bottom sheet UI issues
4 participants