gitlab-org--gitlab-foss/app/views/notify
hhoopes f928dba99b Change diff highlight/truncate for reusability
Previously the `truncated_diff_lines` method for outputting a discussion diff took in already highlighted lines, which meant it wasn't reuseable for truncating ANY lines. In the way it was used, it also meant that for any email truncation, the whole diff was being highlighted before being truncated, meaning wasted time highlighting lines that wouldn't even be used (granted, they were being memoized, so perhaps this wasn't that great of an issue). I refactored truncation away from highlighting, in order to truncate formatted diffs for text templates in email, using `>`s to designate each line, but otherwise retaining the parsing already done to create `diff_lines`.

Additionally, while notes on merge requests or commits had already been tested, there was no existing test for notes on a diff on an MR or commit. Added mailer tests for such, and a unit test for truncating diff lines.
2016-11-25 15:23:49 +00:00
..
links Move partials to links directory, feedback: 2016-11-22 13:44:25 +08:00
_note_message.html.haml
_note_mr_or_commit_email.html.haml Change diff highlight/truncate for reusability 2016-11-25 15:23:49 +00:00
_reassigned_issuable_email.html.haml
_reassigned_issuable_email.text.erb
_relabeled_issuable_email.html.haml
_relabeled_issuable_email.text.erb
_simple_diff.text.erb Change diff highlight/truncate for reusability 2016-11-25 15:23:49 +00:00
build_fail_email.html.haml
build_fail_email.text.erb
build_success_email.html.haml
build_success_email.text.erb
closed_issue_email.html.haml
closed_issue_email.text.haml
closed_merge_request_email.html.haml
closed_merge_request_email.text.haml
issue_moved_email.html.haml
issue_moved_email.text.erb
issue_status_changed_email.html.haml
issue_status_changed_email.text.erb
member_access_denied_email.html.haml
member_access_denied_email.text.erb
member_access_granted_email.html.haml
member_access_granted_email.text.erb
member_access_requested_email.html.haml
member_access_requested_email.text.erb
member_invite_accepted_email.html.haml
member_invite_accepted_email.text.erb
member_invite_declined_email.html.haml
member_invite_declined_email.text.erb
member_invited_email.html.haml
member_invited_email.text.erb
merge_request_status_email.html.haml
merge_request_status_email.text.haml
merged_merge_request_email.html.haml
merged_merge_request_email.text.haml
new_email_email.html.haml
new_email_email.text.erb
new_issue_email.html.haml
new_issue_email.text.erb
new_mention_in_issue_email.html.haml
new_mention_in_issue_email.text.erb
new_mention_in_merge_request_email.html.haml
new_mention_in_merge_request_email.text.erb
new_merge_request_email.html.haml
new_merge_request_email.text.erb
new_ssh_key_email.html.haml
new_ssh_key_email.text.erb
new_user_email.html.haml
new_user_email.text.erb
note_commit_email.html.haml Change diff highlight/truncate for reusability 2016-11-25 15:23:49 +00:00
note_commit_email.text.erb Change diff highlight/truncate for reusability 2016-11-25 15:23:49 +00:00
note_issue_email.html.haml
note_issue_email.text.erb
note_merge_request_email.html.haml Change diff highlight/truncate for reusability 2016-11-25 15:23:49 +00:00
note_merge_request_email.text.erb Change diff highlight/truncate for reusability 2016-11-25 15:23:49 +00:00
note_snippet_email.html.haml
note_snippet_email.text.erb
pipeline_failed_email.html.haml Move partials to links directory, feedback: 2016-11-22 13:44:25 +08:00
pipeline_failed_email.text.erb Move partials to links directory, feedback: 2016-11-22 13:44:25 +08:00
pipeline_success_email.html.haml 17492 Update link color for more accessible contrast 2016-11-07 11:06:48 -08:00
pipeline_success_email.text.erb Boo. Midnight programming is bad. Just pass pipeline 2016-10-14 03:40:50 +08:00
project_was_exported_email.html.haml
project_was_exported_email.text.erb
project_was_moved_email.html.haml
project_was_moved_email.text.erb
project_was_not_exported_email.html.haml
project_was_not_exported_email.text.haml
reassigned_issue_email.html.haml
reassigned_issue_email.text.erb
reassigned_merge_request_email.html.haml
reassigned_merge_request_email.text.erb
relabeled_issue_email.html.haml
relabeled_issue_email.text.erb
relabeled_merge_request_email.html.haml
relabeled_merge_request_email.text.erb
repository_push_email.html.haml Add diff hunks to notification emails on MR 2016-11-25 15:23:49 +00:00
repository_push_email.text.haml
resolved_all_discussions_email.html.haml
resolved_all_discussions_email.text.erb