What purpose do these characters serve in the mail templates? They make the emails appear messy, more difficult to read and difficult to copy+paste, not to mention the accessibility issues.

*grumble*

CommentFileSizeAuthor
#3 mail-plumber.patch3.96 KBRowanw

Comments

Rowanw’s picture

Version: 5.x-1.1 » 5.x-2.x-dev
chx’s picture

Category: bug » feature
Rowanw’s picture

Title: || Remove pipe characters from mail templates || » Remove pipe characters from mail templates
Status: Active » Needs review
StatusFileSize
new3.96 KB

Here's a patch with the pipes removed.

beginner’s picture

Status: Needs review » Needs work

-1 on removing the pipes.

The functional reason for the |'s is that it differentiate between the automated information parts (all the lines starting with the |) from the node content (or preview) that was added on the site.

The patch removes the pipes, but it does not replace the function they used to fulfill with anything else.

Besides, you don't need this patch: if you really wanted to remove the pipes, you can still do it in the template using mail_edit.

As it happens, a client wanted to do the exact same thing. He tried removing all the pipes from the template. The result was even worse as far as useability was concerned: all the content (user generated or machine generated) was visually all mixed together. At the end, he put all the pipes back in (but found other ways to improve the default template).

I vote for won't fix.

Rowanw’s picture

Title: Remove pipe characters from mail templates » Clean up appearance of mail templates

I see what you're saying, but why not just label the preview content appropriately? The subscription emails I get from other websites (e.g. forums, groups.drupal.org) don't add miscellaneous characters at the start of each line and between sentences.

Example of an alternative:

Greetings, name

Your subscription on !site notifies you of a new post.

Category: !term_name
Author: !sender_name
Contact: !sender_contact_page
Title: !title

Preview:
  Lorem ipsum dolor sit amet, consectetuer adipiscing elit,
sed diam nonummy nibh euismod tincidunt ut laoreet dolore
magna aliquam erat volutpat. Ut wisi enim ad minim veniam,
quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut
aliquip ex ea commodo consequat.

Link: http://example.com
Direct unsubscribe link: http://example.com

This is an automated message. Please do NOT reply to the sender address!
To manage your subscriptions go to http://example.com/user

It adds the 'preview' label and two spaces at the start of the teaser text to make it more defined, like indented paragraphs in novels/stories.

"As it happens, a client wanted to do the exact same thing."

So someone else agrees it needs to be changed.

"At the end, he put all the pipes back in (but found other ways to improve the default template)."

What were the other improvements he made?

How can we improve the template without adding visual clutter?

salvis’s picture

Status: Needs work » Closed (won't fix)

Beginner explained it well, thanks!

Many of the sites that I run are used by people who have little experience with electronic communication, and they have a hard time distinguishing boilerplate text and actual text. The pipes definitely do help them.

I'm sure the templates can be tweaked in many ways for different audiences, but the defaults that I provide are intended to
a) provide reasonable out-of-the-box functionality to the widest possible audience,
b) demonstrate some variables and the conditional syntax, and
c) serve as a useful starting point for your own template designs.

The pipe characters not only help with a) but also with b) and c).

I don't think that we'll be able to find a consensus about the ideal default template set that would suit everyone, but feel free to suggest improvements — I will consider them.

Thanks for the patch, but removing the pipes is "won't fix."