[PATCH 2 of 5] paper: skip empty table cells in annotate view, use rowspan on block heads

Anton Shestakov av6 at dwimlabs.net
Fri Jul 15 03:05:11 EDT 2016


On Thu, 14 Jul 2016 15:31:27 +0800
Anton Shestakov <av6 at dwimlabs.net> wrote:

> # HG changeset patch
> # User Anton Shestakov <av6 at dwimlabs.net>
> # Date 1468473227 -28800
> #      Thu Jul 14 13:13:47 2016 +0800
> # Node ID 75b968dd1b1b0f7b64abd0c6d2b2d38b5734237a
> # Parent  1d5710a9fc8f764030af5c14bfef7da20eaea989
> paper: skip empty table cells in annotate view, use rowspan on block
> heads
> 
> Apart from looking nicer, this also substantially cuts down page size
> that more than doubled after the recent annotate changes in hgweb:
> 
> Annotating templates/paper/map @ 3.8.4 (style=paper):
> - current stable: 81.6 KB
> - hg-committed: 211 KB
> - this change: 130 KB

A thing I should've realized before sending this: because a block now
has a single popup, there's no way to differentiate between individual
lines in that block. Which means that clicking on the commit hash link
in the popup always leads to the first line in that block.

In other words, no way to navigate to a specific line directly from
the UI, only to the beginning of the block that the line belongs to. If
the block is big, users would spend time looking for that particular
line from the middle of the block they wanted, because it wouldn't be
the one highlighted.

I guess this series should've been flagged as RFC.

If anything, at least it shows how to highlight block heads in
alternating colors (i.e. not cell-by-cell, but block-by-block).


More information about the Mercurial-devel mailing list