Merge ~pappacena/launchpad:comment-editing-ui-list-revisions-codereview into launchpad:master

Proposed by Thiago F. Pappacena
Status: Merged
Approved by: Thiago F. Pappacena
Approved revision: ba383cfc0b05db6b222625ed0043f9eec51bdd38
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~pappacena/launchpad:comment-editing-ui-list-revisions-codereview
Merge into: launchpad:master
Prerequisite: ~pappacena/launchpad:comment-editing-ui-list-revisions-bugcomment
Diff against target: 73 lines (+25/-2)
2 files modified
lib/lp/code/stories/branches/xx-code-review-comments.txt (+3/-0)
lib/lp/code/templates/codereviewcomment-header.pt (+22/-2)
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+403285@code.launchpad.net

Commit message

Adding comment revision list to code review page

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/lp/code/stories/branches/xx-code-review-comments.txt b/lib/lp/code/stories/branches/xx-code-review-comments.txt
2index 30d3a26..d0575b0 100644
3--- a/lib/lp/code/stories/branches/xx-code-review-comments.txt
4+++ b/lib/lp/code/stories/branches/xx-code-review-comments.txt
5@@ -38,6 +38,7 @@ to the main merge proposal page.
6 ... print(extract_text(tag))
7
8 >>> print_comments('boardCommentDetails')
9+ Revision history for this message
10 Eric the Viking (eric) wrote ...
11 >>> print_comments('comment-text')
12 This is a very long comment about what things should be done to the
13@@ -111,6 +112,7 @@ are also displayed in the new proposal.
14 source branch to land it. When this comment is replied to, it should
15 wrap the line properly.
16 >>> print_comments('boardCommentDetails', anon_browser, index=0)
17+ Revision history for this message
18 Eric the Viking (eric) wrote ... ago:
19 Posted in a previous version of this proposal #
20 >>> details = find_tags_by_class(
21@@ -132,6 +134,7 @@ comment' link.
22 >>> eric_browser.getControl('Save Comment').click()
23
24 >>> print_comments('boardCommentDetails', eric_browser, index=2)
25+ Revision history for this message
26 Eric the Viking ... ago: #
27 >>> print_comments('boardCommentActivity', eric_browser, index=0)
28 review: Abstain (timeless)
29diff --git a/lib/lp/code/templates/codereviewcomment-header.pt b/lib/lp/code/templates/codereviewcomment-header.pt
30index 77c4650..3d2b976 100644
31--- a/lib/lp/code/templates/codereviewcomment-header.pt
32+++ b/lib/lp/code/templates/codereviewcomment-header.pt
33@@ -3,6 +3,25 @@
34 xmlns:metal="http://xml.zope.org/namespaces/metal"
35 omit-tag="">
36
37+<div class="message-revision-container">
38+ <div class="message-revision-container-header">
39+ <span>Revision history for this message</span>
40+ <img src="/+icing/build/overlay/assets/skins/sam/images/close.gif"
41+ class="message-revision-close"/>
42+ </div>
43+ <script type="text/template">
44+ <div class='message-revision-item'>
45+ <div class='message-revision-title'>
46+ <a class="js-action">
47+ Revision #{revision}, created at {date_created}
48+ </a>
49+ </div>
50+ <div class='message-revision-body'>{content}</div>
51+ </div>
52+ </script>
53+ <div class="message-revision-list"></div>
54+</div>
55+
56 <table>
57 <tbody>
58 <tr>
59@@ -19,11 +38,12 @@
60 tal:content="context/comment_date/fmt:displaydate">
61 7 minutes ago
62 </time><span class="editable-message-last-edit-date"><tal:last-edit condition="context/date_last_edited">
63- (last edit <time
64+ <a href="#" class="editable-message-last-edit-link"
65+ tal:condition="context/date_last_edited">(last edit <time
66 itemprop="editTime"
67 tal:attributes="title context/date_last_edited/fmt:datetime;
68 datetime context/date_last_edited/fmt:isodate"
69- tal:content="context/date_last_edited/fmt:displaydate" />)</tal:last-edit>:
70+ tal:content="context/date_last_edited/fmt:displaydate" />)</a></tal:last-edit>:
71 </span>
72 <span
73 tal:condition="context/from_superseded"