diff mbox

templates: Move comments to above patch

Message ID 1459214952-5713-1-git-send-email-jk@ozlabs.org
State Accepted
Headers show

Commit Message

Jeremy Kerr March 29, 2016, 1:29 a.m. UTC
It's much more likely that existing comments will affect the user's
actions, rather than the patch content itself, so put the comments
first.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
---
 patchwork/templates/patchwork/patch.html | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

Comments

Stephen Finucane March 29, 2016, 8:50 a.m. UTC | #1
On 29 Mar 09:29, Jeremy Kerr wrote:
> It's much more likely that existing comments will affect the user's
> actions, rather than the patch content itself, so put the comments
> first.
> 
> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>

Agreed and merged. In addition, per David Miller's [1] comments, this
is a regression on existing behavior and should also be backported so
I've done just that.

Stephen

[1] https://plus.google.com/+DavidMiller/posts/EwRaCxDSiWW
Stephen Finucane March 29, 2016, 8:53 a.m. UTC | #2
On 29 Mar 09:29, Jeremy Kerr wrote:
> It's much more likely that existing comments will affect the user's
> actions, rather than the patch content itself, so put the comments
> first.
> 
> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>

Acked-by: Stephen Finucane <stephen.finucane@intel.com>
diff mbox

Patch

diff --git a/patchwork/templates/patchwork/patch.html b/patchwork/templates/patchwork/patch.html
index a05f00d..8b6d1fe 100644
--- a/patchwork/templates/patchwork/patch.html
+++ b/patchwork/templates/patchwork/patch.html
@@ -202,6 +202,22 @@  function toggle_headers(link_id, headers_id)
 </pre>
 </div>
 
+{% for item in patch.comments.all %}
+{% if forloop.first %}
+<h2>Comments</h2>
+{% endif %}
+
+<div class="comment">
+<div class="meta">
+ <span>{{ item.submitter|personify:project }}</span>
+ <span class="pull-right">{{ item.date }}</span>
+</div>
+<pre class="content">
+{{ item|commentsyntax }}
+</pre>
+</div>
+{% endfor %}
+
 {% if patch.diff %}
 <h2>
  Patch
@@ -220,20 +236,4 @@  function toggle_headers(link_id, headers_id)
 </div>
 {% endif %}
 
-{% for item in patch.comments.all %}
-{% if forloop.first %}
-<h2>Comments</h2>
-{% endif %}
-
-<div class="comment">
-<div class="meta">
- <span>{{ item.submitter|personify:project }}</span>
- <span class="pull-right">{{ item.date }}</span>
-</div>
-<pre class="content">
-{{ item|commentsyntax }}
-</pre>
-</div>
-{% endfor %}
-
 {% endblock %}