The fistful of selectors in https://git.koha-community.org/Koha-community/Koha/src/commit/a57278f39b8c5b7a82b21671f266dbf32e2d41a0/koha-tmpl/intranet-tmpl/prog/css/print.css#L289 intend to hide things like the header search and the button to send results to batch modification when SQL reports are printed, but after the redesign they no longer apply. I think that's because staff-global.css, which is referenced after print.css, previously wasn't setting display for them, and now for most it does. It can be fixed with my favorite CSS hammer, !important, but I've been told that's not the only hammer which exists. Is there something else we should do instead?
*** Bug 29979 has been marked as a duplicate of this bug. ***
Created attachment 152775 [details] [review] Bug 34119 - Use !important to make print.css beat staff-global.css at hiding SQL report cruft Test plan: 1. Run an SQL report (or create a simple one like "select itemnumber from items" if you don't have any). Shift-reload the results, since you probably have print.css cached. 2. File - Print 3. Make sure the print preview doesn't show the header search box, or the New report, Edit, Run report buttons (the logo, the hamburger menu and the help ? icon are a separate bug).
I should know better than to ask a question in any form other than a patch :)
Should we hide the other elements on the page that would be unwanted when printing? The Koha logo and help link still appear.
At the time I wrote it, this seemed like the simplest possible SO+PQA+backport patch to keep us from wasting a third of a sheet of paper any time someone prints a report, and then I was going to reopen cait's bug 29979 to deal with the problem of .navbar replacing, um, probably several of the selectors in this rule, I'm not sure exactly which, and adding in one for anything new that's not in .navbar. I'm going to be gone until August 1st, and I've already solved the problem for myself in IntranetUserCSS, so if someone wants to take this bug and sort through what selectors have completely disappeared, not just disappeared from reports, and replace them with the new thing, and also fix !important in the same patch, feel free.
(In reply to Lucas Gass from comment #4) > Should we hide the other elements on the page that would be unwanted when > printing? The Koha logo and help link still appear. I'd say so!
(In reply to Phil Ringnalda from comment #5) > At the time I wrote it, this seemed like the simplest possible > SO+PQA+backport patch to keep us from wasting a third of a sheet of paper > any time someone prints a report, and then I was going to reopen cait's bug > 29979 to deal with the problem of .navbar replacing, um, probably several of > the selectors in this rule, I'm not sure exactly which, and adding in one > for anything new that's not in .navbar. > > I'm going to be gone until August 1st, and I've already solved the problem > for myself in IntranetUserCSS, so if someone wants to take this bug and sort > through what selectors have completely disappeared, not just disappeared > from reports, and replace them with the new thing, and also fix !important > in the same patch, feel free. Can you share your code? Also please don't reopen, almost always better to have a new bug.
I copy-pasted this rule, added !important, and added the selector nav. Do we use a <nav> somewhere that it should be printed? Don't know, didn't test or grep.
Better to avoid "In Discussion" unless there is an argument that needs more people to be resolved.
*** Bug 35016 has been marked as a duplicate of this bug. ***
Created attachment 156798 [details] [review] Bug 34119: (Preliminary) Run stylelint fixes on print.css This patch corrects errors raised by the new stylelint configuration in print.css. Most of the fixes were made automatically by using the "--fix" option: npx stylelint koha-tmpl/intranet-tmpl/prog/css/print.css --fix Some examples of errors fixed automatically: - Expected indentation of 4 spaces - Unexpected whitespace before ":" - Unexpected unit - Expected single space before "{" - Expected newline after ";" in a multi-line declaration block Errors from use of "!important" have been ignored.
Created attachment 156799 [details] [review] Bug 34119: Improve staff interface print stylesheet following redesign This patch makes some updates to the staff interface print stylesheet in order to make it work better following the staff interface redesign. To test, apply the patch and clear your browser cache if necessary. In the staff client, go to various pages and view the print preview. The print view should exclude the header navigation, header search, page toolbars and page sidebars. - Pages with tabbed displays should show content from all tabs: e.g. bibliographic details, MARC editor. - In Reports, check that report results print well. - Pages with DataTables should print with table information visible but table controls hidden.
Created attachment 156813 [details] [review] Bug 34119: (Preliminary) Run stylelint fixes on print.css This patch corrects errors raised by the new stylelint configuration in print.css. Most of the fixes were made automatically by using the "--fix" option: npx stylelint koha-tmpl/intranet-tmpl/prog/css/print.css --fix Some examples of errors fixed automatically: - Expected indentation of 4 spaces - Unexpected whitespace before ":" - Unexpected unit - Expected single space before "{" - Expected newline after ";" in a multi-line declaration block Errors from use of "!important" have been ignored. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 156814 [details] [review] Bug 34119: Improve staff interface print stylesheet following redesign This patch makes some updates to the staff interface print stylesheet in order to make it work better following the staff interface redesign. To test, apply the patch and clear your browser cache if necessary. In the staff client, go to various pages and view the print preview. The print view should exclude the header navigation, header search, page toolbars and page sidebars. - Pages with tabbed displays should show content from all tabs: e.g. bibliographic details, MARC editor. - In Reports, check that report results print well. - Pages with DataTables should print with table information visible but table controls hidden. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
> - Pages with DataTables should print with table information visible but > table controls hidden. - tested patron page with a few checkouts displayed - tested order basket - tested patron search results --- Are those undesirable table controls?: https://pic.infini.fr/wk6zBOFT/RP5P0YA0.webp --- minor findings: - on record detail page, should the content of the descriptions tab be after the list of items? And same for acquisition details. No reliable idea on what is more relevant when printing, mentioning this just in case.
Created attachment 157160 [details] [review] Bug 34119: (Preliminary) Run stylelint fixes on print.css This patch corrects errors raised by the new stylelint configuration in print.css. Most of the fixes were made automatically by using the "--fix" option: npx stylelint koha-tmpl/intranet-tmpl/prog/css/print.css --fix Some examples of errors fixed automatically: - Expected indentation of 4 spaces - Unexpected whitespace before ":" - Unexpected unit - Expected single space before "{" - Expected newline after ";" in a multi-line declaration block Errors from use of "!important" have been ignored. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 157161 [details] [review] Bug 34119: Improve staff interface print stylesheet following redesign This patch makes some updates to the staff interface print stylesheet in order to make it work better following the staff interface redesign. To test, apply the patch and clear your browser cache if necessary. In the staff client, go to various pages and view the print preview. The print view should exclude the header navigation, header search, page toolbars and page sidebars. - Pages with tabbed displays should show content from all tabs: e.g. bibliographic details, MARC editor. - In Reports, check that report results print well. - Pages with DataTables should print with table information visible but table controls hidden. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(In reply to Victor Grousset/tuxayo from comment #15) > > - Pages with DataTables should print with table information visible but > > table controls hidden. > > - tested patron page with a few checkouts displayed > - tested order basket > - tested patron search results > > > --- > > Are those undesirable table controls?: > https://pic.infini.fr/wk6zBOFT/RP5P0YA0.webp > > --- I think removing them would be nice, but is probably a page specific change whie this takes care of the general elements. I think maybe we could take a closer look at other pages separately. Also: patron search results has a export > print option on the table that gives nice results :) > minor findings: > - on record detail page, should the content of the descriptions tab be after > the list of items? And same for acquisition details. No reliable idea on > what is more relevant when printing, mentioning this just in case. They both appear after the item list for me. And it doesn't matter which tab is active before switching to print layout.
(In reply to Katrin Fischer from comment #18) > I think removing them would be nice, but is probably a page specific change > whie this takes care of the general elements. I think maybe we could take a > closer look at other pages separately. Also: patron search results has a > export > print option on the table that gives nice results :) Alright, let's go with the current proposal then! :) > > minor findings: > > - on record detail page, should the content of the descriptions tab be after > > the list of items? And same for acquisition details. No reliable idea on > > what is more relevant when printing, mentioning this just in case. > > They both appear after the item list for me. And it doesn't matter which tab > is active before switching to print layout. My phrasing was weird. I meant that they are indeed after the item list, but should they? (It sounded that like I was suggesting that they should be after. But it's already the case)
(In reply to Victor Grousset/tuxayo from comment #19) > (In reply to Katrin Fischer from comment #18) > > I think removing them would be nice, but is probably a page specific change > > whie this takes care of the general elements. I think maybe we could take a > > closer look at other pages separately. Also: patron search results has a > > export > print option on the table that gives nice results :) > > Alright, let's go with the current proposal then! :) > > > > minor findings: > > > - on record detail page, should the content of the descriptions tab be after > > > the list of items? And same for acquisition details. No reliable idea on > > > what is more relevant when printing, mentioning this just in case. > > > > They both appear after the item list for me. And it doesn't matter which tab > > is active before switching to print layout. > > My phrasing was weird. I meant that they are indeed after the item list, but > should they? > (It sounded that like I was suggesting that they should be after. But it's > already the case) That's the sequence in the source code, I think it's correct.
Pushed to master for 23.11. Nice work everyone, thanks!
Pushed to 23.05.x for 23.05.05
Nice work everyone! Pushed to oldstable for 22.11.x