Skip to content

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

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

Closed
Tracked by #5715
sivaraam opened this issue Jun 15, 2024 · 8 comments · Fixed by #5830

Comments

@sivaraam
Copy link
Member

sivaraam commented Jun 15, 2024

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
Copy link
Contributor

I guess this issue is the same?

@sivaraam
Copy link
Member Author

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

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
Copy link
Contributor

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
Copy link
Member Author

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
Copy link

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
Copy link
Member Author

@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. 🙂

@sivaraam sivaraam changed the title [Bug]: Parent and sub categories of a given cateogry cannot be viewed [Bug]: Category related functionality such as explore search, viewing parent and sub categories of a category don't work Jun 30, 2024
@sivaraam sivaraam mentioned this issue Jul 6, 2024
8 tasks
@prototyperspective
Copy link

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.

@rohit9625
Copy link
Contributor

I'm having a difficult time pinpointing the root cause of this issue, and I've spent a lot of time on it. The SubCategoryFragment doesn't seem to be initializing properly after view-binding, even though the initialization logic is solid. However, I don't have much knowledge about view-binding and its life-cycle. I would appreciate your valuable thoughts on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment