[Bug 32642] New: Loading spinner always visible when cover image is short (OPAC)
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 Bug ID: 32642 Summary: Loading spinner always visible when cover image is short (OPAC) Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Templates Assignee: oleonard@myacpl.org Reporter: caroline.cyr-la-rose@inlibro.com QA Contact: testopia@bugs.koha-community.org Same as bug 28314, but for the OPAC We noticed that if the cover image is somewhat short (i.e. the height is under 80-90 px), the loading spinner indicating that the image is currently loading still appears after the image is loaded. The spinner should be hidden when the image is loaded, regardless of the image size. To test: 1. Make sure the OPACLocalCoverImages system preference is enabled 1.1. Go to Administration > Global system preferences 1.2. Search for Coverimages 1.3. Set OPACLocalCoverImages to 'Show' 1.4. Click 'Save all Enhanced content preferences' 2. Add a short local cover image to a record (I added one which is just a grey rectangle with the size printed on it, to facilitate the test) 2.1. Download the attached image 2.2. Find a record without an image 2.3. Click the 'Images' tab 2.4. Click 'Upload' 2.5. Click 'Drop files here or click to select a file' and choose the downloaded image 2.6. Click 'Process images' 3. View the record in the OPAC 3.1. From the image upload page, click on the title of the record in the page heading to access the detailed record in the staff interface 3.2. Click on 'OPAC view: Open in new window.' --> Note that the image is displayed normally, but the spinner is also displayed In the OPAC, the problem is only on the detailed record page. The search results are OK. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 --- Comment #1 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- Created attachment 145334 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=145334&action=edit 140 x 50 px image for tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=28314 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |caroline.cyr-la-rose@inlibr | |o.com, | |olivier.hubert@inlibro.com, | |philippe.blouin@inlibro.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 --- Comment #2 from Olivier Hubert <olivier.hubert@inlibro.com> --- I see three options for solving this issue: 1. Remove the spinner by removing the background CSS declaration in both style sheets. 2. Add a minimum height to all images so that the spinner is always hidden. This is an issues with smaller images as they will appear "zoomed in" and lose in picture quality. 3. Add javascript code to hide / remove the spinner once an image is loaded. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |hammat.wele@inlibro.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 --- Comment #3 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 145472 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=145472&action=edit Bug 32642: Loading spinner always visible when cover image is short (OPAC) We noticed that if the cover image is somewhat short (i.e. the height is under 80-90 px), the loading spinner indicating that the image is currently loading still appears after the image is loaded. this patch remove the spinner when the image is loaded,. To test: 1. Make sure the OPACLocalCoverImages system preference is enabled 1.1. Go to Administration > Global system preferences 1.2. Search for Coverimages 1.3. Set OPACLocalCoverImages to 'Show' 1.4. Click 'Save all Enhanced content preferences' 2. Add a short local cover image to a record (I added one which is just a grey rectangle with the size printed on it, to facilitate the test) 2.1. Download the attached image 2.2. Find a record without an image 2.3. Click the 'Images' tab 2.4. Click 'Upload' 2.5. Click 'Drop files here or click to select a file' and choose the downloaded image 2.6. Click 'Process images' 3. View the record in the OPAC 3.1. From the image upload page, click on the title of the record in the page heading to access the detailed record in the staff interface 3.2. Click on 'OPAC view: Open in new window.' --> Note that the image is displayed normally, but the spinner is also displayed 4. Apply the patch 5. View the record in the OPAC --> Note that the spinner is no more displayed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #145472|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 --- Comment #4 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 145473 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=145473&action=edit Bug 32642: Loading spinner always visible when cover image is short (OPAC) We noticed that if the cover image is somewhat short (i.e. the height is under 80-90 px), the loading spinner indicating that the image is currently loading still appears after the image is loaded. this patch remove the spinner when the image is loaded,. To test: 1. Make sure the OPACLocalCoverImages system preference is enabled 1.1. Go to Administration > Global system preferences 1.2. Search for Coverimages 1.3. Set OPACLocalCoverImages to 'Show' 1.4. Click 'Save all Enhanced content preferences' 2. Add a short local cover image to a record (I added one which is just a grey rectangle with the size printed on it, to facilitate the test) 2.1. Download the attached image 2.2. Find a record without an image 2.3. Click the 'Images' tab 2.4. Click 'Upload' 2.5. Click 'Drop files here or click to select a file' and choose the downloaded image 2.6. Click 'Process images' 3. View the record in the OPAC 3.1. From the image upload page, click on the title of the record in the page heading to access the detailed record in the staff interface 3.2. Click on 'OPAC view: Open in new window.' --> Note that the image is displayed normally, but the spinner is also displayed 4. Apply the patch 5. View the record in the OPAC --> Note that the spinner is no more displayed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #145473|0 |1 is obsolete| | --- Comment #5 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 145976 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=145976&action=edit Bug 32642: Loading spinner always visible when cover image is short (OPAC) We noticed that if the cover image is somewhat short (i.e. the height is under 80-90 px), the loading spinner indicating that the image is currently loading still appears after the image is loaded. this patch remove the spinner when the image is loaded,. To test: 1. Make sure the OPACLocalCoverImages system preference is enabled 1.1. Go to Administration > Global system preferences 1.2. Search for Coverimages 1.3. Set OPACLocalCoverImages to 'Show' 1.4. Click 'Save all Enhanced content preferences' 2. Add a short local cover image to a record (I added one which is just a grey rectangle with the size printed on it, to facilitate the test) 2.1. Download the attached image 2.2. Find a record without an image 2.3. Click the 'Images' tab 2.4. Click 'Upload' 2.5. Click 'Drop files here or click to select a file' and choose the downloaded image 2.6. Click 'Process images' 3. View the record in the OPAC 3.1. From the image upload page, click on the title of the record in the page heading to access the detailed record in the staff interface 3.2. Click on 'OPAC view: Open in new window.' --> Note that the image is displayed normally, but the spinner is also displayed 4. Apply the patch 5. View the record in the OPAC --> Note that the spinner is no more displayed Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com, oleonard@myacpl.org Severity|enhancement |normal --- Comment #6 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- It works, but that does not make the code more robust or understandable. We could try and improve it by renaming the class, maybe. Owen what do you think? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Looking here, noting that there was no feedback on last comment. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- The whole code around these images indeed requires some code digging to understand whats going on ;) I have the impression that the new lines: if( $(".cover-slider").find(".cover-image:visible").length > 0 ){ $(".cover-slider").removeClass("cover-slides"); } should be placed elsewhere. Now they are executed after the recursive calls or the callback. But this does not yet guarantee that all images are already loaded. And it also means that the new lines could be executed repeatedly which is unneeded. In the callback verify_cover_images we activate the spinner actually: if( $(coverSlide).find(".cover-image:visible").length < 1 ){ $(coverSlide).remove(); } else { $(coverSlide).addClass("cover-slides"); } We should only remove the spinner when the image has been loaded locally. So shouldnt we check if the local loading has been completed? So remove the spinner in image onload and check image.complete ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #145976|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 --- Comment #9 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 148658 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=148658&action=edit Bug 32642: Loading spinner always visible when cover image is short (OPAC) We noticed that if the cover image is somewhat short (i.e. the height is under 80-90 px), the loading spinner indicating that the image is currently loading still appears after the image is loaded. this patch remove the spinner when the image is loaded,. To test: 1. Make sure the OPACLocalCoverImages system preference is enabled 1.1. Go to Administration > Global system preferences 1.2. Search for Coverimages 1.3. Set OPACLocalCoverImages to 'Show' 1.4. Click 'Save all Enhanced content preferences' 2. Add a short local cover image to a record (I added one which is just a grey rectangle with the size printed on it, to facilitate the test) 2.1. Download the attached image 2.2. Find a record without an image 2.3. Click the 'Images' tab 2.4. Click 'Upload' 2.5. Click 'Drop files here or click to select a file' and choose the downloaded image 2.6. Click 'Process images' 3. View the record in the OPAC 3.1. From the image upload page, click on the title of the record in the page heading to access the detailed record in the staff interface 3.2. Click on 'OPAC view: Open in new window.' --> Note that the image is displayed normally, but the spinner is also displayed 4. Apply the patch 5. View the record in the OPAC --> Note that the spinner is no more displayed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #10 from Hammat wele <hammat.wele@inlibro.com> --- (In reply to Marcel de Rooy from comment #8)
The whole code around these images indeed requires some code digging to understand whats going on ;)
I have the impression that the new lines: if( $(".cover-slider").find(".cover-image:visible").length > 0 ){ $(".cover-slider").removeClass("cover-slides"); } should be placed elsewhere. Now they are executed after the recursive calls or the callback. But this does not yet guarantee that all images are already loaded. And it also means that the new lines could be executed repeatedly which is unneeded.
In the callback verify_cover_images we activate the spinner actually: if( $(coverSlide).find(".cover-image:visible").length < 1 ){ $(coverSlide).remove(); } else { $(coverSlide).addClass("cover-slides"); }
We should only remove the spinner when the image has been loaded locally. So shouldnt we check if the local loading has been completed? So remove the spinner in image onload and check image.complete ?
I've changed the patch, now some control on the image is made before removing the spinner and it is in the verify_cover_images, it's much better this way. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #148658|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 --- Comment #11 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 148661 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=148661&action=edit Bug 32642: Loading spinner always visible when cover image is short (OPAC) We noticed that if the cover image is somewhat short (i.e. the height is under 80-90 px), the loading spinner indicating that the image is currently loading still appears after the image is loaded. this patch remove the spinner when the image is loaded,. To test: 1. Make sure the OPACLocalCoverImages system preference is enabled 1.1. Go to Administration > Global system preferences 1.2. Search for Coverimages 1.3. Set OPACLocalCoverImages to 'Show' 1.4. Click 'Save all Enhanced content preferences' 2. Add a short local cover image to a record (I added one which is just a grey rectangle with the size printed on it, to facilitate the test) 2.1. Download the attached image 2.2. Find a record without an image 2.3. Click the 'Images' tab 2.4. Click 'Upload' 2.5. Click 'Drop files here or click to select a file' and choose the downloaded image 2.6. Click 'Process images' 3. View the record in the OPAC 3.1. From the image upload page, click on the title of the record in the page heading to access the detailed record in the staff interface 3.2. Click on 'OPAC view: Open in new window.' --> Note that the image is displayed normally, but the spinner is also displayed 4. Apply the patch 5. View the record in the OPAC --> Note that the spinner is no more displayed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #148661|0 |1 is obsolete| | --- Comment #12 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 148762 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=148762&action=edit Bug 32642: Loading spinner always visible when cover image is short (OPAC) We noticed that if the cover image is somewhat short (i.e. the height is under 80-90 px), the loading spinner indicating that the image is currently loading still appears after the image is loaded. this patch remove the spinner when the image is loaded,. To test: 1. Make sure the OPACLocalCoverImages system preference is enabled 1.1. Go to Administration > Global system preferences 1.2. Search for Coverimages 1.3. Set OPACLocalCoverImages to 'Show' 1.4. Click 'Save all Enhanced content preferences' 2. Add a short local cover image to a record (I added one which is just a grey rectangle with the size printed on it, to facilitate the test) 2.1. Download the attached image 2.2. Find a record without an image 2.3. Click the 'Images' tab 2.4. Click 'Upload' 2.5. Click 'Drop files here or click to select a file' and choose the downloaded image 2.6. Click 'Process images' 3. View the record in the OPAC 3.1. From the image upload page, click on the title of the record in the page heading to access the detailed record in the staff interface 3.2. Click on 'OPAC view: Open in new window.' --> Note that the image is displayed normally, but the spinner is also displayed 4. Apply the patch 5. View the record in the OPAC --> Note that the spinner is no more displayed Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Laura.escamilla@bywatersolu | |tions.com Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |BLOCKED --- Comment #13 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Will resume qa shortly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 --- Comment #14 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Thx for this new attempt. We now have: $(coverSlide).addClass("cover-slides"); var img = $(coverSlide).find(".cover-image:visible").find("img")[0]; if( $(img).length > 0 && img.complete && img.naturalHeight > 0 ){ $(coverSlide).css({"background-image":"none"}); } What I wonder, is: will there always be enough time to locally complete the downloading of the image before you remove the spinner? Now you add the spinner by adding the class. And directly you check if there is one visible image and you remove the spinner. (You could btw remove the class again instead of the css change.) So should we remove the spinner class in image onload and check image.complete there? See next comment. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|BLOCKED |Failed QA --- Comment #15 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Please check javascript for various types of cover images: [% Asset.js("js/amazonimages.js") | $raw %] [% Asset.js("js/bakertaylorimages.js") | $raw %] [% Asset.js("js/coce.js") | $raw %] [% Asset.js("js/google-jackets.js") | $raw %] [% Asset.js("js/localcovers.js") | $raw %] Hope I found them all ;) For example, look at this in coce.js img.onload = function() { // image dimensions can't be known until image has loaded if (img.height == 1 && img.width == 1) { $(this).closest(".coce-coverimg").remove(); } }; Or look here for localcovers: var img = $("<img />").attr('src', '/cgi-bin/koha/opac-image.pl?thumbnail=1&biblionumber=' + $(mydiv).attr("class")) .load(function () { If you would add into this callback function after load completion, remove the spinner. ETC, Perhaps we can find a way to do this in one place for all types of covers? Sorry to make this seemingly simple change a bit more complicated ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 --- Comment #16 from Olivier Hubert <olivier.hubert@inlibro.com> --- Yes, I think we should check for covers outside of each service's script, and remove the spinner there. Each service can set a variable indicating if its internal processing has completed or not. When all services have completed their processing or an image is found (whichever comes first), then we remove the spinner. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 --- Comment #17 from Hammat wele <hammat.wele@inlibro.com> ---
What I wonder, is: will there always be enough time to locally complete the downloading of the image before you remove the spinner? Now you add the spinner by adding the class. And directly you check if there is one visible image and you remove the spinner. (You could btw remove the class again instead of the css change.)
Hi Marcel, For the images with a src attribut already set in the html code ( images like localcover, CmazonCoverImages ...), they will have time to locally complete the downloading because of the `$(window).load` it will wait for all images to be load. But for the others they may not have enough time. I think it's better to just remove spinner by removing the "background-image", the class 'cover-slides' is used in opac.css file .cover-slides a.nav-active:visited {color: #85CA11;}, ( specially when we have severals images for the same notice). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #148762|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 --- Comment #18 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 149247 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=149247&action=edit Bug 32642: Loading spinner always visible when cover image is short (OPAC) We noticed that if the cover image is somewhat short (i.e. the height is under 80-90 px), the loading spinner indicating that the image is currently loading still appears after the image is loaded. this patch remove the spinner when the image is loaded,. To test: 1. Make sure the OPACLocalCoverImages system preference is enabled 1.1. Go to Administration > Global system preferences 1.2. Search for Coverimages 1.3. Set OPACLocalCoverImages to 'Show' 1.4. Click 'Save all Enhanced content preferences' 2. Add a short local cover image to a record (I added one which is just a grey rectangle with the size printed on it, to facilitate the test) 2.1. Download the attached image 2.2. Find a record without an image 2.3. Click the 'Images' tab 2.4. Click 'Upload' 2.5. Click 'Drop files here or click to select a file' and choose the downloaded image 2.6. Click 'Process images' 3. View the record in the OPAC 3.1. From the image upload page, click on the title of the record in the page heading to access the detailed record in the staff interface 3.2. Click on 'OPAC view: Open in new window.' --> Note that the image is displayed normally, but the spinner is also displayed 4. Apply the patch 5. View the record in the OPAC --> Note that the spinner is no more displayed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 --- Comment #19 from Hammat wele <hammat.wele@inlibro.com> --- I've added a load event to check if images are completed and then the spinner is removed. this way the spinner is always removed once the image is complete. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #149247|0 |1 is obsolete| | --- Comment #20 from David Nind <david@davidnind.com> --- Created attachment 149249 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=149249&action=edit Bug 32642: Loading spinner always visible when cover image is short (OPAC) We noticed that if the cover image is somewhat short (i.e. the height is under 80-90 px), the loading spinner indicating that the image is currently loading still appears after the image is loaded. this patch remove the spinner when the image is loaded,. To test: 1. Make sure the OPACLocalCoverImages system preference is enabled 1.1. Go to Administration > Global system preferences 1.2. Search for Coverimages 1.3. Set OPACLocalCoverImages to 'Show' 1.4. Click 'Save all Enhanced content preferences' 2. Add a short local cover image to a record (I added one which is just a grey rectangle with the size printed on it, to facilitate the test) 2.1. Download the attached image 2.2. Find a record without an image 2.3. Click the 'Images' tab 2.4. Click 'Upload' 2.5. Click 'Drop files here or click to select a file' and choose the downloaded image 2.6. Click 'Process images' 3. View the record in the OPAC 3.1. From the image upload page, click on the title of the record in the page heading to access the detailed record in the staff interface 3.2. Click on 'OPAC view: Open in new window.' --> Note that the image is displayed normally, but the spinner is also displayed 4. Apply the patch 5. View the record in the OPAC --> Note that the spinner is no more displayed Signed-off-by: David Nind <david@davidnind.com> https://bugs.koha-community.org/show_bug.cgi?id=32624 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #149249|0 |1 is obsolete| | --- Comment #21 from David Nind <david@davidnind.com> --- Created attachment 149250 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=149250&action=edit Bug 32642: Loading spinner always visible when cover image is short (OPAC) We noticed that if the cover image is somewhat short (i.e. the height is under 80-90 px), the loading spinner indicating that the image is currently loading still appears after the image is loaded. this patch remove the spinner when the image is loaded,. To test: 1. Make sure the OPACLocalCoverImages system preference is enabled 1.1. Go to Administration > Global system preferences 1.2. Search for Coverimages 1.3. Set OPACLocalCoverImages to 'Show' 1.4. Click 'Save all Enhanced content preferences' 2. Add a short local cover image to a record (I added one which is just a grey rectangle with the size printed on it, to facilitate the test) 2.1. Download the attached image 2.2. Find a record without an image 2.3. Click the 'Images' tab 2.4. Click 'Upload' 2.5. Click 'Drop files here or click to select a file' and choose the downloaded image 2.6. Click 'Process images' 3. View the record in the OPAC 3.1. From the image upload page, click on the title of the record in the page heading to access the detailed record in the staff interface 3.2. Click on 'OPAC view: Open in new window.' --> Note that the image is displayed normally, but the spinner is also displayed 4. Apply the patch 5. View the record in the OPAC --> Note that the spinner is no more displayed Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #149250|0 |1 is obsolete| | --- Comment #22 from David Nind <david@davidnind.com> --- Created attachment 149251 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=149251&action=edit Bug 32642: Loading spinner always visible when cover image is short (OPAC) We noticed that if the cover image is somewhat short (i.e. the height is under 80-90 px), the loading spinner indicating that the image is currently loading still appears after the image is loaded. this patch remove the spinner when the image is loaded,. To test: 1. Make sure the OPACLocalCoverImages system preference is enabled 1.1. Go to Administration > Global system preferences 1.2. Search for Coverimages 1.3. Set OPACLocalCoverImages to 'Show' 1.4. Click 'Save all Enhanced content preferences' 2. Add a short local cover image to a record (I added one which is just a grey rectangle with the size printed on it, to facilitate the test) 2.1. Download the attached image 2.2. Find a record without an image 2.3. Click the 'Images' tab 2.4. Click 'Upload' 2.5. Click 'Drop files here or click to select a file' and choose the downloaded image 2.6. Click 'Process images' 3. View the record in the OPAC 3.1. From the image upload page, click on the title of the record in the page heading to access the detailed record in the staff interface 3.2. Click on 'OPAC view: Open in new window.' --> Note that the image is displayed normally, but the spinner is also displayed 4. Apply the patch 5. View the record in the OPAC --> Note that the spinner is no more displayed Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #23 from David Nind <david@davidnind.com> --- Apologies for the noise! I initially signed this bug off using the wrong bug number, and it added a link to Bugzilla at the end of the patch with the incorrect bug number. Ended up amending the commit message to remove that line, then reattached to the bug. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |BLOCKED --- Comment #24 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Revisiting -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 --- Comment #25 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- The more I look at this cover images code in javascript, the more I wonder about it ;) I think the whole code (not talking about this adjustment) needs more attention and has been scattered over various js files for specific cover image providers etc. We are starting wait_for_images in window.load. It all looks quite suboptimal. What this adjustment is doing now, is adding the spinner after everything has been loaded already. And it therefore immediately removes it again. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|BLOCKED |Passed QA Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #149251|0 |1 is obsolete| | --- Comment #26 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 150022 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150022&action=edit Bug 32642: Loading spinner always visible when cover image is short (OPAC) We noticed that if the cover image is somewhat short (i.e. the height is under 80-90 px), the loading spinner indicating that the image is currently loading still appears after the image is loaded. this patch remove the spinner when the image is loaded,. To test: 1. Make sure the OPACLocalCoverImages system preference is enabled 1.1. Go to Administration > Global system preferences 1.2. Search for Coverimages 1.3. Set OPACLocalCoverImages to 'Show' 1.4. Click 'Save all Enhanced content preferences' 2. Add a short local cover image to a record (I added one which is just a grey rectangle with the size printed on it, to facilitate the test) 2.1. Download the attached image 2.2. Find a record without an image 2.3. Click the 'Images' tab 2.4. Click 'Upload' 2.5. Click 'Drop files here or click to select a file' and choose the downloaded image 2.6. Click 'Process images' 3. View the record in the OPAC 3.1. From the image upload page, click on the title of the record in the page heading to access the detailed record in the staff interface 3.2. Click on 'OPAC view: Open in new window.' --> Note that the image is displayed normally, but the spinner is also displayed 4. Apply the patch 5. View the record in the OPAC --> Note that the spinner is no more displayed Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> This needs a follow-up; the code in this template activates the spinner actually when the job has been done already and did not remove it. And we did not see that but only with a short image like above. The construction with .one, .each is not needed given the execution context. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 --- Comment #27 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 150023 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150023&action=edit Bug 32642: (QA follow-up) Activate spinner early See comment on former patch too. We need to activate the spinner early and we can simplify the code to remove it. Note: unfortunately this is kind of a workaround, since using load would be nicer but currently hard to implement since the cover image code is scattered/widespread. This code still checks the complete attribute, we could argue that it should just remove the spinner. Note too that the spinner belongs to a div where multiple img may be part of. If we do not remove the spinner now, something went wrong at load time, but if you can actually see the spinner is another thing. Test plan: See former patch. Check few cover images on detail page, enable various providers. Bonus: I tested with a sleep statement in opac-image.pl. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |23.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 --- Comment #28 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.05. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 Jacob O'Mara <jacob.omara@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|23.05.00 |23.05.00,22.11.06 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 --- Comment #29 from Jacob O'Mara <jacob.omara@ptfs-europe.com> --- Nice work, thanks everyone! Pushed to 22.11.x for the next release. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Version(s)|23.05.00,22.11.06 |23.05.00,22.11.06,22.05.13 released in| | Status|Pushed to stable |Pushed to oldstable --- Comment #30 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 22.05.x for upcoming 22.05.13 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|23.05.00,22.11.06,22.05.13 |23.05.00,22.11.06,22.05.13, released in| |21.11.21 CC| |arthur.suzuki@biblibre.com --- Comment #31 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- applied to 21.11 for 21.11.21 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org