> Am 05.07.2019 um 00:07 schrieb 'Gavin Mogan' via Jenkins Developers > <[email protected]>: > > So I haven't had time to fully digest this thread, but a couple ideas/notes > from me. > > * Bootstrap and jquery are pretty large dependancies, are they needed for > something specific? or just easier to do development. > http://youmightnotneedjquery.com/ <http://youmightnotneedjquery.com/> is > kinda snarky and old, but does have some good points.
They are indispensable to provide a rich UI (tables, tabs, cards, grids, carousel, etc) for plugins that implement the Recorder extension point. We already use it in Jenkins core, however, there we use some old and deprecated versions. > * if you use a bundler (rollup/webpack/Parcel/etc) + maven-frontend-plugin, > you should be able to use npm install and requires, and not worry about other > plugins are doing. Out f the box this has the disadvange of larger bundle > sizes, but would reduce any friction. Its kinda what the java plugins are > doing anyways, where they have seperate classpaths per plugin. Yes, I think that is the simplest way for plugin views. It just does not solve the problem on how to show rich UI elements on pages that are composed by elements of several plugins. E.g., I would like to show - a badge with the number of warnings in a job link. This is quite easy using BS 4. However, core has a hard coded reference to BS 3 on the job page so it will not work. - trends using ECharts. Since we have no support in core, every trend now needs to load the quite large trend JS. It would make much sense that the JS would be loaded only once on the page. - responsive UI on the job and build page. On large resolutions only 20% of the page is actually used. - ... I think it would make sense to gather requirements for other plugins here as well. Then we finally should have a way in Jenkins core to provide some of these features. Otherwise one plugin is using echarts, the other plugin is using chart.js, and so on... > * Shared js deps is kinda how we got in the mess of having prototype on every > page breaking things. > > I know there's no up to date official browser matrix, but since plugins have > a lot more flexibility when it comes compatibilty, my suggestion is to use > more modern javascript and css, and not need all the frameworks that try to > support the really old ones, or at least write modern code, but get babel to > backport so it doesn't break old browsers, then we wouldn't need jquery as > much. > > Gavin > > On Thu, Jul 4, 2019 at 2:15 PM Ullrich Hafner <[email protected] > <mailto:[email protected]>> wrote: > I’m not sure if we need so much new modules. For my plugin (and a lot of > other reporter based plugins) I think it would make sense to have just a > couple of them (<10). Bootstrap, jQuery, DataTables, ECharts, Prism, > Fontawesome would be the prominent ones. The dependencies of e.g. bootstrap > would make sense to be packaged into a bootstrap package. > > If I use individual versions per plugin then we get into problems if several > plugins show up on the same page. E.g. the job or build page will be > problematic (they are already since Jenkins core uses some old and not > compatible libs here). I think here it would be much better if we have a set > of JS plugins that would be shared by all plugins (and by Jenkins core). > > > >> Am 03.07.2019 um 14:04 schrieb Jack Shen <[email protected] >> <mailto:[email protected]>>: >> >> For the idea that you had like a standalone plugin to provide dependency, I >> ever thought about that before. >> However there might be too many dependencies and too many versions for each >> dependency. >> So I think maybe it's better to use a specific version of the library you >> use in your repo. >> >> And if you are interested in the new way we're trying in working hours >> plugin, we could share some idea with you on each Thursday 13:00(UTC) >> >> Jack Shen <[email protected] <mailto:[email protected]>> 于 >> 2019年7月3日周三 19:38写道: >> And I'm also wondering that would it be better if we switch to another >> solution like webpack? You know, using inline js libraries is not recommend >> in some conditions, so why not make some changes and try something new? >> >> Jack Shen <[email protected] <mailto:[email protected]>> 于 >> 2019年7月3日周三 19:33写道: >> Hi Ullrich, you are not alone on this question, because I think we have some >> similar requirements on using external libraries. >> >> I'm currently working on my GSoC project, in which I tried using react with >> success. >> >> What we have done in the our plugin working-hours-plugin >> <https://github.com/ShenJack/working-hours-plugin> is integrating the file >> built by webpack into jelly file. >> >> Actually, I has ever referred to the Warning NG Plugin, I agreed and learned >> some methods which you are using on fixing the incompatibility with >> prototype.js. >> >> 在 2019年7月3日星期三 UTC+8上午3:50:47,Ullrich Hafner写道: >> >> >> > Am 02.07.2019 um 16:12 schrieb Jesse Glick <[email protected] <>>: >> > >> > Read >> > >> > https://github.com/jenkinsci/js-libs >> > <https://github.com/jenkinsci/js-libs> >> > >> > and you will know more than I. >> > >> >> Yes, I tried to use that approach already without success. I got stuck >> somewhere in the middle and nobody is here who can help on UI issues anymore >> :-( Seems that all the UI super-heroes have left Jenkins... >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "Jenkins Developers" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/jenkinsci-dev/VOULzB0GozQ/unsubscribe >> <https://groups.google.com/d/topic/jenkinsci-dev/VOULzB0GozQ/unsubscribe>. >> To unsubscribe from this group and all its topics, send an email to >> [email protected] >> <mailto:[email protected]>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jenkinsci-dev/18f2590a-7d65-4637-93af-c20accb02c5d%40googlegroups.com >> >> <https://groups.google.com/d/msgid/jenkinsci-dev/18f2590a-7d65-4637-93af-c20accb02c5d%40googlegroups.com?utm_medium=email&utm_source=footer>. >> For more options, visit https://groups.google.com/d/optout >> <https://groups.google.com/d/optout>. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Jenkins Developers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] >> <mailto:[email protected]>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jenkinsci-dev/CAPCUAQsvyCWF81HS%2B0bwrEnZdymoNkigeF8%3DBB_PZaJkUcsiGA%40mail.gmail.com >> >> <https://groups.google.com/d/msgid/jenkinsci-dev/CAPCUAQsvyCWF81HS%2B0bwrEnZdymoNkigeF8%3DBB_PZaJkUcsiGA%40mail.gmail.com?utm_medium=email&utm_source=footer>. >> For more options, visit https://groups.google.com/d/optout >> <https://groups.google.com/d/optout>. > > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-dev/DD64433C-F29F-40BA-AB09-84BFD43208A6%40gmail.com > > <https://groups.google.com/d/msgid/jenkinsci-dev/DD64433C-F29F-40BA-AB09-84BFD43208A6%40gmail.com?utm_medium=email&utm_source=footer>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-dev/CAG%3D_DuvXki4OUu9AxXEmm8sB7JmRtGfMuvv4wby_UASqv%3D%2BqzA%40mail.gmail.com > > <https://groups.google.com/d/msgid/jenkinsci-dev/CAG%3D_DuvXki4OUu9AxXEmm8sB7JmRtGfMuvv4wby_UASqv%3D%2BqzA%40mail.gmail.com?utm_medium=email&utm_source=footer>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/0DA58BC2-7E51-4DFA-AA71-4EB4D7221F45%40gmail.com. For more options, visit https://groups.google.com/d/optout.
