launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #27143
[Merge] ~pappacena/launchpad:comment-editing-ui-list-revisions-bugcomment into launchpad:master
Thiago F. Pappacena has proposed merging ~pappacena/launchpad:comment-editing-ui-list-revisions-bugcomment into launchpad:master with ~pappacena/launchpad:comment-editing-ui-list-revisions as a prerequisite.
Commit message:
Adding message revision list to bug comment
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~pappacena/launchpad/+git/launchpad/+merge/403279
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~pappacena/launchpad:comment-editing-ui-list-revisions-bugcomment into launchpad:master.
diff --git a/lib/lp/bugs/stories/bugattachments/xx-attachments-to-bug-report.txt b/lib/lp/bugs/stories/bugattachments/xx-attachments-to-bug-report.txt
index 2bf6a34..9016ea8 100644
--- a/lib/lp/bugs/stories/bugattachments/xx-attachments-to-bug-report.txt
+++ b/lib/lp/bugs/stories/bugattachments/xx-attachments-to-bug-report.txt
@@ -12,6 +12,7 @@ of bug #11 is:
>>> browser.open("http://bugs.launchpad.test/redfish/+bug/11")
>>> comment_1 = find_tags_by_class(browser.contents, 'boardComment')[0]
>>> print(extract_text(comment_1))
+ Revision history for this message
Valentina Commissari (tsukimi)
wrote
on 2007-03-15:
@@ -43,6 +44,7 @@ displayed as the bug report).
>>> browser.open("http://bugs.launchpad.test/redfish/+bug/11")
>>> comment_0 = find_tags_by_class(browser.contents, 'boardComment')[0]
>>> print(extract_text(comment_0))
+ Revision history for this message
Daniel Silverstone (kinnison)
wrote
on 2007-03-15:
diff --git a/lib/lp/bugs/stories/bugs/xx-bug-activity.txt b/lib/lp/bugs/stories/bugs/xx-bug-activity.txt
index 95d0d4f..1d75aa4 100644
--- a/lib/lp/bugs/stories/bugs/xx-bug-activity.txt
+++ b/lib/lp/bugs/stories/bugs/xx-bug-activity.txt
@@ -63,6 +63,7 @@ page.
... "Here's a comment for testing, like.")
>>> user_browser.getControl('Post Comment').click()
>>> print_comments(user_browser.contents, slice(None))
+ Revision history for this message
In...
Bug Watch Updater (bug-watch-updater)
on 2007-12-18
@@ -70,6 +71,7 @@ page.
status:
Unknown → New
--------
+ Revision history for this message
No Privileges Person (no-priv)
...
#7
@@ -88,6 +90,7 @@ that have been added.
>>> user_browser.open('http://launchpad.test/bugs/15')
>>> print_comments(user_browser.contents, slice(None))
+ Revision history for this message
In...
Bug
...
@@ -226,6 +229,7 @@ bundled with that comment in the UI.
Note that "Lookit, a change!" appears twice: once displaying the message
itself, and once again inside the textarea to edit the message.
>>> print_comments(admin_browser.contents)
+ Revision history for this message
Foo Bar (name16)
wrote
... ago:
@@ -252,6 +256,7 @@ If a target of a bug task is changed the old and new value will be shown.
... ).value = 'linux-source-2.6.15'
>>> admin_browser.getControl("Save Changes").click()
>>> print_comments(admin_browser.contents)
+ Revision history for this message
Foo Bar (name16)
wrote
... ago:
diff --git a/lib/lp/bugs/stories/bugs/xx-bug-create-question.txt b/lib/lp/bugs/stories/bugs/xx-bug-create-question.txt
index ed2fd5d..b094569 100644
--- a/lib/lp/bugs/stories/bugs/xx-bug-create-question.txt
+++ b/lib/lp/bugs/stories/bugs/xx-bug-create-question.txt
@@ -271,6 +271,7 @@ They read their comment that was appended to the bug report's messages.
>>> print(extract_text(
... find_tags_by_class(str(content), 'boardComment')[-1]))
+ Revision history for this message
No Privileges Person (no-priv)
wrote
...
diff --git a/lib/lp/bugs/stories/bugs/xx-remote-bug-comments.txt b/lib/lp/bugs/stories/bugs/xx-remote-bug-comments.txt
index 7fa1e82..59e338d 100644
--- a/lib/lp/bugs/stories/bugs/xx-remote-bug-comments.txt
+++ b/lib/lp/bugs/stories/bugs/xx-remote-bug-comments.txt
@@ -11,6 +11,7 @@ entered within Launchpad itself.
>>> details = remote_bug_comment.find(
... attrs={'class': 'boardCommentDetails'})
>>> print(extract_text(details))
+ Revision history for this message
In
Debian Bug tracker #308994,
josh (jbuhl-nospam)
@@ -21,7 +22,7 @@ entered within Launchpad itself.
Remote comments are decorated with the bug watch icon, to distinguish
them from comments posted directly by Launchpad users.
- >>> print(details.find('img')['src'])
+ >>> print(details.find_all('img')[1]['src'])
/@@/bug-remote
Since it's possible to reply to imported comments and have them
@@ -52,6 +53,7 @@ The new comment appears, formatted as a remote bug comment.
>>> new_bug_comment = find_tags_by_class(
... user_browser.contents, 'remoteBugComment')[-1]
>>> print(extract_text(new_bug_comment))
+ Revision history for this message
In
Debian Bug tracker #308994,
...
@@ -91,6 +93,7 @@ the 'awaiting synchronization' mark goes away.
>>> last_bug_comment = find_tags_by_class(
... user_browser.contents, 'remoteBugComment')[-1]
>>> print(extract_text(last_bug_comment))
+ Revision history for this message
In
Debian Bug tracker #308994,
...
diff --git a/lib/lp/bugs/templates/bugcomment-box.pt b/lib/lp/bugs/templates/bugcomment-box.pt
index 83befd7..34e5789 100644
--- a/lib/lp/bugs/templates/bugcomment-box.pt
+++ b/lib/lp/bugs/templates/bugcomment-box.pt
@@ -14,6 +14,25 @@
data-baseurl comment/fmt:url">
<div class="boardCommentDetails">
+ <div class="message-revision-container">
+ <div class="message-revision-container-header">
+ <span>Revision history for this message</span>
+ <img src="/+icing/build/overlay/assets/skins/sam/images/close.gif"
+ class="message-revision-close"/>
+ </div>
+ <script type="text/template">
+ <div class='message-revision-item'>
+ <div class='message-revision-title'>
+ <a class="js-action">
+ Revision #{revision}, created at {date_created}
+ </a>
+ </div>
+ <div class='message-revision-body'>{content}</div>
+ </div>
+ </script>
+ <div class="message-revision-list"></div>
+ </div>
+
<table>
<tbody>
<tr>
@@ -28,11 +47,12 @@
tal:content="comment/datecreated/fmt:displaydate">
7 minutes ago
</time><span class="editable-message-last-edit-date"><tal:last-edit condition="context/date_last_edited">
- (last edit <time
+ <a href="#" class="editable-message-last-edit-link"
+ tal:condition="context/date_last_edited">(last edit <time
itemprop="editTime"
tal:attributes="title context/date_last_edited/fmt:datetime;
datetime context/date_last_edited/fmt:isodate"
- tal:content="context/date_last_edited/fmt:displaydate"/>)</tal:last-edit>:
+ tal:content="context/date_last_edited/fmt:displaydate"/>)</a></tal:last-edit>:
</span>
<a tal:attributes="href comment/fmt:url"
tal:condition="comment/display_title">
@@ -55,11 +75,12 @@
tal:content="comment/datecreated/fmt:displaydate">
7 minutes ago
</time><span class="editable-message-last-edit-date"><tal:last-edit condition="context/date_last_edited">
- (last edit <time
+ <a href="#" class="editable-message-last-edit-link"
+ tal:condition="context/date_last_edited">(last edit <time
itemprop="editTime"
tal:attributes="title context/date_last_edited/fmt:datetime;
datetime context/date_last_edited/fmt:isodate"
- tal:content="context/date_last_edited/fmt:displaydate"/>)</tal:last-edit>:
+ tal:content="context/date_last_edited/fmt:displaydate"/>)</a></tal:last-edit>:
</span>
<a tal:attributes="href comment/fmt:url">
<strong tal:condition="comment/display_title"
Follow ups