Hi all, As in bug 30136, I'd like to add a "back to top" button on the search results page. I put the same code as the opac and a bit of css to get a nice result. Feel free to test it and give feedback :)
Created attachment 161032 [details] [review] Bug 35810 : Add back to top button to staff result page Test plan: 1) Apply this patch and rebuild css with 'yarn build' 2) Perform a search from catalogue 3) Scroll down to see the button appear and scroll up to see it disappear
Created attachment 161033 [details] [review] Bug 35810 : Add back to top button to staff result page Test plan: 1) Apply this patch and rebuild css with 'yarn build' 2) Perform a search from catalogue 3) Scroll down to see the button appear and scroll up to see it disappear
Created attachment 161034 [details] [review] Bug 35810 : Add back to top button to staff result page Test plan: 1) Apply this patch and rebuild css with 'yarn build' 2) Perform a search from catalogue 3) Scroll down to see the button appear and scroll up to see it disappear
Created attachment 161111 [details] [review] Bug 35810: Add back to top button to staff result page Test plan: 1) Apply this patch and rebuild css with 'yarn build' 2) Perform a search from catalogue 3) Scroll down to see the button appear and scroll up to see it disappear Signed-off-by: Owen Leonard <oleonard@myacpl.org>
This is great! Why not put it in staff-global.js, though? It would be nice to have a back-to-top button on other pages as well.
Created attachment 161882 [details] [review] Bug 35810: Add back to top button on staff pages Test plan: 1) Apply this patch and rebuild css with 'yarn build' 2) For example, perform a search from catalogue 3) Scroll down to see the button appear and scroll up to see it disappear Note that it's works also on patron search etc..
Created attachment 161913 [details] [review] Bug 35810: Add back to top button on staff pages Test plan: 1) Apply this patch and rebuild css with 'yarn build' 2) For example, perform a search from catalogue 3) Scroll down to see the button appear and scroll up to see it disappear Note that it's works also on patron search etc.. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Putting this back to SO and re-adding Owen's SO line. This looks good although it appears to be out of sync with the work from bug 30136. OPAC button is .btn-primary, whereas this one is .btn-default. OPAC's button has the aria-label and title properties, this button does not. I don't think any of the above are blockers, just pointing it out as it may or may not be intentional. Would be great to have this code DRY (hence adding 35716 as "see also"), but I don't think we're there yet.
Thanks Pedro for your feedback. To answer your question about the style .btn-primary would give a style similar to the submit button (yellow) so I opted for a simpler style. Of course, if several opinions are in the same direction, all this can be changed.
Created attachment 162296 [details] [review] Bug 35810: Add back to top button on staff pages Test plan: 1) Apply this patch and rebuild css with 'yarn build' 2) For example, perform a search from catalogue 3) Scroll down to see the button appear and scroll up to see it disappear Note that it's works also on patron search etc.. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Created attachment 162298 [details] [review] Bug 35810: (QA follow-up) Add aria label for accessibility Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
I added a follow-up to give the button an aria-label for accessibility (similar to bug 30136). Otherwise, it looks great, and QA script is happy! Passing QA
It looks like the up icon is showing in the print preview and would end up being printed on every page - could we remove that please?
Pushed for 24.05! Well done everyone, thank you!
(In reply to Katrin Fischer from comment #13) > It looks like the up icon is showing in the print preview and would end up > being printed on every page - could we remove that please? It looks like the OPAC one will also print into a PDF, I have moved them into a new bug: Bug 36610 - Hide "Back to top" when printing pages
Pushed to 23.11.x for 23.11.06
Enhancement will not be backported to 23.05.x