[PATCH 3 of 4 V5] hgweb: add link to parents of annotated revision in annotate view

Anton Shestakov engored at ya.ru
Tue Jun 14 10:11:33 EDT 2016


14.06.2016, 20:53, "Denis Laxalde" <denis.laxalde at logilab.fr>:
>  # HG changeset patch
>  # User Denis Laxalde <denis.laxalde at logilab.fr>
>  # Date 1465894453 -7200
>  # Tue Jun 14 10:54:13 2016 +0200
>  # Node ID ad269193c2590946f31d7f86fbd85f06f6baacb4
>  # Parent 9e807bdf1626b228399c219e66c027233fa3b0d5
>  hgweb: add link to parents of annotated revision in annotate view
>
>  The link is embedded into a div with class="annotate-info" that only shows up
>  upon hover of the annotate column.

Since this patch is not obvious, I have some questions before seeing it in action (since it depends on the previous patches, and I hope we can accept them soon).

>  diff --git a/mercurial/templates/static/style-paper.css b/mercurial/templates/static/style-paper.css
>  --- a/mercurial/templates/static/style-paper.css
>  +++ b/mercurial/templates/static/style-paper.css
>  @@ -210,6 +210,16 @@ h3 {
>   .bigtable td.source { font-size: inherit; }
>   tr.thisrev a { color:#999999; text-decoration: none; }
>   tr.thisrev td.source { color:#009900; }
>  +div.annotate-info {
>  + display: none;
>  + position: absolute;

It's absolutely positioned relative to what? And where will it appear, since it doesn't specify any coordinates?

>  + background-color: #FFFFFF;
>  + border-color: #000000;
>  + border: 1px solid;

Nit: a shortcut is "border: 1px solid #000000;"

>  +}
>  +.annotate-info p {margin-top: 0; margin-bottom: 0;}

Nit: if it's a <p> that needs removing margins, can it just be a <div> instead?

>  +td.annotate:hover div.annotate-info { display: inline; text-align: left; color: #000000;}
>  +td.annotate:hover .annotate-info a { color: #0000FF; text-decoration: underline; }

I don't get these two. Setting display on hover is obvious, but why set things like color, text-align and text-decoration on hover only?


More information about the Mercurial-devel mailing list