Bug 27321 - Make excluded database columns in system preferences more clearly disabled
Summary: Make excluded database columns in system preferences more clearly disabled
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial
Assignee: Lucas Gass (lukeg)
QA Contact: Testopia
URL:
Keywords: Manual
Depends on: 27261
Blocks:
  Show dependency treegraph
 
Reported: 2020-12-31 15:35 UTC by Lucas Gass (lukeg)
Modified: 2021-12-13 21:08 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement styles non-selectable database columns in system preferences in a light grey (#cccccc), making them easier to identify. Currently the checkbox and label are the same color as selectable columns.
Version(s) released in:
21.05.00,20.11.03
Circulation function:


Attachments
Bug 27321: make disabled labels #cccccc (2.05 KB, patch)
2020-12-31 15:41 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 27321: make disabled labels #cccccc (2.11 KB, patch)
2020-12-31 18:35 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 27321: (follow-up) Use class instead of style attribute. (2.31 KB, patch)
2021-01-11 19:39 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 27321: Make disabled DB columns clearly disabled visually (2.67 KB, patch)
2021-01-12 23:45 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 27321: Make disabled DB columns clearly disabled visually (2.71 KB, patch)
2021-01-30 02:16 UTC, David Nind
Details | Diff | Splinter Review
Bug 27321: Make disabled DB columns clearly disabled visually (2.77 KB, patch)
2021-01-31 14:31 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass (lukeg) 2020-12-31 15:35:34 UTC
Bug 17364 added the ability to exclude database columns in system preferences. When something is disabled the checkbox is disabled but it is still hard to tell its disabled because the corresponding label remains the same color as all the others.
Comment 1 Lucas Gass (lukeg) 2020-12-31 15:41:52 UTC
Created attachment 114761 [details] [review]
Bug 27321: make disabled labels #cccccc

To test:
1. Apply patch and its dependency (bug 17364)
2. Go the system pref BorroweUnwantedFields
3. branchcode should cleary stand out as disabled (#cccccc)
Comment 2 Andrew Fuerste-Henry 2020-12-31 18:35:56 UTC
Created attachment 114763 [details] [review]
Bug 27321: make disabled labels #cccccc

To test:
1. Apply patch and its dependency (bug 17364)
2. Go the system pref BorroweUnwantedFields
3. branchcode should cleary stand out as disabled (#cccccc)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 3 Fridolin Somers 2021-01-04 08:22:45 UTC
Oh style inside HTML :/

In my opinion it whould be better into CSS file.
With selector : .dbcolumn_selection:disabled
Comment 4 Lucas Gass (lukeg) 2021-01-04 22:36:54 UTC
(In reply to Fridolin Somers from comment #3)
> Oh style inside HTML :/
> 
> In my opinion it whould be better into CSS file.
> With selector : .dbcolumn_selection:disabled

.dbcolumn_selection:disabled will style the disabled input but not it's parent, the label. In my opinion we want to be able to make the label have a gray color (#cccccc) 

Since CSS cannot target an element's parent I chose to style inline.
Comment 5 Fridolin Somers 2021-01-05 08:01:55 UTC
(In reply to Lucas Gass from comment #4)
> (In reply to Fridolin Somers from comment #3)
> > Oh style inside HTML :/
> > 
> > In my opinion it whould be better into CSS file.
> > With selector : .dbcolumn_selection:disabled
> 
> .dbcolumn_selection:disabled will style the disabled input but not it's
> parent, the label. In my opinion we want to be able to make the label have a
> gray color (#cccccc) 
> 
> Since CSS cannot target an element's parent I chose to style inline.

Oooo indeed my mistake :O
Thanks a lot for the explanation.
Comment 6 Owen Leonard 2021-01-11 19:39:53 UTC
Created attachment 115045 [details] [review]
Bug 27321: (follow-up) Use class instead of style attribute.

This patch relplaces the inline style and uses a class name instead.
SCSS is modified, so rebuild the staff client CSS before testing
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
Comment 7 Katrin Fischer 2021-01-12 22:45:22 UTC
Can we please get a quick sign-off here so I can move on with the dependent bug? :)
Comment 8 Lucas Gass (lukeg) 2021-01-12 23:30:43 UTC
(In reply to Owen Leonard from comment #6)
> Created attachment 115045 [details] [review] [review]
> Bug 27321: (follow-up) Use class instead of style attribute.
> 
> This patch relplaces the inline style and uses a class name instead.
> SCSS is modified, so rebuild the staff client CSS before testing
> (https://wiki.koha-community.org/wiki/
> Working_with_SCSS_in_the_OPAC_and_staff_client).

Owen, this is a much smarter way to do it than with the inline style I was using. However there is one problem. If I apply this and look at borrowerUnwantedField the disabled class is applied to 'branchcode' but it is also applied to every subsequent db column. 

I think in the else block we need tell it which class to have.
Comment 9 Lucas Gass (lukeg) 2021-01-12 23:45:56 UTC
Created attachment 115103 [details] [review]
Bug 27321: Make disabled DB columns clearly disabled visually

To test:
1. Apply patch and its dependency (bug 17364)
2. Rebuild the CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client)
3. Go the system pref BorroweUnwantedFields
4. branchcode should cleary stand out as disabled (#cccccc)
Comment 10 David Nind 2021-01-30 02:16:28 UTC
Created attachment 116088 [details] [review]
Bug 27321: Make disabled DB columns clearly disabled visually

To test:
1. Apply patch and its dependency (bug 17364)
2. Rebuild the CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client)
3. Go the system pref BorroweUnwantedFields
4. branchcode should cleary stand out as disabled (#cccccc)

Signed-off-by: David Nind <david@davidnind.com>
Comment 11 David Nind 2021-01-30 02:18:03 UTC
I had trouble getting this patch to apply with the dependencies, but managed to git there in the end:
- git bz apply 17364
- git bz apply 27321 (git bz apply 27321 - Bug 27321 Depends on bug 27261 Follow? [(y)es, (n)o] y)

If I just went git bz apply 27321 and said yes to dependent bugs (only 27261) then it wouldn't apply.

In the test plan I'm assuming BorroweUnwantedFields should be PatronSelfRegistrationBorrowerUnwantedField
Comment 12 Katrin Fischer 2021-01-31 14:31:23 UTC
Created attachment 116118 [details] [review]
Bug 27321: Make disabled DB columns clearly disabled visually

To test:
1. Apply patch and its dependency (bug 17364)
2. Rebuild the CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client)
3. Go the system pref BorroweUnwantedFields
4. branchcode should cleary stand out as disabled (#cccccc)

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 13 Katrin Fischer 2021-01-31 14:31:50 UTC
Updating this to a bug fix as I think we should not push the dependent bugs without this final style fix.
Comment 14 Jonathan Druart 2021-02-01 16:26:41 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 15 Fridolin Somers 2021-02-05 16:03:11 UTC
Pushed to 20.11.x for 20.11.03
Comment 16 Andrew Fuerste-Henry 2021-02-09 21:11:38 UTC
Missing dependency, not backporting to 20.05