On Wed, Jul 25, 2012 at 7:29 AM, Terry Chay <tchay(a)wikimedia.org> wrote:
In their defense, I think a lot of it has to
do with terrible UI/UX in Gerrit. The basics is can be modified by CSS and templates (I
believe we've done some), but it only goes so far. How do I modify Javascript in
Gerrit? I think it starts (and ends) somewhere in the hell that is GWT… and when GWT
begins with, something about how awesome it is to be able to write Ajax stuff using Java,
I stop reading <http://www.flickr.com/photos/tychay/1388234558/>
This seems to be a common misconception about skinning Gerrit, so
please allow me to take a moment to clear up this.
To deliver custom CSS (or HTML, or Javascript), we can do that with
stock Gerrit /right now/. Right now, two big issues stand in the way
of *really* skinning Gerrit the way we'd like:
1) GWT's CSS is included last, after your custom site CSS. This is
stupid, but fixable (and actually, you can work around it with slapping
!important on everything, but that's silly and I want to fix it for real).
2) Right now, most classes aren't considered "public" facing, so the
names are randomly reassigned when Gerrit is recompiled. This is
easily fixable, as classes where we want the name to remain
stable (and there are some already) can be marked with an
annotation and therefore made "public." This is a one line fix per-
class.
I haven't actually tried doing custom Javascript yet, but it should be
completely doable via the GerritSite.html header that you can
customize (in fact, I've got some other non-JS customizations I
want to roll out there soon).
Gerrit skinning isn't nearly as scary as playing with GWT (which you
only really need to know if you're trying to actually modify the forms/
etc that are being delivered). Once we get the labs installation of
Gerrit back up (working on it!), I'd love to grant access to some CSS
gurus amongst us who'd be willing to try coming up with a prettier
skin for Gerrit.
-Chad