Patchwork hgweb: avoid line wrapping between revision and annotate-info box in annotate cell (issue5398)

login
register
mail settings
Submitter Tooru Fujisawa
Date Oct. 8, 2016, 10:56 a.m.
Message ID <a0f1fe5c0bd88ea2ebb2.1475924200@mako.unmht.org>
Download mbox | patch
Permalink /patch/16916/
State Accepted
Headers show

Comments

Tooru Fujisawa - Oct. 8, 2016, 10:56 a.m.
# HG changeset patch
# User Tooru Fujisawa <arai.unmht@gmail.com>
# Date 1475922774 -32400
#      Sat Oct 08 19:32:54 2016 +0900
# Node ID a0f1fe5c0bd88ea2ebb2756e20669747e61f5c35
# Parent  f18cc848b48e2de5536fc861007d78d7d5bae42b
hgweb: avoid line wrapping between revision and annotate-info box in annotate cell (issue5398)

Add white-space: nowrap to td.annotate to avoid wrapping div.annotate-info
into next line if there is revision number in the same cell, as it is hard to
mouse over div.annotate-info if it's wrapped into next line.
Augie Fackler - Oct. 8, 2016, 2:28 p.m.
> On Oct 8, 2016, at 12:56, Tooru Fujisawa <arai.unmht@gmail.com> wrote:
> 
> # HG changeset patch
> # User Tooru Fujisawa <arai.unmht@gmail.com>
> # Date 1475922774 -32400
> #      Sat Oct 08 19:32:54 2016 +0900
> # Node ID a0f1fe5c0bd88ea2ebb2756e20669747e61f5c35
> # Parent  f18cc848b48e2de5536fc861007d78d7d5bae42b
> hgweb: avoid line wrapping between revision and annotate-info box in annotate cell (issue5398)

Looks pretty good, however:

1) this summary line is too long:
  6: summary line too long (limit is 78)
   hgweb: avoid line wrapping between revision and annotate-info box in annotate cell (issue5398)
(test-check-commit.t)

2) test-hgweb{,-commands}.t have some minor expectation updates that need to be done.

Can you correct those two issues and mail a v2?

Thanks!

