Bug 25314 - Make OPAC facets collapse
Summary: Make OPAC facets collapse
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Lucas Gass
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-29 15:43 UTC by Lucas Gass
Modified: 2024-01-01 12:50 UTC (History)
3 users (show)

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


Attachments
Bug 25314: Make OPAC facets collapse (7.34 KB, patch)
2020-04-29 15:47 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 25314: Make OPAC facets collapse (7.89 KB, patch)
2020-04-29 16:09 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 25314: Make OPAC facets collapse (8.46 KB, patch)
2020-04-29 21:27 UTC, Lucas Gass
Details | Diff | Splinter Review
Failed QA: facets showing "<<<< HEAD" (123.74 KB, image/jpeg)
2020-07-27 20:49 UTC, Michael Adamyk
Details
Bug 25314: Make OPAC facets collapse (8.46 KB, patch)
2020-07-27 21:16 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 25314: Make OPAC facets collapse (8.46 KB, patch)
2020-07-28 01:40 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 25314: Add system pref to control expanding/collapsing facets (5.18 KB, patch)
2020-07-28 01:40 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 25314: Add system pref to control expanding/collapsing facets (6.07 KB, patch)
2020-07-28 01:45 UTC, Lucas Gass
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass 2020-04-29 15:43:38 UTC
I propose making facets collapse by defualt. I don't think we need to continue to have 'Show less' and 'Show more' buttons. If everything is collapsed by default we can show everything within that list when it is expanded.
Comment 1 Lucas Gass 2020-04-29 15:47:44 UTC
Created attachment 103957 [details] [review]
Bug 25314: Make OPAC facets collapse

TO TEST:
1. Apply patch
2. Regenerate CSS (yarn build --view opac)
3. DO a search and look at the facets. They should be collapsed.
4. Try mousing over a facet heading and click, that list should appear.
5. Try clicking the heading again to make th facet disappear.
6. Play around with different limiters and make sure eveything works.
Comment 2 Lucas Gass 2020-04-29 16:09:46 UTC
Created attachment 103958 [details] [review]
Bug 25314: Make OPAC facets collapse

TO TEST:
1. Apply patch
2. Regenerate CSS (yarn build --view opac)
3. DO a search and look at the facets. They should be collapsed.
4. Try mousing over a facet heading and click, that list should appear.
5. Try clicking the heading again to make th facet disappear.
6. Play around with different limiters and make sure eveything works.
Comment 3 Owen Leonard 2020-04-29 17:14:47 UTC
This looks good! I wonder if we need a way for the library to define which facet(s) should be expanded by default?
Comment 4 Lucas Gass 2020-04-29 21:27:02 UTC
Created attachment 103997 [details] [review]
Bug 25314: Make OPAC facets collapse

TO TEST:
1. Apply patch
2. Regenerate CSS (yarn build --view opac)
3. DO a search and look at the facets. They should be collapsed.
4. Try mousing over a facet heading and click, that list should appear.
5. Try clicking the heading again to make th facet disappear.
6. Play around with different limiters and make sure eveything works.
7. Check aria labels look correct and you can tab through facets without a keyboard.
Comment 5 Lucas Gass 2020-04-29 21:28:56 UTC
Owen,

Would this be a system preference where libraries could define which facets should be expanded by default?
Comment 6 Frédéric Demians 2020-04-30 07:39:38 UTC
I anticipate that a lot of people will miss the 'by default expanded' facets.
Comment 7 Michael Adamyk 2020-07-27 20:49:30 UTC
Created attachment 107447 [details]
Failed QA: facets showing "<<<< HEAD"

Tested this patch. Confirmed that without the patch, the search facets were all showing uncollapsed. 

