Bug 27493

Summary: Improve structure and style of checkbox columns in tables
Product: Koha Reporter: Martin Renvoize <martin.renvoize>
Component: OPACAssignee: Martin Renvoize <martin.renvoize>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: caroline.cyr-la-rose, fridolin.somers, jonathan.druart, oleonard, sally.healey
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27440
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.05.00
Bug Depends on:    
Bug Blocks: 31182    
Attachments: Bug 27493: Set column wifth for checkbox only columns
Bug 27493: Add styling for hidden columns
Bug 27493: Set column wifth for checkbox only columns
Bug 27493: Add styling for hidden columns
Bug 27493: Add styling for hidden columns
Bug 27493: Set column width for checkbox only columns
Bug 27493: Add styling for hidden columns
Bug 27493: (follow-up) Remove redundant class

Description Martin Renvoize 2021-01-20 09:03:30 UTC
The width of the checkbox column in most tables in the OPAC is dynamically assigned and as such is often very wide for it's minimal content.

I propose to set these fields to a fixed width as we know how large a checkbox is likely to be.
Comment 1 Martin Renvoize 2021-01-20 09:24:02 UTC
Created attachment 115416 [details] [review]
Bug 27493: Set column wifth for checkbox only columns

This patch updates the global OPAC css such that selectcol type columns
in tables are fixed width at 1ch to ensure these columns do not get
unneccessarily wide.

To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

Test plan
PAGES: opac-basket, opac-messaging, opac-results, opac-search-history,
opac-suggestions and opac-tags.
1/ Notice that the column containing a checkbox on each of the above
pages is of a mised width, often much larger than required
2/ Apply the patch and rebuild the css file as described above
3/ Notices that the column containing a checkbox on each fo the above
pages is now of a standard, sensible, width.
4/ Signoff
Comment 2 Martin Renvoize 2021-01-20 12:44:10 UTC
Created attachment 115428 [details] [review]
Bug 27493: Add styling for hidden columns

I'm sure adding a 'hidden' class to a table column used to remove it
from display entirely.. seems that's no longer the case so we add the
CSS back in here.
Comment 3 PTFS Europe Sandboxes 2021-01-25 12:00:41 UTC
Created attachment 115753 [details] [review]
Bug 27493: Set column wifth for checkbox only columns

This patch updates the global OPAC css such that selectcol type columns
in tables are fixed width at 1ch to ensure these columns do not get
unneccessarily wide.

To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

Test plan
PAGES: opac-basket, opac-messaging, opac-results, opac-search-history,
opac-suggestions and opac-tags.
1/ Notice that the column containing a checkbox on each of the above
pages is of a mised width, often much larger than required
2/ Apply the patch and rebuild the css file as described above
3/ Notices that the column containing a checkbox on each fo the above
pages is now of a standard, sensible, width.
4/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Comment 4 PTFS Europe Sandboxes 2021-01-25 12:00:44 UTC
Created attachment 115754 [details] [review]
Bug 27493: Add styling for hidden columns

I'm sure adding a 'hidden' class to a table column used to remove it
from display entirely.. seems that's no longer the case so we add the
CSS back in here.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Comment 5 Sally 2021-01-25 12:07:25 UTC
Works as described in all locations.

Whilst testing, I noticed an issue on the tooltip for opac-messaging.pl so I've logged that as another bug.  Bug 27543.
Comment 6 Katrin Fischer 2021-01-26 22:04:36 UTC
Created attachment 115847 [details] [review]
Bug 27493: Add styling for hidden columns

I'm sure adding a 'hidden' class to a table column used to remove it
from display entirely.. seems that's no longer the case so we add the
CSS back in here.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Jonathan Druart 2021-01-28 08:35:16 UTC
Created attachment 115922 [details] [review]
Bug 27493: Set column width for checkbox only columns

This patch updates the global OPAC css such that selectcol type columns
in tables are fixed width at 1ch to ensure these columns do not get
unneccessarily wide.

To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

Test plan
PAGES: opac-basket, opac-messaging, opac-results, opac-search-history,
opac-suggestions and opac-tags.
1/ Notice that the column containing a checkbox on each of the above
pages is of a mised width, often much larger than required
2/ Apply the patch and rebuild the css file as described above
3/ Notices that the column containing a checkbox on each fo the above
pages is now of a standard, sensible, width.
4/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Jonathan Druart 2021-01-28 08:35:19 UTC
Created attachment 115923 [details] [review]
Bug 27493: Add styling for hidden columns

I'm sure adding a 'hidden' class to a table column used to remove it
from display entirely.. seems that's no longer the case so we add the
CSS back in here.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 9 Jonathan Druart 2021-01-28 08:35:29 UTC
- Fixed typo in first patch wifth vs width
- Added missing signed-off-by line from QA
Comment 10 Jonathan Druart 2021-01-28 09:30:38 UTC
I don't think we need the 2 classes, "select" and "selectcol". I didn't find .select in the .scss files, and the only places it was used was opac-results.tt, where it has been removed.

Owen, can you take a look please?
Comment 11 Owen Leonard 2021-01-28 12:59:56 UTC
Created attachment 115932 [details] [review]
Bug 27493: (follow-up) Remove redundant class

This patch modifies the templates so that instances of "class='select
selectcol' are replaced with "class='selectcol'". I could find no
instances of the "select" class being used in CSS or JS.
Comment 12 Jonathan Druart 2021-01-28 16:35:00 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 13 Fridolin Somers 2021-02-05 15:22:43 UTC
Enhancement not pushed to 20.11.x