Bug 27035 - Shows the number of results in a facet after facet selection
Summary: Shows the number of results in a facet after facet selection
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Ivan Dziuba
QA Contact: Kyle M Hall
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-16 16:18 UTC by Ivan Dziuba
Modified: 2022-11-17 16:01 UTC (History)
9 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00


Attachments
Bug 27035: Shows the number of results in a facets. Test: 1. Apply the patch. 2. The number of results is displayed for each facet after searching. (2.24 KB, text/plain)
2020-11-16 16:28 UTC, Ivan Dziuba
Details
Bug 27035: Shows the number of results in a facets. (2.24 KB, text/plain)
2020-11-16 16:42 UTC, Ivan Dziuba
Details
Bug 27035: Shows the number of results in a facets after facet selection (1.79 KB, patch)
2020-11-16 17:20 UTC, Ivan Dziuba
Details | Diff | Splinter Review
Bug 27035: Shows the number of results in a facets after facet selection (2.04 KB, patch)
2020-11-16 17:59 UTC, Ivan Dziuba
Details | Diff | Splinter Review
Bug 27035: Shows the number of results in a facets after facet selection (2.05 KB, patch)
2022-03-23 19:35 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 27035: Shows the number of results in a facets after facet selection (2.10 KB, patch)
2022-03-24 17:09 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 27035: Shows the number of results in a facets after facet selection (2.16 KB, patch)
2022-03-31 18:18 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Dziuba 2020-11-16 16:18:24 UTC Comment hidden (obsolete)
Comment 1 Ivan Dziuba 2020-11-16 16:28:09 UTC Comment hidden (obsolete)
Comment 2 Ivan Dziuba 2020-11-16 16:42:36 UTC Comment hidden (obsolete)
Comment 3 Ivan Dziuba 2020-11-16 16:56:40 UTC Comment hidden (obsolete)
Comment 4 Ivan Dziuba 2020-11-16 17:01:12 UTC Comment hidden (obsolete)
Comment 5 Ivan Dziuba 2020-11-16 17:02:47 UTC Comment hidden (obsolete)
Comment 6 Ivan Dziuba 2020-11-16 17:20:32 UTC Comment hidden (obsolete)
Comment 7 Ivan Dziuba 2020-11-16 17:59:37 UTC
Created attachment 113680 [details] [review]
Bug 27035: Shows the number of results in a facets after facet selection

System preferences:
displayFacetCount - Show;

1. Let's search
2. Near to each of the facets, we see the number of results (n)
3. Click on any of the facets and filter the result
4. Opposite the selected facets, the number of results is not displayed
Ex.
Marriage Fiction [x]

Apply the patch
1. Let's search
2. Near to each of the facets, we see the number of results (n)
3. Click on any of the facets and filter the result
4. Now, opposite the selected facets, the number of results is displayed
Ex.
Marriage Fiction (2) [x]
Comment 8 Lucas Gass 2020-12-16 00:03:44 UTC
Hi Ivan,

This works for me but it is a bit confusing when you attempt to apply 2 or more filters at a time.

-I apply your patch and do an OPAC search. 
-Then I filter to only show Centerville results. (210 results)
-I see 210 appear in bold next to the Centerville filter 
-Now I filter to only show Non-Fiction results, while maintaining the Centerville filter.
-There are 4 results that are Non-Fiction items from Centerville.
-Now both filters (Centerville and Non-fiction) show the number 4 in bold.

I understand this might be correct as we now have 4 search results but it is confusing to me.
Comment 9 Fridolin Somers 2020-12-16 16:02:04 UTC
Indeed, number of results are useful before selecting a facet.
After, it may be confusing and not really useful.
Comment 10 Blou 2022-03-23 14:44:20 UTC
Would you have suggestion on how this could be improved?

This is an upgrade to the current status, as such it could move forward.  Your points are valid, though, so if you have an idea on how the logic should work, we're very much listening.

I put it back in Need Signoff to wake things up.
Comment 11 Lucas Gass 2022-03-23 18:47:00 UTC
(In reply to Blou from comment #10)
> Would you have suggestion on how this could be improved?
> 
> This is an upgrade to the current status, as such it could move forward. 
> Your points are valid, though, so if you have an idea on how the logic
> should work, we're very much listening.
> 
> I put it back in Need Signoff to wake things up.

I am assuming many libraries are going to want to hide this from display. Can we get a distinct class the number wrapped in parenthesis? 

I know we could hide it by targeting the <strong> element but I would much rather see a distinct class here.
Comment 12 Shi Yao Wang 2022-03-23 19:35:54 UTC
Created attachment 132077 [details] [review]
Bug 27035: Shows the number of results in a facets after facet selection

System preferences:
displayFacetCount - Show;

1. Let's search
2. Near to each of the facets, we see the number of results (n)
3. Click on any of the facets and filter the result
4. Opposite the selected facets, the number of results is not displayed
Ex.
Marriage Fiction [x]

Apply the patch
1. Let's search
2. Near to each of the facets, we see the number of results (n)
3. Click on any of the facets and filter the result
4. Now, opposite the selected facets, the number of results is displayed
Ex.
Marriage Fiction (2) [x]
Comment 13 Lucas Gass 2022-03-24 17:09:03 UTC
Created attachment 132195 [details] [review]
Bug 27035: Shows the number of results in a facets after facet selection

System preferences:
displayFacetCount - Show;

1. Let's search
2. Near to each of the facets, we see the number of results (n)
3. Click on any of the facets and filter the result
4. Opposite the selected facets, the number of results is not displayed
Ex.
Marriage Fiction [x]

Apply the patch
1. Let's search
2. Near to each of the facets, we see the number of results (n)
3. Click on any of the facets and filter the result
4. Now, opposite the selected facets, the number of results is displayed
Ex.
Marriage Fiction (2) [x]

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 14 Kyle M Hall 2022-03-31 18:18:00 UTC
Created attachment 132807 [details] [review]
Bug 27035: Shows the number of results in a facets after facet selection

System preferences:
displayFacetCount - Show;

1. Let's search
2. Near to each of the facets, we see the number of results (n)
3. Click on any of the facets and filter the result
4. Opposite the selected facets, the number of results is not displayed
Ex.
Marriage Fiction [x]

Apply the patch
1. Let's search
2. Near to each of the facets, we see the number of results (n)
3. Click on any of the facets and filter the result
4. Now, opposite the selected facets, the number of results is displayed
Ex.
Marriage Fiction (2) [x]

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 15 Fridolin Somers 2022-04-12 09:41:14 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 16 Catrina Berka 2022-11-17 16:01:07 UTC
Filed bug 32252 - this does not appear to be resolved in 22.05