I added the patch, and although the facets are now collapsed, they are also not appearing correctly. Each facet is displaying multiple times, with the text size changing each time it appears. There is also "======" and "<<<<<< HEAD" showing mixed in with the facets. See attachment "Bug25314.1"
Comment 8 Lucas Gass 2020-07-27 20:52:42 UTC
(In reply to madamyk from comment #7)
> Created attachment 107447 [details]
> Failed QA: facets showing "<<<< HEAD"
> 
> Tested this patch. Confirmed that without the patch, the search facets were
> all showing uncollapsed. 
> 
> I added the patch, and although the facets are now collapsed, they are also
> not appearing correctly. Each facet is displaying multiple times, with the
> text size changing each time it appears. There is also "======" and "<<<<<<
> HEAD" showing mixed in with the facets. See attachment "Bug25314.1"

Thanks for testing, this patch needs to be rebased for master. I will do so.
Comment 9 Lucas Gass 2020-07-27 21:16:15 UTC
Created attachment 107448 [details] [review]
Bug 25314: Make OPAC facets collapse

TO TEST:
1. Apply patch
2. Regenerate CSS (yarn build --view opac)
3. DO a search and look at the facets. They should be collapsed.
4. Try mousing over a facet heading and click, that list should appear.
5. Try clicking the heading again to make th facet disappear.
6. Play around with different limiters and make sure eveything works.
7. Check aria labels look correct and you can tab through facets without a keyboard.
Comment 10 Lucas Gass 2020-07-28 01:40:18 UTC
Created attachment 107450 [details] [review]
Bug 25314: Make OPAC facets collapse

TO TEST:
1. Apply patch
2. Regenerate CSS (yarn build --view opac)
3. DO a search and look at the facets. They should be collapsed.
4. Try mousing over a facet heading and click, that list should appear.
5. Try clicking the heading again to make th facet disappear.
6. Play around with different limiters and make sure eveything works.
7. Check aria labels look correct and you can tab through facets without a keyboard.
Comment 11 Lucas Gass 2020-07-28 01:40:21 UTC
Created attachment 107451 [details] [review]
Bug 25314: Add system pref to control expanding/collapsing facets

TO TEST:
1. Apply patch
2. Regenerate CSS (yarn build --view opac), updatedatabase and restart_all
3. DO a search and look at the facets. They should be collapsed.
4. Try mousing over a facet heading and click, that list should appear.
5. Try clicking the heading again to make th facet disappear.
6. Play around with different limiters and make sure eveything works.
7. Check aria labels look correct and you can tab through facets without a keyboard.
8. Find the system pref OPACFacetsCollapseByDefault in OPAC > Features
9. Try toggling different facets and make sure they all expland/collapse correctly
Comment 12 Lucas Gass 2020-07-28 01:45:28 UTC
Created attachment 107452 [details] [review]
Bug 25314: Add system pref to control expanding/collapsing facets

TO TEST:
1. Apply patch
2. Regenerate CSS (yarn build --view opac), updatedatabase and restart_all
3. DO a search and look at the facets. They should be collapsed.
4. Try mousing over a facet heading and click, that list should appear.
5. Try clicking the heading again to make th facet disappear.
6. Play around with different limiters and make sure eveything works.
7. Check aria labels look correct and you can tab through facets without a keyboard.
8. Find the system pref OPACFacetsCollapseByDefault in OPAC > Features
9. Try toggling different facets and make sure they all expland/collapse correctly
Comment 13 Lucas Gass 2020-08-19 20:08:04 UTC
Doesn't look like this has been tested so I'm not sure why the status was changed to 'Signed-off', reseting this to 'Needs Signoff'
Comment 14 Ivan Dziuba 2020-08-19 21:05:28 UTC
(In reply to Lucas Gass from comment #13)
> Doesn't look like this has been tested so I'm not sure why the status was
> changed to 'Signed-off', reseting this to 'Needs Signoff'

I tested this bug. It works.
Comment 15 Lucas Gass 2020-08-19 21:18:10 UTC
Ivan,

In that case you need to also upload the signed-off patch as attachment and mark the initial one as obsolete.
Comment 16 Katrin Fischer 2020-08-19 23:35:40 UTC
We can take care of adding the sign off line in QA this time, but signing off patches is easy with the sandboxes if you want to give it a try:
https://wiki.koha-community.org/wiki/Sandboxes
Comment 17 Lucas Gass 2020-08-20 15:29:35 UTC
There are some issues with this patchset that I did not realize when I wrote it. Mainly related to the use of pseudo elements as checkmarks. Pseudo elements are semantically meaningless. From what I understand pseudo elements must only be used for decorative purposes only 

This would be an accessibility issue so I am failing QA on this until a better solution can be devised
Comment 18 Owen Leonard 2022-12-02 13:28:10 UTC
I notice the Bootstrap Collapse component uses pseudo elements but adds the "aria-expanded" attribute:

https://getbootstrap.com/docs/3.4/javascript/#collapse

Would that solve the issue?
Comment 19 Katrin Fischer 2024-01-01 12:50:39 UTC
Might be nice to revisit this one :)