Extend compose API to edit messages/templates as new message
Categories
(Thunderbird :: Add-Ons: Extensions API, enhancement)
Tracking
(thunderbird_esr78 fixed)
| Tracking | Status | |
|---|---|---|
| thunderbird_esr78 | --- | fixed |
People
(Reporter: tobias.bengfort, Assigned: darktrojan)
References
Details
Attachments
(2 files, 1 obsolete file)
|
2.33 KB,
patch
|
Details | Diff | Splinter Review | |
|
47 bytes,
text/x-phabricator-request
|
wsmwk
:
approval-comm-esr78+
|
Details | Review |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0
Steps to reproduce:
I am currently in the process of porting my conversations extension (https://github.com/xi/xi-conversations -- not the will known one) to TB78
Actual results:
The following nsIMsgCompType values are currently covered in the compose API:
- New
- Reply
- ReplyToList
- ReplyAll
- ForwardInline
- ForwardAsAttachment
The following values are yet not covered:
- EditAsNew
- Draft
- Template
- EditTemplate
I guess the last 3 cases are somewhat special but the first one is just as useful as reply/forward.
Expected results:
The included patch adds compose.beginEdit with the single choice "editAsNew" for type.
| Assignee | ||
Comment 2•5 years ago
|
||
Hi, thanks for this, at first glance it looks good, but I'll take a proper look as soon as I get some time.
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Comment 3•5 years ago
|
||
Did you have this working? For me it just opens an empty compose window. I think I know why, but I wanted to find out if it ever worked as intended.
| Reporter | ||
Comment 4•5 years ago
|
||
You guessed correctly: The version I actually use in my extension is quite different: https://github.com/xi/xi-conversations/blob/2ae800b66822d7335b1cdb1c378104d0d7aecdc9/experiment-api/api.js#L124
I tried to align this with the existing API but wasn't able to test it (at least not by simply patching omni.ja on a standard thunderbird installation).
I think I know why, but I wanted to find out if it ever worked as intended.
I would be happy to learn more about that and adapt the patch accordingly.
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Comment 5•5 years ago
|
||
| Assignee | ||
Comment 6•5 years ago
|
||
I'm going to take this in a different direction which I think fits better. The patch I just posted covers EditAsNew and Template by passing the message identifier as the first argument to beginNew, which matches beginReply and beginForward. (It's an optional argument, and the extensions framework is clever enough to know what to do if it's missing, so existing code doesn't break.)
| Assignee | ||
Comment 7•5 years ago
|
||
Thanks for contributing, Tobias. We might end up with something completely different from the patch you submitted, but don't let that discourage you. You inspired me to do something about a problem I've been ignoring until now.
| Reporter | ||
Comment 8•5 years ago
|
||
Thanks for working on this! Your proposed patch covers my usecase perfectly. I am glad I could help filling this gap.
| Assignee | ||
Updated•5 years ago
|
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/586b5aeb2563
Extend compose API to edit messages and templates as new messages. r=mkmelin
Comment 11•4 years ago
|
||
Comment on attachment 9182842 [details]
Bug 1670379 - Extend compose API to edit messages and templates as new messages. r?mkmelin
[Approval Request Comment]
User impact if declined:
In general: Add-on developers can not use the latest fixes and improvements of our WebExtension API.
Specifically this bug: Bug 1658132 (which is an API fix) needs this bug to be uplifted as well.
Testing completed (on c-c, etc.):
https://treeherder.mozilla.org/jobs?repo=try-comm-central&revision=3cdff293d5d1bd77777f5da371caaa02c4b05de3
Risk to taking this patch (and alternatives if risky):
I hope none
Remark:
The provided try run includes all bugs I want to uplift for TB 78.7 and shows a working patch order.
Bug 1680653 is the first one, who does not have a bug number in the commit message.
This is the 3rd one.
Comment 12•4 years ago
|
||
Comment on attachment 9182842 [details]
Bug 1670379 - Extend compose API to edit messages and templates as new messages. r?mkmelin
[Triage Comment]
Approved for esr78
Comment 13•4 years ago
|
||
| bugherder uplift | ||
Thunderbird 78.7.0:
https://hg.mozilla.org/releases/comm-esr78/rev/eaa241e89359
Description
•