[Koha-devel] shelf-browser replacement for koha

Paul Derscheid paul.derscheid at lmscloud.de
Thu Apr 21 17:57:15 CEST 2022


On Donnerstag, 21. April 2022 17:13:18 CEST Katrin Fischer wrote:
> Hi Paul,
> 
> welcome to the list :)
> 
> I tried to take a look at the feature, but when I try to load the shelf
> browser, it remains empty or takes a long while to load. There are some
> errors in the console (mostly CORS Missing Allow Origin) that could
> relate to the problem.
> 
> Maybe adding a visual indicator about the content still loading could be
> a nice addition.
> 
> I quite like the idea of generating a nice replacement picture for
> missing covers.
> 
> Hope this helps,
> 
> Katrin
> 
> On 12.04.22 17:47, Paul Derscheid wrote:
> > Hi everyone,
> > 
> > I developed a replacement for the koha shelf-browser realised as a
> > JavaScript library which is already in production with one of our clients.
> > tcohen asked me to provide necessary infos and resources so others can
> > take a look.
> > 
> >   * The most important part is LMSCoverFlow.js
> >   
> >     <https://github.com/LMSCloud/Koha-LMSCloud/blob/master/koha-tmpl/opac-> >     tmpl/bootstrap/js/LMSCoverFlow.js> which is the library itself.
> >   
> >   * For the actual function calls take a look at opac-detail.tt
> >   
> >     <https://github.com/LMSCloud/Koha-LMSCloud/blob/master/koha-tmpl/opac-> >     tmpl/bootstrap/en/modules/opac-detail.tt> starting at line 1710.
> >   
> >   * The shelf-browser functionality depends on some scripts, namely
> >   
> >     coverflowbyshelfitem
> >     <https://github.com/LMSCloud/Koha-LMSCloud/blob/master/opac/svc/coverf
> >     lowbyshelfitem> and covergen
> >     <https://github.com/LMSCloud/Koha-LMSCloud/blob/master/opac/svc/coverg
> >     en>
> >   
> >   * The corresponding modules are CoverFlowData.pm
> >   
> >     <https://github.com/LMSCloud/Koha-LMSCloud/blob/master/C4/CoverFlowDat
> >     a.pm> and CoverGen.pm
> >     <https://github.com/LMSCloud/Koha-LMSCloud/blob/master/C4/CoverGen.pm>
> >     .
> > 
> > I already got lectured on not putting stuff in C4. Next goal is to
> > move everything data related to an API endpoint.
> > The js is actually written in TypeScript using ES6 modules and I will
> > change the visibility of the corresponding repo soon and notify you
> > accordingly.
> > 
> > Since the shelf browser is based on itemcallnumbers, it is necessary
> > to assign such to a sufficient amount of titles (9 when I tested on
> > koha-testing-docker).
> > 
> > To see how it looks in prod take a look at this OPAC
> > <https://sb-heilbronn.lmscloud.net/>.
> > 
> > If my explanation is not sufficient or I should have forgotten
> > something, you can send me a mail or write to me on IRC. My nick is
> > paulderscheid.
> > 
> > I’d love to get feedback and I’m open to criticism.
> > 
> > Kind Regards.
> > 
> > Paul
> > 
> > --
> > LMSCloud GmbH
> > Paul Derscheid - Software Engineer
> > Konrad-Zuse-Platz 8 - D-81829 München
> > e paul.derscheid at lmscloud.de
> > w www.lmscloud.de <http://www.lmscloud.de>
> > 
> > 
> > _______________________________________________
> > Koha-devel mailing list
> > Koha-devel at lists.koha-community.org
> > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
> > website :https://www.koha-community.org/
> > git :https://git.koha-community.org/
> > bugs :https://bugs.koha-community.org/

Hello Katrin,

thanks for trying it out. I'm currently moving everything data-related
to an API-endpoint as well as fixing some bugs and I will provide a better 
solution for testing the feature than just listing the necessary files as
soon as I'm done.

I forgot to mention that you have to enable a provider for cover images.
Google works reasonably well. 

If I'm not mistaken the CORS issue stems from EKZ being the default
cover image provider in my configuration and there's maybe some mishap
there because they face some problems atm (don't know if I'm allowed
to go into specifics, so I won't).

A visual indicator for bridging the loading process is already 
implemented but apparently gets called too late to be of significance so
thanks for mentioning that.

The CoverGen script I mentioned in my first mail is intended to
generate cover images for resources which are missing urls. I noticed
some bugs there, though. This is also not default behaviour but will be
in the next version.

I appreciate your input, so thanks again.

Kind regards

Paul Derscheid
 
--
LMSCloud GmbH
Paul Derscheid - Software Engineer
Konrad-Zuse-Platz 8 - D-81829 München
e paul.derscheid at lmscloud.de
w www.lmscloud.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20220421/b40299f5/attachment.sig>


More information about the Koha-devel mailing list