Jenkins UI Themes - per user login UI "Theme" configurations (WIP)

1,271 views
Skip to first unread message

Tom Fennelly

unread,
Jan 5, 2015, 12:56:58 PM1/5/15
to jenkin...@googlegroups.com
I got back to doing a little bit of Jenkins Core UI work in the last few weeks. I've evolved the uithemes-plugin a bit further in the last few weeks, to a stage now where (on this branch) a user can perform personalized theme configurations such as:
  • Status Balls/Orbs
  • Page Header
  • Icons
  • Console/terminal (ala PR #1272 from @kevinburke)
More info on uithemes-plugin, as well as short video: http://img.youtube.com/vi/ZlD0zf1VCAs/0.jpg

I also created a WIP pull request at #1512. Might be better to have any conversations over there.

Ulli Hafner

unread,
Jan 5, 2015, 4:59:25 PM1/5/15
to jenkin...@googlegroups.com
That looks very promising! 

How would this concept integrate with plus-ins? Does a theme provide icons for plug-ins, too? Or is each plug-in providing icons for each available theme?

--
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/9523f33b-78c9-417b-9035-971f0e471036%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

signature.asc

Tom Fennelly

unread,
Jan 6, 2015, 6:39:19 AM1/6/15
to jenkin...@googlegroups.com
Thanks Ulli.

Plugins can "contribute" to a theme "implementation" in the very same way as Jenkins Core does. Therefore, it can "contribute" icon style definitions to multiple icon theme "implementations". See https://github.com/jenkinsci/uithemes-plugin#registering-and-contributing-to-themes for a bit more info on this.
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/VaTOWEZHyfI/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/2C0AF241-9FFA-4DF0-8843-9397C05212EC%40gmail.com.

Daniel Beck

unread,
Jan 6, 2015, 8:34:49 AM1/6/15
to jenkin...@googlegroups.com
The video looks really interesting. Here's the correct link BTW (I only see a link to the thumbnail image): https://www.youtube.com/watch?v=ZlD0zf1VCAs

Since theme implementations may be incomplete, is there a way to define a fallback, to get e.g. "black and white gif icons" as a fallback when "font awesome" is not implemented for sidepanel icons?

---

Is it a requirement to subclass Plugin, or can UIThemeContributor be used with @Extension? If not, why not? It seems this would make adding support for various themes to plugins far less invasive. Just add a random @Extension FooThemeSupport class somewhere in the plugin and done.

Also, since UIThemeContributor is an interface, wouldn't it make sense to also have an (abstract) class to subclass from, so later additions to the API will not break existing implementations of the interface?
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/54ABC9DD.4090701%40gmail.com.

Tom Fennelly

unread,
Jan 7, 2015, 6:08:09 AM1/7/15
to jenkin...@googlegroups.com
Thanks Daniel.

Yeah, should be easy enough to insert default styles.

As for using the @Extension annotation, yes it would be a little less
invasive but my original thinking (may no longer be valid having the
benefit of hindsight) was that doing it through extension made it easier
for us to keep track of what plugins are theme contributors, and so,
remove them from the contributor list as the plugin is uninstalled. In
hindsight though it seems like plugins are not really uninstalled until
after a restart, so it might not matter and maybe @Extension would work
and if so then the abstract impl would work as you suggest.

Tom Fennelly

unread,
Jan 12, 2015, 6:26:59 AM1/12/15
to jenkin...@googlegroups.com
I updated the PR associated with this (https://github.com/jenkinsci/jenkins/pull/1524). Would appreciate any comments/suggestions. Would like to get the required changes into Jenkins core as soon as possible.

Jesse Glick

unread,
Jan 12, 2015, 9:18:55 AM1/12/15
to Jenkins Dev
On Wed, Jan 7, 2015 at 6:10 AM, Tom Fennelly <tom.fe...@gmail.com> wrote:
> As for using the @Extension annotation, yes it would be a little less
> invasive but my original thinking (may no longer be valid having the benefit
> of hindsight) was that doing it through extension made it easier

You mean, doing it through Plugin?

> for us to
> keep track of what plugins are theme contributors, and so, remove them from
> the contributor list as the plugin is uninstalled. In hindsight though it
> seems like plugins are not really uninstalled until after a restart

Right, Jenkins does not support dynamic uninstallation. And if and
when it is improved to do so, we would of course be providing an API
to listen for extensions going away.

> maybe @Extension would work

I am pretty sure this should be an @Extension.

Surya Gaddipati

unread,
Jan 13, 2015, 10:47:39 AM1/13/15
to jenkin...@googlegroups.com
Wow. This is really interesting. Great work Tom. 
I would love to build a "github theme" ui on top of it.

Kohsuke Kawaguchi

unread,
Jan 22, 2015, 2:16:04 PM1/22/15
to jenkin...@googlegroups.com
+1. Great work. I think you should do a post on http://jenkins-ci.org/node about this.

Now coming over to the PR.
Reply all
Reply to author
Forward
0 new messages