Patchwork [1,of,3] hgweb: split some long lines in paper, gitweb and monoblue styles

login
register
mail settings
Submitter Anton Shestakov
Date May 15, 2015, 3:25 p.m.
Message ID <4830c872477ffb59e2da.1431703530@neuro>
Download mbox | patch
Permalink /patch/9103/
State Accepted
Commit 09ec4220a839eaa24a5cab87977028d467b3e82c
Headers show

Comments

Anton Shestakov - May 15, 2015, 3:25 p.m.
# HG changeset patch
# User Anton Shestakov <engored@ya.ru>
# Date 1431626863 -28800
#      Fri May 15 02:07:43 2015 +0800
# Node ID 4830c872477ffb59e2da36ef950bba5a201659fa
# Parent  d1bd0fd07ee6adf4ab3be2b0a0a7c0df54d55abf
hgweb: split some long lines in paper, gitweb and monoblue styles

This will ease future patches for the templates.

As a result of this patch, paper style has one visual change in
log/shortlog/file log view: the spacing between commit message and the first
tag (or branch name, or bookmark) is now roughly who spaces wide instead of one
space wide. This spacing is consistent with the one between branch
names/tags/bookmarks themselves, so it looks better.

In gitweb style, the change from non-breakable space to regular space is
consistent with other elements.

In monoblue the change is not noticeable.
Pierre-Yves David - May 15, 2015, 7:55 p.m.
On 05/15/2015 08:25 AM, Anton Shestakov wrote:
> # HG changeset patch
> # User Anton Shestakov <engored@ya.ru>
> # Date 1431626863 -28800
> #      Fri May 15 02:07:43 2015 +0800
> # Node ID 4830c872477ffb59e2da36ef950bba5a201659fa
> # Parent  d1bd0fd07ee6adf4ab3be2b0a0a7c0df54d55abf
> hgweb: split some long lines in paper, gitweb and monoblue styles
>
> This will ease future patches for the templates.
>
> As a result of this patch, paper style has one visual change in
> log/shortlog/file log view: the spacing between commit message and the first
> tag (or branch name, or bookmark) is now roughly who spaces wide instead of one
> space wide. This spacing is consistent with the one between branch
> names/tags/bookmarks themselves, so it looks better.
>
> In gitweb style, the change from non-breakable space to regular space is
> consistent with other elements.
>
> In monoblue the change is not noticeable.

This series looks fine to me, but I'm not sure how people will feel 
about the changes.

I feel like some change are more "consistency fixes" than others. I 
would have helped to have each template changed in its own patch.

I'll let people some time to react to this.
Augie Fackler - May 15, 2015, 8:58 p.m.
On Fri, May 15, 2015 at 12:55:19PM -0700, Pierre-Yves David wrote:
>
>
> On 05/15/2015 08:25 AM, Anton Shestakov wrote:
> ># HG changeset patch
> ># User Anton Shestakov <engored@ya.ru>
> ># Date 1431626863 -28800
> >#      Fri May 15 02:07:43 2015 +0800
> ># Node ID 4830c872477ffb59e2da36ef950bba5a201659fa
> ># Parent  d1bd0fd07ee6adf4ab3be2b0a0a7c0df54d55abf
> >hgweb: split some long lines in paper, gitweb and monoblue styles
> >
> >This will ease future patches for the templates.
> >
> >As a result of this patch, paper style has one visual change in
> >log/shortlog/file log view: the spacing between commit message and the first
> >tag (or branch name, or bookmark) is now roughly who spaces wide instead of one
> >space wide. This spacing is consistent with the one between branch
> >names/tags/bookmarks themselves, so it looks better.
> >
> >In gitweb style, the change from non-breakable space to regular space is
> >consistent with other elements.
> >
> >In monoblue the change is not noticeable.
>
> This series looks fine to me, but I'm not sure how people will feel about
> the changes.
>
> I feel like some change are more "consistency fixes" than others. I would
> have helped to have each template changed in its own patch.
>
> I'll let people some time to react to this.

I'm fine with this series as-is, if you want to take it feel
encouraged to do so.

