Merge lp:~cjohnston/launchpad/fix-word-break into lp:launchpad

Proposed by Chris Johnston
Status: Superseded
Proposed branch: lp:~cjohnston/launchpad/fix-word-break
Merge into: lp:launchpad
Diff against target: 94 lines (+11/-7)
4 files modified
lib/lp/app/javascript/inlineedit/assets/skins/sam/editor-skin.css (+1/-1)
lib/lp/code/browser/codereviewcomment.py (+1/-1)
lib/lp/code/mail/codereviewcomment.py (+2/-0)
lib/lp/code/mail/tests/test_codereviewcomment.py (+7/-5)
To merge this branch: bzr merge lp:~cjohnston/launchpad/fix-word-break
Reviewer Review Type Date Requested Status
Celso Providelo (community) Approve
Review via email: mp+219252@code.launchpad.net

This proposal has been superseded by a proposal from 2014-05-13.

Commit message

Fix word-break not working in FF, add a newline between code and ICs in emails, default publish inline comments True.

Description of the change

- fixes word-break not working in FF
- add a new line between code and ICs in emails
- Remove a few trailing whitespaces
- Set publish inline comments to true by default

To post a comment you must log in.
Revision history for this message
Celso Providelo (cprov) wrote :

Thanks for working on this.

I have only on minor comment about replacing L.insert(0,...) for a append(''); extend(...); append('')

Once that's done we can land it.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/app/javascript/inlineedit/assets/skins/sam/editor-skin.css'
2--- lib/lp/app/javascript/inlineedit/assets/skins/sam/editor-skin.css 2014-04-09 19:58:33 +0000
3+++ lib/lp/app/javascript/inlineedit/assets/skins/sam/editor-skin.css 2014-05-13 01:31:25 +0000
4@@ -224,7 +224,7 @@
5 font-family: Ubuntu,"Bitstream Vera Sans","DejaVu Sans",Tahoma,sans-serif;
6 font-size: 12px;
7 padding: 0 12px 0;
8- word-break: break-word;
9+ word-break: break-all;
10 }
11
12 .inline-comment>div { line-height: 25px; }
13
14=== modified file 'lib/lp/code/browser/codereviewcomment.py'
15--- lib/lp/code/browser/codereviewcomment.py 2014-04-04 05:23:48 +0000
16+++ lib/lp/code/browser/codereviewcomment.py 2014-05-13 01:31:25 +0000
17@@ -259,7 +259,7 @@
18 comment = self.reply_to.as_quoted_email
19 else:
20 comment = ''
21- return {'comment': comment}
22+ return {'comment': comment, 'publish_inline_comments': True}
23
24 def setUpFields(self):
25 super(CodeReviewCommentAddView, self).setUpFields()
26
27=== modified file 'lib/lp/code/mail/codereviewcomment.py'
28--- lib/lp/code/mail/codereviewcomment.py 2014-04-01 02:14:58 +0000
29+++ lib/lp/code/mail/codereviewcomment.py 2014-05-13 01:31:25 +0000
30@@ -177,7 +177,9 @@
31 result_lines.append('> {0}'.format(diff_lines[i]))
32 comment = comments.get(str(i))
33 if comment is not None:
34+ result_lines.append('')
35 result_lines.extend(comment.splitlines())
36+ result_lines.append('')
37
38 result_text = '\n'.join(result_lines)
39
40
41=== modified file 'lib/lp/code/mail/tests/test_codereviewcomment.py'
42--- lib/lp/code/mail/tests/test_codereviewcomment.py 2014-03-26 19:29:20 +0000
43+++ lib/lp/code/mail/tests/test_codereviewcomment.py 2014-05-13 01:31:25 +0000
44@@ -247,7 +247,7 @@
45 comment = self.makeCommentWithInlineComments(
46 inline_comments={'1': u'Is this from Planet Earth\xa9 ?'})
47 mailer = CodeReviewCommentMailer.forCreation(comment)
48- commenter = comment.branch_merge_proposal.registrant
49+ commenter = comment.branch_merge_proposal.registrant
50 ctrl = mailer.generateEmail(
51 commenter.preferredemail.email, commenter)
52
53@@ -257,11 +257,13 @@
54 '',
55 '> --- yvo/yc/pbqr/vagresnprf/qvss.cl '
56 '2009-10-01 13:25:12 +0000',
57+ '',
58 u'Is this from Planet Earth\xa9 ?',
59+ '',
60 '> +++ yvo/yc/pbqr/vagresnprf/qvss.cl '
61 '2010-02-02 15:48:56 +0000'
62 ]
63- self.assertEqual(expected_lines, ctrl.body.splitlines()[1:7])
64+ self.assertEqual(expected_lines, ctrl.body.splitlines()[1:9])
65
66 def test_generateEmailWithInlineComments_feature_disabled(self):
67 """Inline comments are not considered if the flag is not enabled."""
68@@ -270,7 +272,7 @@
69 content = 'CoNtEnT'
70 comment = self.makeCommentWithInlineComments(content=content)
71 mailer = CodeReviewCommentMailer.forCreation(comment)
72- commenter = comment.branch_merge_proposal.registrant
73+ commenter = comment.branch_merge_proposal.registrant
74 ctrl = mailer.generateEmail(
75 commenter.preferredemail.email, commenter)
76 # Only the comment content (footer is ignored) is included in
77@@ -425,7 +427,7 @@
78 def test_section_header_and_footer(self):
79 # The inline comments section starts with a 4-lines header
80 # (empty lines and title) and ends with an empty line.
81- section = self.getSection({}).splitlines()
82+ section = self.getSection({}).splitlines()
83 header = section[:5]
84 self.assertEqual(
85 ['',
86@@ -452,7 +454,7 @@
87 self.getSection(comments).splitlines()[4:8])
88
89 def test_multi_line_comment(self):
90- # Inline comments with multiple lines are rendered appropriately.
91+ # Inline comments with multiple lines are rendered appropriately.
92 comments = {'1': 'Foo\nBar'}
93 self.assertEqual(
94 ['> +++ bar\t1969-12-31 19:00:00.000000000 -0500',