Open Bug 882181 Opened 11 years ago Updated 1 year ago

Thunderbird should differentiate between indenting and quoting

Categories

(Thunderbird :: Message Compose Window, defect)

Thunderbird 102
defect

Tracking

(Not tracked)

People

(Reporter: mbovett, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/536.30.1 (KHTML, like Gecko) Version/6.0.5 Safari/536.30.1

Steps to reproduce:

Apple's Mail lets you indent text and images, which pads the content on the left side by about 40 pixels. It also lets you "quote" text and images, which looks different. The content is slightly indented, and a vertical line appears on the left side, indicating it is quoted text.

In Thunderbird, it seems the only thing you can do is indent text.

It would be nice to be able to manually "quote" a line of text, which is sometimes useful.
Quoting is implemented as a blockquote element in the encoding which has a type="cite" attribute set to distinguish it from regular blockquotes. The latter can be generated with the "Indent text (move right)" button next to the list buttons in the formatting toolbar when composing a message. This will create a simple blockquote for the highlighted text when outside of a list environment.

To create a quoted section, highlight the text in question, then select Edit > Copy from the menu. While leaving it highlighted, use Edit > Paste as Quotation to put it into a "cite" context.

It's not the most intuitive way how to do it but should work. Note that the recipient's e-mail program may or may not understand the type="cite" extension, thus may just render it as a conventional indentation of the text.
Severity: normal → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Severity: S3 → S2
OS: macOS → All
Hardware: x86 → All
Version: unspecified → Thunderbird 102

(In reply to rsx11m from comment #1)

Quoting is implemented as a blockquote element in the encoding which has a
type="cite" attribute set to distinguish it from regular blockquotes.

My testing indicates that other MUAs like Outlook and GMail do not implement
CSS [attr=value] selectors, so the above is moot. Recipients don't see any
difference between the two types of blockquotes sent by Thunderbird. I assert
that they need to. Indenting and quoting are semantically very different. Quoting
may be indicated by styling that includes indenting, but that's something that
should neither be relied upon nor be abused to accomplish indenting for text
that is not a quote.

The latter can be generated with the "Indent text (move right)" button next to
the list buttons in the formatting toolbar when composing a message. This
will create a simple blockquote for the highlighted text when outside of a
list environment.

Here's what https://www.w3schools.com/tags/tag_blockquote.asp says about <blockquote>

The <blockquote> tag specifies a section that is quoted from another source.

We already have a mechanism for that: "paste as quote". [I'd prefer a quote
button, but that's a different issue.]

What we need is a mechanism to indent text that is not being quoted from
another source. When I need to indent something in Thunderbird, I have to
use ThunderbirdHTMLedit to do a <div style="padding-left: 2em"> or similar.

To create a quoted section, highlight the text in question, then select Edit

Copy from the menu. While leaving it highlighted, use Edit > Paste as
Quotation to put it into a "cite" context.

Yes, we know how to create a quoted section. What we lack is a way to
create an indented section. One might assume that the "indent" button
would do that, but instead it creates a quoted section.

It's not the most intuitive way how to do it but should work. Note that the
recipient's e-mail program may or may not understand the type="cite"
extension,

Thunderbird does honor attr=value CSS selectors, but I think it's important
for Thunderbird to be able to send understandable e-mails to MUAs other
than Thunderbird (e.g. Outlook and GMail) which do not.

thus may just render it as a conventional indentation of the text.

No, it's rendered as a conventional blockquote. As are Thunderbird's
"indented" blocks.

I am pretty sure the code that causes this is in libeditor -- I asked :masayuki about this and he suggested that we could enable the CSS style mode pathway for this command only. But that that pathway is not very well tested. Regardless, that seems much more realistic than trying to actually change the libeditor functions around this.

https://searchfox.org/mozilla-central/rev/4ebfb48f7e82251145afa4a822f970931dd06c68/editor/libeditor/HTMLEditSubActionHandler.cpp#4488
https://searchfox.org/mozilla-central/rev/4ebfb48f7e82251145afa4a822f970931dd06c68/editor/libeditor/HTMLEditSubActionHandler.cpp#5361

Our use of "type=cite" for actual quotes is also related to this and might be solvable in a similar way.

See Also: → 183219

enable the CSS style mode pathway for this command only

If that works, that would be fantastic.

Our use of "type=cite" for actual quotes

... is a different discussion, because that is actually semantically correct. It is what allows to semantically (and a machine readable way) distinguish 1. indention (->CSS), 2. quotes from external articles (<blockquote>), and 3. quotes from the replied-to email (<blockquote type="cite">). <blockquote type="cite"> is semantic, it carries meaning beyond a simple <blockquote>. In contrast, the bug here is that we're using <blockquote> for style, for things that are not quotes.

(In reply to Ben Bucksch (:BenB) from comment #5)

enable the CSS style mode pathway for this command only

If that works, that would be fantastic.

Seems like it should be worth a try. Not sure what the best way to turn on CSS mode for one specific function is, though.

Our use of "type=cite" for actual quotes

... is a different discussion

I'm going to keep further discussion of that out of this bug, as it's not directly relevant.

(In reply to Ben Bucksch (:BenB) from comment #5)

Our use of "type=cite" for actual quotes

... is a different discussion, because that is actually semantically correct. It is what allows to semantically (and a machine readable way) distinguish 1. indention (->CSS), 2. quotes from external articles (<blockquote>), and 3. quotes from the replied-to email (<blockquote type="cite">). <blockquote type="cite"> is semantic, it carries meaning beyond a simple <blockquote>.

Are there any MUAs that do anything with the blockquote tag's type="cite" attribute? None of the ones I've tested with pay any attention to it. Worrying about whether it's there or not seems rather moot.

In contrast, the bug here is that we're using <blockquote> for style, for things that are not quotes.

Exactly. It's semantically wrong and is being used for a rendering-style side-effect that (while common) may not actually happen.

--
Grant

Before we race off and go down the CSS route. What reading software actually supports CSS anywhere in the email.

The basis of this discussion is that we should be using a style command. Supported where, except in Thunderbird? Campaignmonitor lists many clients that have issues with style either in the <body> or in the <head>, yet here we are talking about "giving it a go". What is the upside of this proposal?

Seriously, I like most folk I would assume, I just want to send my email and have the recipient see it just as I laid it out. Without having to consider if the recipient uses gsuite or outlook or apple mail, or perhaps might be on a mobile app.

Perhaps consult with folk who make a living composing email for mass delivery before deciding that something should be changed because it is "better" but incompatible.
https://www.campaignmonitor.com/css/style-element/style-in-body/

(In reply to Matt from comment #8)

Before we race off and go down the CSS route. What reading software actually supports CSS anywhere in the email.

I've tested Gmail (Android App and Web UI), Outlook 2013 (Windows app), and Exchange OWA web UI. They all appear to support style attributes on elements in the body as well as multiple style elements in the header. Obviously, testing with more MUAs would be good.

AFAICT, outlook generates yards and yards of style info using all sorts of classes for even a one line e-mail. Some of the Outlook emails I've looked at must be over 95% style info. Nobody seems to have any problem with that.

The basis of this discussion is that we should be using a style command. Supported where, except in Thunderbird?

I'm not sure what a "style command" is. I had originally proposed a style attribute on a div element. That seems to be widely supported.

Campaignmonitor lists many clients that have issues with style either in the <body> or in the <head>, yet here we are talking about "giving it a go". What is the upside of this proposal?

I thought it had been explained before, but the upside is to be able to indent text (particularly in a way that's visually distinct from quoted text).

Currently, Thunderbird only implements block quotes -- which may or may not be rendered as an indented block. In any case, the reader can't tell the difference between quoted and indented text if they're both implemented with <blockquote>.

Seriously, I like most folk I would assume, I just want to send my email and have the recipient see it just as I laid it out. Without having to consider if the recipient uses gsuite or outlook or apple mail, or perhaps might be on a mobile app.

You can't assume that's the case now with Thunderbird using <blockquote> without any CSS to control how it's rendered.

Since TB doesn't output any CSS in its email messages, you really can't have any expectations that the recipient will see it just as you laid it out. I wrote the CustomCSS extension to try to address that. It allows you to include pre-defined CSS in the email message so that you've got a little better chance that the recipient will see something similar to what you see when you're editing the message.

Perhaps consult with folk who make a living composing email for mass delivery before deciding that something should be changed because it is "better" but incompatible.
https://www.campaignmonitor.com/css/style-element/style-in-body/

I didn't think we were talking about adding a <style> element inside the <body> element.

We were talking about using something like this:

<div style="margin-left=2em">
Indented text is here
</div>

instead of

<blockquote>
Indented? text is here
</blockquote>

IMO, you've got a better chance that the former (which I've tested in the MUAs I mentioned above) will be rendered similarly in multiple MUAs since you're specifying exactly how you want it rendered. There's no guarantee how <blockquote> is rendered. It might not be indented at all (though it almost always is by default).

Both outlook and Gmail use css for styling indents so it's fairly safe for us to do so. If an MUA can't handle mail from those two MUAs then it's useless anyways.

You need to log in before you can comment on or make changes to this bug.