>
>
> --
> Pierre-Yves David
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
Pierre-Yves David - May 15, 2015, 9:49 p.m.
On 05/15/2015 01:58 PM, Augie Fackler wrote:
> On Fri, May 15, 2015 at 12:55:19PM -0700, Pierre-Yves David wrote:
>>
>>
>> On 05/15/2015 08:25 AM, Anton Shestakov wrote:
>>> # HG changeset patch
>>> # User Anton Shestakov <engored@ya.ru>
>>> # Date 1431626863 -28800
>>> #      Fri May 15 02:07:43 2015 +0800
>>> # Node ID 4830c872477ffb59e2da36ef950bba5a201659fa
>>> # Parent  d1bd0fd07ee6adf4ab3be2b0a0a7c0df54d55abf
>>> hgweb: split some long lines in paper, gitweb and monoblue styles
>>>
>>> This will ease future patches for the templates.
>>>
>>> As a result of this patch, paper style has one visual change in
>>> log/shortlog/file log view: the spacing between commit message and the first
>>> tag (or branch name, or bookmark) is now roughly who spaces wide instead of one
>>> space wide. This spacing is consistent with the one between branch
>>> names/tags/bookmarks themselves, so it looks better.
>>>
>>> In gitweb style, the change from non-breakable space to regular space is
>>> consistent with other elements.
>>>
>>> In monoblue the change is not noticeable.
>>
>> This series looks fine to me, but I'm not sure how people will feel about
>> the changes.
>>
>> I feel like some change are more "consistency fixes" than others. I would
>> have helped to have each template changed in its own patch.
>>
>> I'll let people some time to react to this.
>
> I'm fine with this series as-is, if you want to take it feel
> encouraged to do so.

Pushed to the clowncopter. Thanks

Patch

diff --git a/mercurial/templates/gitweb/map b/mercurial/templates/gitweb/map
--- a/mercurial/templates/gitweb/map
+++ b/mercurial/templates/gitweb/map
@@ -296,8 +296,12 @@  filelogentry = '
       </a>
     </td>
     <td class="link">
-      <a href="{url|urlescape}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a>&nbsp;|&nbsp;<a href="{url|urlescape}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a>&nbsp;|&nbsp;<a href="{url|urlescape}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a> {rename%filelogrename}</td>
-    </tr>'
+      <a href="{url|urlescape}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a> |
+      <a href="{url|urlescape}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a> |
+      <a href="{url|urlescape}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a>
+      {rename%filelogrename}
+    </td>
+  </tr>'
 archiveentry = ' | <a href="{url|urlescape}archive/{node|short}{extension}{ifeq(path,'/','',path|urlescape)}">{type|escape}</a> '
 indexentry = '
   <tr class="parity{parity}">
diff --git a/mercurial/templates/monoblue/map b/mercurial/templates/monoblue/map
--- a/mercurial/templates/monoblue/map
+++ b/mercurial/templates/monoblue/map
@@ -244,7 +244,11 @@  shortlogentry = '
 filelogentry = '
   <tr class="parity{parity}">
     <td class="nowrap age">{date|rfc822date}</td>
-    <td><a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape|nonempty}</a></td>
+    <td>
+      <a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">
+        {desc|strip|firstline|escape|nonempty}
+      </a>
+    </td>
     <td class="nowrap">
       <a href="{url|urlescape}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a>&nbsp;|&nbsp;<a href="{url|urlescape}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a>&nbsp;|&nbsp;<a href="{url|urlescape}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a>
       {rename%filelogrename}
diff --git a/mercurial/templates/paper/filelogentry.tmpl b/mercurial/templates/paper/filelogentry.tmpl
--- a/mercurial/templates/paper/filelogentry.tmpl
+++ b/mercurial/templates/paper/filelogentry.tmpl
@@ -1,5 +1,8 @@ 
  <tr>
   <td class="age">{date|rfc822date}</td>
   <td class="author">{author|person}</td>
-  <td class="description"><a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape|nonempty}</a>{inbranch%changelogbranchname}{branches%changelogbranchhead}{tags%changelogtag}{rename%filelogrename}</td>
+  <td class="description">
+   <a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape|nonempty}</a>
+   {inbranch%changelogbranchname}{branches%changelogbranchhead}{tags%changelogtag}{rename%filelogrename}
+  </td>
  </tr>
diff --git a/mercurial/templates/paper/shortlogentry.tmpl b/mercurial/templates/paper/shortlogentry.tmpl
--- a/mercurial/templates/paper/shortlogentry.tmpl
+++ b/mercurial/templates/paper/shortlogentry.tmpl
@@ -1,5 +1,8 @@ 
  <tr>
   <td class="age">{date|rfc822date}</td>
   <td class="author">{author|person}</td>
-  <td class="description"><a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape|nonempty}</a>{inbranch%changelogbranchname}{branches%changelogbranchhead}{tags%changelogtag}{bookmarks%changelogtag}</td>
+  <td class="description">
+   <a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape|nonempty}</a>
+   {inbranch%changelogbranchname}{branches%changelogbranchhead}{tags%changelogtag}{bookmarks%changelogtag}
+  </td>
  </tr>
