Bootstrap 4 upgrade for the OPAC
Hi all, I've been working on a Bootstrap 4 upgrade to the OPAC (Bug 20168, https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20168). My work in progress is here: https://gitlab.com/koha-dev/koha-dev/-/tree/wip-2020-05-14-opac-bootstrap-4 One of the differences between this version and master is that Bootstrap assets will be added by npm and the OPAC's SCSS files built using those. This seems to make more sense than adding the entire Bootstrap library to our repo and building from there. I think the same should probably be done for jQuery and jQueryUI. I'm curious if anyone has comments on that. Thanks, Owen -- Web Developer Athens County Public Libraries (740) 737-6006 https://www.myacpl.org
Can you expand more on that? At the moment, don't you compile the SCSS files, and commit those to the git repo? Would the Bootstrap assets be downloaded by npm for that process then thrown away (and a CDN used instead on the OPAC) or...? David Cook Systems Librarian Prosentient Systems 72/330 Wattle St Ultimo, NSW 2007 Australia Office: 02 9212 0899 Online: 02 8005 0595 -----Original Message----- From: Koha-devel <koha-devel-bounces@lists.koha-community.org> On Behalf Of Owen Leonard Sent: Thursday, 4 June 2020 4:12 AM To: Koha Devel <koha-devel@lists.koha-community.org> Subject: [Koha-devel] Bootstrap 4 upgrade for the OPAC Hi all, I've been working on a Bootstrap 4 upgrade to the OPAC (Bug 20168, https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20168). My work in progress is here: https://gitlab.com/koha-dev/koha-dev/-/tree/wip-2020-05-14-opac-bootstrap-4 One of the differences between this version and master is that Bootstrap assets will be added by npm and the OPAC's SCSS files built using those. This seems to make more sense than adding the entire Bootstrap library to our repo and building from there. I think the same should probably be done for jQuery and jQueryUI. I'm curious if anyone has comments on that. Thanks, Owen -- Web Developer Athens County Public Libraries (740) 737-6006 https://www.myacpl.org _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
Can you expand more on that?
Yes. Bootstrap assets would be downloaded in a dev environment during "yarn install" as we do other npm packages. In the OPAC SCSS we can then reference those files when we build the OPAC CSS: /* Bootstrap imports */ @import "../../../../../node_modules/bootstrap/scss/functions"; @import "../../../../../node_modules/bootstrap/scss/variables"; Ultimately opac.css would be the only prebuilt CSS file in version control rather than adding a copy of the Bootstrap CSS. -- Owen -- Web Developer Athens County Public Libraries (740) 737-6006 https://www.myacpl.org
Ohhh I think I follow. So we wouldn't need to reference Bootstrap directly at all? We'd just point to opac.css and that would include all the Bootstrap CSS as well as our customizations? That sounds pretty awesome to me. David Cook Systems Librarian Prosentient Systems 72/330 Wattle St Ultimo, NSW 2007 Australia Office: 02 9212 0899 Online: 02 8005 0595 -----Original Message----- From: Koha-devel <koha-devel-bounces@lists.koha-community.org> On Behalf Of Owen Leonard Sent: Thursday, 4 June 2020 12:17 PM To: Koha Devel <koha-devel@lists.koha-community.org> Subject: Re: [Koha-devel] Bootstrap 4 upgrade for the OPAC
Can you expand more on that?
Yes. Bootstrap assets would be downloaded in a dev environment during "yarn install" as we do other npm packages. In the OPAC SCSS we can then reference those files when we build the OPAC CSS: /* Bootstrap imports */ @import "../../../../../node_modules/bootstrap/scss/functions"; @import "../../../../../node_modules/bootstrap/scss/variables"; Ultimately opac.css would be the only prebuilt CSS file in version control rather than adding a copy of the Bootstrap CSS. -- Owen -- Web Developer Athens County Public Libraries (740) 737-6006 https://www.myacpl.org _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
On 20-06-03 20:12, Owen Leonard wrote:
I've been working on a Bootstrap 4 upgrade to the OPAC (Bug 20168, https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20168).
My work in progress is here: https://gitlab.com/koha-dev/koha-dev/-/tree/wip-2020-05-14-opac-bootstrap-4
Tested it quickly, nothing seems to be really broken. "Just" a lot (😱) of stuff that moved are takes all the width. I hope it's not too much individual and unique issues and that it won't require fixing a dozen of thing per page. Tough work, oleonard++
One of the differences between this version and master is that Bootstrap assets will be added by npm and the OPAC's SCSS files built using those. This seems to make more sense than adding the entire Bootstrap library to our repo and building from there.
Yes, this is great!
I think the same should probably be done for jQuery and jQueryUI. I'm curious if anyone has comments on that.
+++++++++++++!!
Ultimately opac.css would be the only prebuilt CSS file in version control rather than adding a copy of the Bootstrap CSS.
Are there any obstacles to that? In the way things work now. Besides finding a lot of time to tidy up all these things accumulated and scattered since many years. -- Victor Grousset/tuxayo
participants (3)
-
dcook@prosentient.com.au -
Owen Leonard -
Victor Grousset/tuxayo