rework ReplyIgnoreQuote to be a boolean parameter quote, passed to MailServices.compose.OpenComposeWindow
Categories
(MailNews Core :: Composition, task)
Tracking
(thunderbird78 wontfix)
Tracking | Status | |
---|---|---|
thunderbird78 | --- | wontfix |
People
(Reporter: mkmelin, Assigned: rnons)
Details
Attachments
(1 file, 5 obsolete files)
9.14 KB,
patch
|
mkmelin
:
review+
|
Details | Diff | Splinter Review |
We should never be messing with the compose type. Quoting or not should be a boolean parameter instead.
Reporter | ||
Comment 1•4 years ago
|
||
Not doing so would lead to further hacks e.g. for bug 1615996.
Reporter | ||
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
- Removed
ReplyIgnoreQuote
fromnsIMsgCompType
- Added
ignoreQuote
param toOpenComposeWindow
I will push to Try to see if it breaks anything.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 3•4 years ago
|
||
There is a failure, but seems to be known issue.
Reporter | ||
Comment 4•4 years ago
|
||
Comment on attachment 9153298 [details] [diff] [review] 1639452.patch Review of attachment 9153298 [details] [diff] [review]: ----------------------------------------------------------------- ::: mailnews/compose/public/nsIMsgComposeService.idl @@ +27,5 @@ > in MSG_ComposeFormat format, > in nsIMsgIdentity identity, > in AUTF8String from, > + in nsIMsgWindow aMsgWindow, > + in boolean ignoreQuote); I think it would be preferable to have this parameter be optional, and name it better. Like ``` [optional] in boolean suppressReplyQuote ``` In general it's preferable to have optional parameters default to false. When it's optional you only need to pass it in for the few cases we want to set that parameter. Please also add a documentation comment in the .idl file
Assignee | ||
Comment 5•4 years ago
|
||
- Renamed ignoreQuote to suppressReplyQuote
- Added some documentation to nsIMsgComposeService.idl
I thought about using optional parameter at first, but seems in most cases (compose types), we want to suppress reply quote. So even it's optional, we still often need to pass true
. Unless we want to reverse this param to includeReplyQuote
.
Assignee | ||
Comment 6•4 years ago
|
||
Lint.
Reporter | ||
Comment 7•4 years ago
|
||
(In reply to Ping Chen (:rnons) from comment #5)
I thought about using optional parameter at first, but seems in most cases (compose types), we want to suppress reply quote.
Well, in most cases it's just not relevant. It only does something for the reply types and is ignored for all others. https://searchfox.org/comm-central/rev/771b2328aa3096e6c907f477d7ebd862c8bf0841/mailnews/compose/src/nsMsgComposeService.cpp#410-416
That's why it would be nice to be optional - not having to specify it when it's irrelevant. From a quick look at the patch, 7 or so of the cases are such that it's irrelevant.
Assignee | ||
Comment 8•4 years ago
|
||
Thanks, I see what you mean now. Fixed.
Reporter | ||
Comment 9•4 years ago
•
|
||
Comment on attachment 9154096 [details] [diff] [review] 1639452.patch Review of attachment 9154096 [details] [diff] [review]: ----------------------------------------------------------------- ::: mailnews/extensions/newsblog/content/newsblogOverlay.js @@ +323,5 @@ > aFormat, > aIdentity, > aMsgWindow > ) { > + let suppressReplyQuote = true; Not completely sure now, but shouldn't you pass this in around here: https://searchfox.org/comm-central/rev/b3dc7ad59deb6d0e37499ed167d93c467fb1ccb0/mail/base/content/mailCommands.js#244 (I guess this case was forgotten before) and actually use it? Or at least it was always false before, and then you'd just use this parameter for rss.
Assignee | ||
Comment 10•4 years ago
|
||
I should read the code more carefully. Changed to pass suppressReplyQuote
to openComposeWindowForRSSArticle
now.
Reporter | ||
Comment 11•4 years ago
|
||
Comment on attachment 9154534 [details] [diff] [review] 1639452.patch Review of attachment 9154534 [details] [diff] [review]: ----------------------------------------------------------------- ::: mail/base/content/mailCommands.js @@ +241,5 @@ > type, > format, > identity, > + msgWindow, > + suppressReplyQuote Sorry, hadn't thought this through earlier. We don't allow replying to feeds, so this parameter should always be irrelevant for feeds and we don't want to pass it in there. (Or, I notice replies are erroneously enabled in the context menu, but even then the parameter will be irrelevant since actual quoting the same ways as mails don't happen.)
Assignee | ||
Comment 12•4 years ago
|
||
Hope I get it right this time. Yes, the "Reply" items in the context menu of feeds confused me.
Reporter | ||
Comment 13•4 years ago
|
||
Comment on attachment 9154833 [details] [diff] [review] 1639452.patch Review of attachment 9154833 [details] [diff] [review]: ----------------------------------------------------------------- Looks good, thx! r=mkmelin
Reporter | ||
Updated•4 years ago
|
Comment 14•4 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/ece38adeaaee
Change ReplyIgnoreQuote to be a boolean parameter. r=mkmelin
Reporter | ||
Updated•4 years ago
|
Reporter | ||
Updated•4 years ago
|
Description
•