Bug 31879

Summary: Convert mainpage.css to SCSS
Product: Koha Reporter: Owen Leonard <oleonard>
Component: Staff interfaceAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: enhancement    
Priority: P5 - low CC: david, gmcharlt, lucas
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Small patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
22.11.00
Circulation function:
Attachments: Bug 31879: Convert mainpage.css to SCSS
Bug 31879: Convert mainpage.css to SCSS
Bug 31879: Convert mainpage.css to SCSS

Description Owen Leonard 2022-10-19 18:43:46 UTC
Now that we are making more use of SCSS variables it would be efficient to be able to use them in mainpage.css where some common colors are specified. Plus any additional auto-minification we can do is helpful.
Comment 1 Owen Leonard 2022-10-19 18:56:52 UTC Comment hidden (obsolete)
Comment 2 David Nind 2022-10-19 19:07:42 UTC
Created attachment 142203 [details] [review]
Bug 31879: Convert mainpage.css to SCSS

This patch creates a new SCSS file to be used to generate mainpage.css,
the stylesheet used specifically for the staff interface home page.

The patch makes visible changes in only two places: Removing borders
from two elements to make them consistent with the new staff interface
design:
 - div.pending-info, where pending actions like patrons requesting
   modifications are shown.
 - div#area-userblock, where the contents of the IntranetmainUserblock
   system preference are displayed.

Otherwise the changes are all for the purpose of properly nesting
elements according to SCSS rules and other fixes related to stylelint
rules.

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

View the main page of the staff interface. Everything should look like
it did before except for those elements which have had their borders
removed.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2022-10-19 19:12:55 UTC
Testing notes (using koha-testing-docker):

- Added a purchase suggestion to show the pending area.

- Added some text to IntranetmainUserblock system preference.
Comment 4 Katrin Fischer 2022-10-22 10:28:55 UTC
Created attachment 142458 [details] [review]
Bug 31879: Convert mainpage.css to SCSS

This patch creates a new SCSS file to be used to generate mainpage.css,
the stylesheet used specifically for the staff interface home page.

The patch makes visible changes in only two places: Removing borders
from two elements to make them consistent with the new staff interface
design:
 - div.pending-info, where pending actions like patrons requesting
   modifications are shown.
 - div#area-userblock, where the contents of the IntranetmainUserblock
   system preference are displayed.

Otherwise the changes are all for the purpose of properly nesting
elements according to SCSS rules and other fixes related to stylelint
rules.

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

View the main page of the staff interface. Everything should look like
it did before except for those elements which have had their borders
removed.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Tomás Cohen Arazi (tcohen) 2022-10-24 16:24:08 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!