[upstream] alternate change list row colors
Closed, ResolvedPublic

Description

Gerrit revision lists would highly benefit from alternating row colors or highlighting of the hovered row.


Version: unspecified
Severity: normal

Details

Reference
bz38114
bzimport set Reference to bz38114.
bzimport added a subscriber: Unknown Object (MLST).

With revision I mean patches.

I also learned that you can click the row, but this feature is not discoverable.

hashar added a comment.Jul 2 2012, 9:01 AM

I have changed the bug summary which is really about using alternate colors on the changes list.

Timo and Roan did some work to enhance Gerrit look'n feel, seems to be as easy as tweaking a CSS file.

saper added a comment.Jul 2 2012, 9:36 AM

My bet is that this requires change in

gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeTable2.java

and it's not an easy CSS change (CSS identifiers in GWT change on build)

+upstream (not filed yet)

demon added a comment.Jul 3 2012, 6:33 PM

Actually, I think this will be handled as part of some recent UI changes by OpenStack:

https://gerrit-review.googlesource.com/#/c/36560/

Do we have to make some changes to enable the colors?

demon added a comment.Oct 29 2012, 3:15 PM

We'll have to set two theme settings (tableOddRowColor & tableEvenRowColor). Blocked on the 2.5 upgraded.

https://gerrit-review.googlesource.com/Documentation/config-gerrit.html#_a_id_theme_a_section_theme

demon added a comment.Feb 12 2013, 3:34 PM

This is possible now, anyone have 2 colors in mind?

white / #DCDCDC ?

demon added a comment.Feb 19 2013, 5:18 PM

I'd like Timo's input, since he did most of the skinning work last time :)

CC'd.

(In reply to comment #9)

white / #DCDCDC ?

Slight different:

#fff / #eee

That way it matches our other white-alternating styles (label columns of info block, header of comment thread etc.)

Gerrit config tweak: https://gerrit.wikimedia.org/r/49993

Untested though.

The color alternance is applied by using a CSS selector :nth-child(odd) and :nth-child(even) on each of the table rows (tr). That is done via the .tableChange class.

On a user dashboard view, the section headers and their changes are all part of the same global table which apply the .tableChange class.

Given a previous section can get an odd or even number of changes, the first change in a section can in turn be either odd or even. Thus we could have the first change of a section to receive the same color as the header :(

We might want to pick a different color to differentiate changes/headers or have the bug fixed upstream. Like pink for headers.

Created attachment 11812
first change line having the same color as the header

Attached:

(In reply to comment #0)

Gerrit patch lists would highly benefit from alternating row colors or
highlighting of the hovered row.

Are you referring to the list of Pathes on a change page

Patch set 3 fd9d49c8 (gitweb)
Patch set 2 4772e9eb (gitweb)
Patch set 1 4ba628db (gitweb)

etc.

Or do you mean "change" lists, the list of changes as a result from a search query or the dashboard for example:

(*) | Change subject | Owner | Project | ...
(*) | Change subject | Owner | Project | ...
(*) | Change subject | Owner | Project | ...

This bug is about alternate change list row colors. So I guess changes and that is what have been implemented upstream. There is no such support for the list of patchset, I guess that should be an other bug.

hashar added a comment.Mar 7 2013, 6:40 PM

Christian Aistleitner submitted a patch to upstream: https://gerrit-review.googlesource.com/#/c/42502/

That patch is still pending, by the way.

demon removed a subscriber: demon.Dec 8 2014, 6:33 PM

This https://gerrit-review.googlesource.com/#/c/42502/ has been abandoned now.

It was abandoned since it went onto the new change screen in gerrit 2.9.

We run gerrit 2.12 now so we now use the new gerrit change screen.

Is this still a problem or can this be closed and declined or resolved please?

Krinkle removed a subscriber: Krinkle.Aug 2 2016, 10:04 PM
demon added a subscriber: demon.Jan 10 2017, 7:11 AM

Created attachment 11812
first change line having the same color as the header

I don't think this is a huge problem, and who knows this may have even been fixed since we last tried. Either way, I restored gerrit 49993

Change 49993 had a related patch set uploaded (by Hashar):
gerrit: alternate change list row colors

https://gerrit.wikimedia.org/r/49993

@Nikerabbit hi, would you be able to +1 / -1 ^^ please? Just so we know you still want this please.

Change 49993 merged by Dzahn:
gerrit: alternate change list row colors

https://gerrit.wikimedia.org/r/49993

Mentioned in SAL (#wikimedia-operations) [2017-01-10T21:04:57Z] <mutante> gerrit restarting for config change 49993 (T40114)

Dzahn closed this task as "Resolved".Jan 10 2017, 9:07 PM
Dzahn claimed this task.
Dzahn reassigned this task from Dzahn to hashar.

Nice that we could close this imported Bugzilla ticket :) thanks @hashar

Change 331553 had a related patch set uploaded (by Krinkle):
gerrit: Reduce tableEven/OddRowColor contrast.

https://gerrit.wikimedia.org/r/331553

Change 331553 merged by Dzahn:
gerrit: Reduce tableEven/OddRowColor contrast.

https://gerrit.wikimedia.org/r/331553

Change 331553 had a related patch set uploaded (by Krinkle):
gerrit: Reduce tableEven/OddRowColor contrast.

https://gerrit.wikimedia.org/r/331553

Looking at the screenshot, I would not have noticed the difference between the rows had I not been looking for it. A middle ground may be appropriate.

Change 331553 had a related patch set uploaded (by Krinkle):
gerrit: Reduce tableEven/OddRowColor contrast.

https://gerrit.wikimedia.org/r/331553

Looking at the screenshot, I would not have noticed the difference between the rows had I not been looking for it. A middle ground may be appropriate.

Personally, looking at the screenshot, I think the contrast is still larger than it should be. ;)

A middle ground may be appropriate.
I think the contrast is still larger than it should be. ;)

Can you use different themes? I noticed when viewing a Gerrit diff there is an icon for setting "diff preferences" with a long list of themes from "blackboard" to "cobalt", "lesser_dark" "ruby blue" and lots more. Is that only for diffs or also in other places like change lists? Does it work?

I think that only changes diffs. Please don't mind me, I can deal with it or customize my user CSS :)

Funnily on my screen and with my old eyes #F7F7F7 is the same as #FFFFFF :}