commons-app / apps-android-commons

The Wikimedia Commons Android app allows users to upload pictures from their Android phone/tablet to Wikimedia Commons
https://commons-app.github.io/
Apache License 2.0
994 stars 1.18k forks source link

[Bug]: Category related functionality such as explore search, viewing parent and sub categories of a category don't work #5758

Open sivaraam opened 2 months ago

sivaraam commented 2 months ago

Summary

Before v5.0.1, the app was able to display the sub categories and parent categories of a particular category properly. Since the recent release this no longer seems possible. This has been reported by a user via Play store feedback.

Another user report also confirms that category search doesn't work in the "Explore" screen.

Steps to reproduce

  1. Open an image via Contributions / Explore screens
  2. Click on a specific category associated with the image
  3. Observe other images related to the category being shown.
  4. Tap on the "Subcategories" (or) "Parent categories" tab

Expected behaviour

The sub-categories and the parent categories corresponding to that category are shown.

Actual behaviour

A blank screen is shown.

Device name

OnePlus Nord

Android version

Android 12

Commons app version

5.0.1

Device logs

No response

Screen-shots

No response

Would you like to work on the issue?

None

rohit9625 commented 2 months ago

I guess this issue is the same?

sivaraam commented 2 months ago

I guess this issue is the same?

I'm kind of unsure about that. That issue talks about sub and parent categories not being shown for v4.2.1 of the app. I'm actually able to load them without issues when I use v4.2.1. Here's a screenshot:

Screenshot

![Screenshot_2024-06-16-18-07-43-22_d5db3f3edc380047609fe9c266f7c566](https://github.com/commons-app/apps-android-commons/assets/12448084/fff9fad2-63de-4c92-bbc6-c8e5cafc2adc)

This issue is about category search / parent and sub categories not working since v5.0.1.

@rohit9625 Could you cross-check if your issue still seems persistent in v4.2.1?

rohit9625 commented 2 months ago

Actually, I am investigating the problem. But I tried reproducing it again on the latest version and remembered this was exactly what was happening then.

No difference as compared to the older version.

Do you have any Idea about this function: image

It was similarly used in Parent, Sub, and CategoryMedia fragments.

sivaraam commented 1 month ago

Actually, I am investigating the problem. But I tried reproducing it again on the latest version and remembered this was exactly what was happening then.

The behaviour may be same but v4.2.1 does not have this issue. I can confirm the same. If possible, kindly check if you could verify the same by trying to use the v4.2.1 of the app.

Do you have any Idea about this function: It was similarly used in Parent, Sub, and CategoryMedia fragments.

Yeah. I think that's a fine invocation. It is just trying to setup the paged results shown in the parent/sub and category media pages. 🙂

PetitPotiron commented 1 month ago

Hello,

In addition to the parent and sub categories not being shown, I don't see any category in the search results, when searching for a category by name. Can you confirm this is not a separate issue, and if so rename the issue please?

Thank you

sivaraam commented 1 month ago

@PetitPotiron Thanks for mentioning this! Though the issue occurs in a different place. I suppose the root cause would be same (category search in explore similarly works fine in v4.2.1). So, we can explore that too as part of this issue. 🙂

prototyperspective commented 1 month ago

Relevant: category descriptions (including see also links to other categories) aren't showing either #5621 and other things shown on desktop would also be good to show such as a button to show the Wikidata Infobox for the category. Really important issue.