Tom [Wed, 29 Oct 2014 13:50:52 +0000 (14:50 +0100)]
CSS changes.
- As discussed:
- gutter a little lighter, context lines nearly but not quite
white.
- 2px left (and right) padding in the code column.
- I also noticed that somehow all lines were spaced vertically a little
wider than on dev.gitblit. Added cellpadding='0' to get the old line
height again.
Tom [Tue, 28 Oct 2014 20:55:21 +0000 (21:55 +0100)]
More diff page improvements
- Use git object ids as fragments and HTML element ids
- Simplify generation: don't parse the diff line, instead generate
the table header from the DiffEntry when we process it, and just
skip the diff lines.
Tom [Sun, 26 Oct 2014 17:10:13 +0000 (18:10 +0100)]
Improve the commitdiff.
* Optimize CSS: simplify selectors. That alone cuts rendering time in
half!
* Adapt HTML generation accordingly.
* Change line number generation so that one can select only code lines.
Also move the +/- out of the code column; it also gets in the way
when selecting.
* Omit long diffs altogether.
* Omit diff lines for deleted files, they're not particularly
interesting.
* Introduce a global limit on the maximum number of diff lines to show.
* Supply translations for the languages I speak for the new messages.
https://code.google.com/p/gitblit/issues/detail?id=450 was about a diff
with nearly 300k changed lines (with more then 3000 files deleted). But
one doesn't have to have such a monster commit to run into problems. My
FF 32 become unresponsive for the 30+ seconds it takes it to render a
commitdiff with some 30000 changed lines. (90% of which are in two
generated files; the whole commit has just 20 files.) GitHub has no
problems showing a commitdiff for this commit, but omits the two large
generated files, which makes sense.
This change implements a similar thing. Files with too many diff lines
get omitted from the output, only the header and a message that the
diff is too large remains. Additionally, there's a global limit on
the length of a commitdiff; if we exceed that, the whole diff is
truncated and the files not shown are listed.
The CSS change improves performance by not using descendant selectors
for all these table cells. Instead, we assign them precise classes and
just use that in the CSS.
The line number generation thing using data attributes and a :before
selector in the CSS, which enables text selections only in the code
column, is not strictly XHTML 1.0. (Data attributes are a feature of
HTML 5.) However, reasonably modern browsers also handle this correctly
if the page claims to be XHTML 1.0. Besides, the commitdiff page isn't
XHTML compliant anyway; I don't think a pre-element may contain divs
or even tables.
(Note that this technique could be used on other diff pages, too. For
instance on the blame page.)
James Moger [Tue, 21 Oct 2014 13:33:29 +0000 (09:33 -0400)]
Adjust priority & severity CSS
- Severity: more severe are ROY, less severe are GB
- Replaced first-letter of severity with S# and show # dots
- Priority: higher priorityare RO, lower priority is B
I really like the 'C, 'CA' idea but that will definitely lead to translation questions. The S# approach will still generate the same complaints, but at least it is more generic.
Paul Martin [Mon, 29 Sep 2014 21:10:20 +0000 (22:10 +0100)]
Tickets - Priority, Severity options
+ Severity indicated via new character indicator and color of ticket icon on ticket list
+ Priority indicated via new priority icon and color on ticket list
+ Indexed as integers to provide sorting and maintain language neutral
index
+ Colours and indicator text controlled through CSS classes priority-<x> & severity-<x>
+ UITicketTest created to generate tickets of all types to ease debugging
Bug in the rawservlet in extracting the repository out of the path. The
offset for finding the next slash should be the current slash + 1, not
the last offset + the offset of the current slash.
James Moger [Tue, 30 Sep 2014 13:47:56 +0000 (09:47 -0400)]
Hack/workaround Bootstrap responsive behavior for ticket dropdowns
This is a temporary solution. A better fix would be to update to Bootstrap 3 and replace the dropdown with a filterable dropdown - but that is a much larger change than this quick patch.