Layout without prototype.js

26 views
Skip to first unread message

Gavin Mogan

unread,
May 26, 2019, 1:28:07 PM5/26/19
to Jenkins Developers
I'm slowly working on my proof of concept graphql server for jenkins but ran into trouble including the development console.

As per https://github.com/prisma/graphql-playground/issues/1008 it looks like prototype and graphql are not playing nice.

Is there a way to get the full layout (breadcrumbs, logo, etc) without prototype js? Since this would be a debugging tool I am okay not using layout, but I am curious.

Gavin

Ullrich Hafner

unread,
May 26, 2019, 4:33:13 PM5/26/19
to Jenkins Developers
I don’t think that this is feasible. While prototype (especially the totally ancient version we are using) is breaking a lot of modern JS libs (chartJS, jQuery, BS, etc.) it is somewhat coupled with almost every UI thing in Jenkins. I tried to update it to the latest version, but needed to revert the change since it broke some features (see [1] and [2]). And since we have no UI tests for those features it looks like an impossible task. 

In order to get a better look and feel for my plugins I patched the predefined layout as well. This does not help with prototype, but at least it helps to get rid of several other old JS libs in Jenkins (YUI, old BS, old jQuery). Here we have a similar problem, updating those JS libs in Jenkins might break a lot of plugins (and core features) that have a poor UI test coverage.

--
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 jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/c73bbec2-7cc6-4953-abd6-c0c99d1176a6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gavin Mogan

unread,
May 26, 2019, 5:36:14 PM5/26/19
to jenkin...@googlegroups.com
Okay, if I continue to move forward with this plugin, maybe i'll make a PR that allows you to skip loading the libraries (an attribute for the layout tag). For now, for the POC, skipping layout is fine.

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/9tqYVYMWAcA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/7E148FDF-4A23-4D31-A1F8-6FD014611759%40gmail.com.

Matt Sicker

unread,
May 28, 2019, 11:54:00 AM5/28/19
to jenkin...@googlegroups.com
Almost sounds like it'd be a good idea to start a parallel set of
layout tags that don't bundle outdated JS libraries. That would be a
larger effort, but it might make it easier to make the UI nicer.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAG%3D_DuuDxJ_CMwoCPeqcg2uD-nCuuaQ_w0heHQvxt3ersD4moA%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.



--
Matt Sicker
Senior Software Engineer, CloudBees

Daniel Beck

unread,
May 29, 2019, 7:05:53 AM5/29/19
to jenkin...@googlegroups.com


> On 28. May 2019, at 17:53, Matt Sicker <msi...@cloudbees.com> wrote:
>
> parallel set of layout tags

We could also parameterize the regular l:layout. We already do something similar for columns.

l:html was quickly deprecated and integrated into l:layout.

(Or perhaps we could move inclusion of libraries as an st:once / st:adjunct on demand into the elements that use it, such as f:form? Then views that do not use them will not have them.)


Ullrich Hafner

unread,
May 29, 2019, 7:55:59 AM5/29/19
to Jenkins Developers
That would be very helpful if we would have a more modular layout. So individual pages can use individual libraries without loosing the other core definitions. One problem I see here is that the breadcrumbs, footer, header, etc. already use some of these old libraries. If we do not load them then this part of the layout will be destroyed (or at least modified).

And for the overall job, build and view pages this is even more complex. Here the layout is defined in core and cannot be changed easily. So if I want to show some nice trend charts I currently have no chance to provide a required library somewhere in the overall layout.

But I think it is worth to invest something here as this can improve the look and feel of Jenkins quite easily without requiring to write a complete new application (see the Blue Ocean dilemma). All plugins could benefit from such a change without changing the overall architecture of the corresponding views.
> --
> 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 jenkinsci-de...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/91060642-B405-4DD8-85CC-134E1B4410FB%40beckweb.net.
Reply all
Reply to author
Forward
0 new messages