Bug 27072

Summary: Don't process staff interface CSS with rtlcss
Product: Koha Reporter: Owen Leonard <oleonard>
Component: Architecture, internals, and plumbingAssignee: Owen Leonard <oleonard>
Status: RESOLVED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: andrew, fridolin.somers, jonathan.druart, martin.renvoize
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Text to go in the release notes:
Version(s) released in:
20.11.00
Bug Depends on: 20168    
Bug Blocks:    
Attachments: Bug 27072: Don't process staff interface CSS with rtlcss
Bug 27072: Don't process staff interface CSS with rtlcss
Bug 27072: Don't process staff interface CSS with rtlcss
Bug 27072: Don't process staff interface CSS with rtlcss

Description Owen Leonard 2020-11-20 20:13:17 UTC
The conversion of OPAC templates to Bootstrap 4 included the introduction of automatic generation of right-to-left CSS using rtlcss(). This process unintentionally results in the creation of an RTL version of staff-global.css although it is unused.

The ultimate goal should be to update the staff interface to include RTL CSS generated by rtlcss, but in the meantime we can make a change to gulpfile.js to exclude the staff client CSS from processing.
Comment 1 Jonathan Druart 2020-11-23 13:14:23 UTC
I'd like this one for 20.11 if possible.
Comment 2 Owen Leonard 2020-11-23 14:17:35 UTC
Created attachment 113925 [details] [review]
Bug 27072: Don't process staff interface CSS with rtlcss

This patch changes Koha's gulpfile to add a check for the "OPAC" context
before using rtlcss to automatically build right-to-left versions of
CSS.

To test, apply the patch and test the process of building CSS for both
the OPAC and staff client:

- "yarn css --view opac" : This should build unminified CSS for the
    OPAC, including map files in bootstrap/css/maps

- "yarn build --view opac" : This should build minified CSS for the
  OPAC and generate the RTL versions.

- "yarn css" : This should build unminified CSS for the staff
  interface, including map files in prog/css/maps.

- "yarn build" : This should build minified CSS for the
   staff interface, with no creation of RTL versions.
Comment 3 David Nind 2020-11-23 21:32:24 UTC
Created attachment 113938 [details] [review]
Bug 27072: Don't process staff interface CSS with rtlcss

This patch changes Koha's gulpfile to add a check for the "OPAC" context
before using rtlcss to automatically build right-to-left versions of
CSS.

To test, apply the patch and test the process of building CSS for both
the OPAC and staff client:

- "yarn css --view opac" : This should build unminified CSS for the
    OPAC, including map files in bootstrap/css/maps

- "yarn build --view opac" : This should build minified CSS for the
  OPAC and generate the RTL versions.

- "yarn css" : This should build unminified CSS for the staff
  interface, including map files in prog/css/maps.

- "yarn build" : This should build minified CSS for the
   staff interface, with no creation of RTL versions.

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 Jonathan Druart 2020-11-24 14:04:21 UTC
Created attachment 113950 [details] [review]
Bug 27072: Don't process staff interface CSS with rtlcss

This patch changes Koha's gulpfile to add a check for the "OPAC" context
before using rtlcss to automatically build right-to-left versions of
CSS.

To test, apply the patch and test the process of building CSS for both
the OPAC and staff client:

- "yarn css --view opac" : This should build unminified CSS for the
    OPAC, including map files in bootstrap/css/maps

- "yarn build --view opac" : This should build minified CSS for the
  OPAC and generate the RTL versions.

- "yarn css" : This should build unminified CSS for the staff
  interface, including map files in prog/css/maps.

- "yarn build" : This should build minified CSS for the
   staff interface, with no creation of RTL versions.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 5 Jonathan Druart 2020-11-24 14:05:31 UTC
Thank, Owen!
Comment 6 Martin Renvoize 2020-11-24 14:06:24 UTC
Created attachment 113951 [details] [review]
Bug 27072: Don't process staff interface CSS with rtlcss

This patch changes Koha's gulpfile to add a check for the "OPAC" context
before using rtlcss to automatically build right-to-left versions of
CSS.

To test, apply the patch and test the process of building CSS for both
the OPAC and staff client:

- "yarn css --view opac" : This should build unminified CSS for the
    OPAC, including map files in bootstrap/css/maps

- "yarn build --view opac" : This should build minified CSS for the
  OPAC and generate the RTL versions.

- "yarn css" : This should build unminified CSS for the staff
  interface, including map files in prog/css/maps.

- "yarn build" : This should build minified CSS for the
   staff interface, with no creation of RTL versions.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize 2020-11-24 14:07:07 UTC
Ohh, we clashed.. I was just QAing too.. double signoff :)
Comment 8 Jonathan Druart 2020-11-25 09:00:07 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 9 Andrew Fuerste-Henry 2020-12-14 15:04:13 UTC
Missing dependency, not backported to 20.05