> 
> Add white-space: nowrap to td.annotate to avoid wrapping div.annotate-info
> into next line if there is revision number in the same cell, as it is hard to
> mouse over div.annotate-info if it's wrapped into next line.
> 
> diff --git a/mercurial/templates/static/style-gitweb.css b/mercurial/templates/static/style-gitweb.css
> --- a/mercurial/templates/static/style-gitweb.css
> +++ b/mercurial/templates/static/style-gitweb.css
> @@ -50,16 +50,19 @@ td.indexlinks a {
> }
> td.indexlinks a:hover { background-color: #6666aa; }
> div.pre { font-family:monospace; font-size:12px; white-space:pre; }
> div.diff_info { font-family:monospace; color:#000099; background-color:#edece6; font-style:italic; }
> div.index_include { border:solid #d9d8d1; border-width:0px 0px 1px; padding:12px 8px; }
> div.search { margin:4px 8px; position:absolute; top:56px; right:12px }
> tr.thisrev a { color:#999999; text-decoration: none; }
> tr.thisrev pre { color:#009900; }
> +td.annotate {
> +  white-space: nowrap;
> +}
> div.annotate-info {
>   display: none;
>   position: absolute;
>   background-color: #FFFFFF;
>   border: 1px solid #d9d8d1;
>   text-align: left;
>   color: #000000;
>   padding: 5px;
> diff --git a/mercurial/templates/static/style-monoblue.css b/mercurial/templates/static/style-monoblue.css
> --- a/mercurial/templates/static/style-monoblue.css
> +++ b/mercurial/templates/static/style-monoblue.css
> @@ -330,16 +330,19 @@ td.source {
> .lineno a {
>   color: #999;
> }
> td.linenr {
>   width: 60px;
> }
> tr.thisrev a { color:#999999; text-decoration: none; }
> tr.thisrev td.source { color:#009900; }
> +td.annotate {
> +  white-space: nowrap;
> +}
> div.annotate-info {
>   display: none;
>   position: absolute;
>   background-color: #FFFFFF;
>   border: solid 1px #CCC;
>   text-align: left;
>   color: #666;
>   padding: 5px;
> 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
> @@ -205,16 +205,19 @@ h3 {
> .bigtable .node { width: 5em; font-family: monospace;}
> .bigtable .permissions { width: 8em; text-align: left;}
> .bigtable .size { width: 5em; text-align: right; }
> .bigtable .annotate { text-align: right; }
> .bigtable td.annotate { font-size: smaller; }
> .bigtable td.source { font-size: inherit; }
> tr.thisrev a { color:#999999; text-decoration: none; }
> tr.thisrev td.source { color:#009900; }
> +td.annotate {
> +  white-space: nowrap;
> +}
> div.annotate-info {
>   display: none;
>   position: absolute;
>   background-color: #FFFFFF;
>   border: 1px solid #999;
>   text-align: left;
>   color: #000000;
>   padding: 5px;
> diff --git a/mercurial/templates/static/style.css b/mercurial/templates/static/style.css
> --- a/mercurial/templates/static/style.css
> +++ b/mercurial/templates/static/style.css
> @@ -7,16 +7,19 @@ a { text-decoration:none; }
> .lineno { width: 60px; color: #aaa; font-size: smaller;
>           text-align: right; }
> .plusline { color: green; }
> .minusline { color: red; }
> .atline { color: purple; }
> .annotate { font-size: smaller; text-align: right; padding-right: 1em; }
> tr.thisrev a { color:#999999; text-decoration: none; }
> tr.thisrev pre { color:#009900; }
> +td.annotate {
> +  white-space: nowrap;
> +}
> div.annotate-info {
>   display: none;
>   position: absolute;
>   background-color: #FFFFFF;
>   border: 1px solid #888;
>   text-align: left;
>   color: #000000;
>   padding: 5px;
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Gregory Szorc - Oct. 8, 2016, 2:58 p.m.
Tooru: if you send a version with a correct commit message, I can update
the test expectations for you and make sure this gets committed.

Or if you want to try to run the tests:

  $ cd tests
  $ ./run-tests.py -j4 --interactive test-hgweb*

Then accept the changes, amend the commit, and resend.


On Sat, Oct 8, 2016 at 4:28 PM, Augie Fackler <raf@durin42.com> wrote:

>
> > On Oct 8, 2016, at 12:56, Tooru Fujisawa <arai.unmht@gmail.com> wrote:
> >
> > # HG changeset patch
> > # User Tooru Fujisawa <arai.unmht@gmail.com>
> > # Date 1475922774 -32400
> > #      Sat Oct 08 19:32:54 2016 +0900
> > # Node ID a0f1fe5c0bd88ea2ebb2756e20669747e61f5c35
> > # Parent  f18cc848b48e2de5536fc861007d78d7d5bae42b
> > hgweb: avoid line wrapping between revision and annotate-info box in
> annotate cell (issue5398)
>
> Looks pretty good, however:
>
> 1) this summary line is too long:
>   6: summary line too long (limit is 78)
>    hgweb: avoid line wrapping between revision and annotate-info box in
> annotate cell (issue5398)
> (test-check-commit.t)
>
> 2) test-hgweb{,-commands}.t have some minor expectation updates that need
> to be done.
>
> Can you correct those two issues and mail a v2?
>
> Thanks!
>
> >
> > Add white-space: nowrap to td.annotate to avoid wrapping
> div.annotate-info
> > into next line if there is revision number in the same cell, as it is
> hard to
> > mouse over div.annotate-info if it's wrapped into next line.
> >
> > diff --git a/mercurial/templates/static/style-gitweb.css
> b/mercurial/templates/static/style-gitweb.css
> > --- a/mercurial/templates/static/style-gitweb.css
> > +++ b/mercurial/templates/static/style-gitweb.css
> > @@ -50,16 +50,19 @@ td.indexlinks a {
> > }
> > td.indexlinks a:hover { background-color: #6666aa; }
> > div.pre { font-family:monospace; font-size:12px; white-space:pre; }
> > div.diff_info { font-family:monospace; color:#000099;
> background-color:#edece6; font-style:italic; }
> > div.index_include { border:solid #d9d8d1; border-width:0px 0px 1px;
> padding:12px 8px; }
> > div.search { margin:4px 8px; position:absolute; top:56px; right:12px }
> > tr.thisrev a { color:#999999; text-decoration: none; }
> > tr.thisrev pre { color:#009900; }
> > +td.annotate {
> > +  white-space: nowrap;
> > +}
> > div.annotate-info {
> >   display: none;
> >   position: absolute;
> >   background-color: #FFFFFF;
> >   border: 1px solid #d9d8d1;
> >   text-align: left;
> >   color: #000000;
> >   padding: 5px;
> > diff --git a/mercurial/templates/static/style-monoblue.css
> b/mercurial/templates/static/style-monoblue.css
> > --- a/mercurial/templates/static/style-monoblue.css
> > +++ b/mercurial/templates/static/style-monoblue.css
> > @@ -330,16 +330,19 @@ td.source {
> > .lineno a {
> >   color: #999;
> > }
> > td.linenr {
> >   width: 60px;
> > }
> > tr.thisrev a { color:#999999; text-decoration: none; }
> > tr.thisrev td.source { color:#009900; }
> > +td.annotate {
> > +  white-space: nowrap;
> > +}
> > div.annotate-info {
> >   display: none;
> >   position: absolute;
> >   background-color: #FFFFFF;
> >   border: solid 1px #CCC;
> >   text-align: left;
> >   color: #666;
> >   padding: 5px;
> > 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
> > @@ -205,16 +205,19 @@ h3 {
> > .bigtable .node { width: 5em; font-family: monospace;}
> > .bigtable .permissions { width: 8em; text-align: left;}
> > .bigtable .size { width: 5em; text-align: right; }
> > .bigtable .annotate { text-align: right; }
> > .bigtable td.annotate { font-size: smaller; }
> > .bigtable td.source { font-size: inherit; }
> > tr.thisrev a { color:#999999; text-decoration: none; }
> > tr.thisrev td.source { color:#009900; }
> > +td.annotate {
> > +  white-space: nowrap;
> > +}
> > div.annotate-info {
> >   display: none;
> >   position: absolute;
> >   background-color: #FFFFFF;
> >   border: 1px solid #999;
> >   text-align: left;
> >   color: #000000;
> >   padding: 5px;
> > diff --git a/mercurial/templates/static/style.css
> b/mercurial/templates/static/style.css
> > --- a/mercurial/templates/static/style.css
> > +++ b/mercurial/templates/static/style.css
> > @@ -7,16 +7,19 @@ a { text-decoration:none; }
> > .lineno { width: 60px; color: #aaa; font-size: smaller;
> >           text-align: right; }
> > .plusline { color: green; }
> > .minusline { color: red; }
> > .atline { color: purple; }
> > .annotate { font-size: smaller; text-align: right; padding-right: 1em; }
> > tr.thisrev a { color:#999999; text-decoration: none; }
> > tr.thisrev pre { color:#009900; }
> > +td.annotate {
> > +  white-space: nowrap;
> > +}
> > div.annotate-info {
> >   display: none;
> >   position: absolute;
> >   background-color: #FFFFFF;
> >   border: 1px solid #888;
> >   text-align: left;
> >   color: #000000;
> >   padding: 5px;
> > _______________________________________________
> > Mercurial-devel mailing list
> > Mercurial-devel@mercurial-scm.org
> > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>

Patch

diff --git a/mercurial/templates/static/style-gitweb.css b/mercurial/templates/static/style-gitweb.css
--- a/mercurial/templates/static/style-gitweb.css
+++ b/mercurial/templates/static/style-gitweb.css
@@ -50,16 +50,19 @@  td.indexlinks a {
 }
 td.indexlinks a:hover { background-color: #6666aa; }
 div.pre { font-family:monospace; font-size:12px; white-space:pre; }
 div.diff_info { font-family:monospace; color:#000099; background-color:#edece6; font-style:italic; }
 div.index_include { border:solid #d9d8d1; border-width:0px 0px 1px; padding:12px 8px; }
 div.search { margin:4px 8px; position:absolute; top:56px; right:12px }
 tr.thisrev a { color:#999999; text-decoration: none; }
 tr.thisrev pre { color:#009900; }
+td.annotate {
+  white-space: nowrap;
+}
 div.annotate-info {
   display: none;
   position: absolute;
   background-color: #FFFFFF;
   border: 1px solid #d9d8d1;
   text-align: left;
   color: #000000;
   padding: 5px;
diff --git a/mercurial/templates/static/style-monoblue.css b/mercurial/templates/static/style-monoblue.css
--- a/mercurial/templates/static/style-monoblue.css
+++ b/mercurial/templates/static/style-monoblue.css
@@ -330,16 +330,19 @@  td.source {
 .lineno a {
   color: #999;
 }
 td.linenr {
   width: 60px;
 }
 tr.thisrev a { color:#999999; text-decoration: none; }
 tr.thisrev td.source { color:#009900; }
+td.annotate {
+  white-space: nowrap;
+}
 div.annotate-info {
   display: none;
   position: absolute;
   background-color: #FFFFFF;
   border: solid 1px #CCC;
   text-align: left;
   color: #666;
   padding: 5px;
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
@@ -205,16 +205,19 @@  h3 {
 .bigtable .node { width: 5em; font-family: monospace;}
 .bigtable .permissions { width: 8em; text-align: left;}
 .bigtable .size { width: 5em; text-align: right; }
 .bigtable .annotate { text-align: right; }
 .bigtable td.annotate { font-size: smaller; }
 .bigtable td.source { font-size: inherit; }
 tr.thisrev a { color:#999999; text-decoration: none; }
 tr.thisrev td.source { color:#009900; }
+td.annotate {
+  white-space: nowrap;
+}
 div.annotate-info {
   display: none;
   position: absolute;
   background-color: #FFFFFF;
   border: 1px solid #999;
   text-align: left;
   color: #000000;
   padding: 5px;
diff --git a/mercurial/templates/static/style.css b/mercurial/templates/static/style.css
--- a/mercurial/templates/static/style.css
+++ b/mercurial/templates/static/style.css
@@ -7,16 +7,19 @@  a { text-decoration:none; }
 .lineno { width: 60px; color: #aaa; font-size: smaller;
           text-align: right; }
 .plusline { color: green; }
 .minusline { color: red; }
 .atline { color: purple; }
 .annotate { font-size: smaller; text-align: right; padding-right: 1em; }
 tr.thisrev a { color:#999999; text-decoration: none; }
 tr.thisrev pre { color:#009900; }
+td.annotate {
+  white-space: nowrap;
+}
 div.annotate-info {
   display: none;
   position: absolute;
   background-color: #FFFFFF;
   border: 1px solid #888;
   text-align: left;
   color: #000000;
   padding: 5px;