diff --git a/tests/test-hgweb-commands.t b/tests/test-hgweb-commands.t
--- a/tests/test-hgweb-commands.t
+++ b/tests/test-hgweb-commands.t
@@ -762,22 +762,34 @@  Logs and changes
    <tr>
     <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
     <td class="author">test</td>
-    <td class="description"><a href="/rev/cad8025a2e87">branch commit with null character: </a><span class="branchhead">unstable</span> <span class="tag">tip</span> <span class="tag">something</span> </td>
+    <td class="description">
+     <a href="/rev/cad8025a2e87">branch commit with null character: </a>
+     <span class="branchhead">unstable</span> <span class="tag">tip</span> <span class="tag">something</span> 
+    </td>
    </tr>
    <tr>
     <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
     <td class="author">test</td>
-    <td class="description"><a href="/rev/1d22e65f027e">branch</a><span class="branchhead">stable</span> </td>
+    <td class="description">
+     <a href="/rev/1d22e65f027e">branch</a>
+     <span class="branchhead">stable</span> 
+    </td>
    </tr>
    <tr>
     <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
     <td class="author">test</td>
-    <td class="description"><a href="/rev/a4f92ed23982">Added tag 1.0 for changeset 2ef0ac749a14</a><span class="branchhead">default</span> </td>
+    <td class="description">
+     <a href="/rev/a4f92ed23982">Added tag 1.0 for changeset 2ef0ac749a14</a>
+     <span class="branchhead">default</span> 
+    </td>
    </tr>
    <tr>
     <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
     <td class="author">test</td>
-    <td class="description"><a href="/rev/2ef0ac749a14">base</a><span class="tag">1.0</span> <span class="tag">anotherthing</span> </td>
+    <td class="description">
+     <a href="/rev/2ef0ac749a14">base</a>
+     <span class="tag">1.0</span> <span class="tag">anotherthing</span> 
+    </td>
    </tr>
   
   </tbody>
@@ -1024,7 +1036,10 @@  Logs and changes
    <tr>
     <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
     <td class="author">test</td>
-    <td class="description"><a href="/rev/2ef0ac749a14">base</a><span class="tag">1.0</span> <span class="tag">anotherthing</span> </td>
+    <td class="description">
+     <a href="/rev/2ef0ac749a14">base</a>
+     <span class="tag">1.0</span> <span class="tag">anotherthing</span> 
+    </td>
    </tr>
   
   </tbody>
diff --git a/tests/test-hgweb-filelog.t b/tests/test-hgweb-filelog.t
--- a/tests/test-hgweb-filelog.t
+++ b/tests/test-hgweb-filelog.t
@@ -191,12 +191,18 @@  tip - two revisions
    <tr>
     <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
     <td class="author">test</td>
-    <td class="description"><a href="/rev/01de2d66a28d">second a</a></td>
+    <td class="description">
+     <a href="/rev/01de2d66a28d">second a</a>
+     
+    </td>
    </tr>
    <tr>
     <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
     <td class="author">test</td>
-    <td class="description"><a href="/rev/5ed941583260">first a</a></td>
+    <td class="description">
+     <a href="/rev/5ed941583260">first a</a>
+     
+    </td>
    </tr>
   
   </tbody>
@@ -302,12 +308,18 @@  second version - two revisions
    <tr>
     <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
     <td class="author">test</td>
-    <td class="description"><a href="/rev/01de2d66a28d">second a</a></td>
+    <td class="description">
+     <a href="/rev/01de2d66a28d">second a</a>
+     
+    </td>
    </tr>
    <tr>
     <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
     <td class="author">test</td>
-    <td class="description"><a href="/rev/5ed941583260">first a</a></td>
+    <td class="description">
+     <a href="/rev/5ed941583260">first a</a>
+     
+    </td>
    </tr>
   
   </tbody>
@@ -413,7 +425,10 @@  first deleted - one revision
    <tr>
     <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
     <td class="author">test</td>
-    <td class="description"><a href="/rev/5ed941583260">first a</a></td>
+    <td class="description">
+     <a href="/rev/5ed941583260">first a</a>
+     
+    </td>
    </tr>
   
   </tbody>
@@ -519,7 +534,10 @@  first version - one revision
    <tr>
     <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
     <td class="author">test</td>
-    <td class="description"><a href="/rev/5ed941583260">first a</a></td>
+    <td class="description">
+     <a href="/rev/5ed941583260">first a</a>
+     
+    </td>
    </tr>
   
   </tbody>