Report view UX improvements when filtering on category

I would like to improve the /admin/reports/xxx page category filtering . This improvement would require two tasks:

  • Check every report for category filtering: should make sure that each report in report.rb which could potentially be filtered on category have it, that report_spec.rb tests it and than the category filter is correctly shown on the page.

  • It should make the difference between parent and child category. If you select parent category it should always include children.

@misaka4e21 would you be interested to work on this? I can offer any assistance and review you need on this.

6 Likes

So, is it true that the two tasks are:

  1. Test category filtering in report_spec.rb
  2. Include child category data in their parent category’s report
2 Likes

We need to make sure sub categories are included in parent categories, eg:

First one is filtered on: Support->wordpress and we see there are 2 flags 24th march 2018 but second screen is Filtering only on Support and we don’t see these 2 flags on 24th march 2018:


Also it’s not only about tests about category filtering in report_spec.rb, there are already tests for some of them. It’s in multiple parts:

  • checking if any report doesn’t support category filtering today and you think should support it and then add it
  • add category filtering tests to any report that support category filtering
4 Likes

Also, many of the current reports in admin are missing the category dropdown even though it is applicable, that needs fixing sooner rather than later.

2 Likes

Making some changes about Report view UX improvements when filtering on category
Comparing discourse:master…misaka4e21:report-specs · discourse/discourse · GitHub
https://github.com/discourse/discourse/pull/6241

Currently implemented:

  • category_filtering
    1. report_top_referred_topics
    2. report_top_traffic_sources
    3. report_post_edit
  • category_filtering with subcategory topics
    1. report_top_referred_topics
    2. report_top_traffic_sources
    3. report_post_edit
    4. report_posts
    5. report_topics
    6. report_topics_with_no_response
  • category_filtering tests (without subcategory topics)
    1. report_posts
    2. report_topics_with_no_response
  • subcategory topics tests
    1. in_category_and_subcategories in topic_spec.rb
    2. flags and topics_with_no_response in report_spec.rb
6 Likes