Closed Bug 1762114 Opened 2 years ago Closed 2 years ago

Open news: url in new tab

Categories

(Thunderbird :: Mail Window Front End, task)

Tracking

(thunderbird_esr91 wontfix, thunderbird100 fixed)

RESOLVED FIXED
101 Branch
Tracking Status
thunderbird_esr91 --- wontfix
thunderbird100 --- fixed

People

(Reporter: rnons, Assigned: rnons)

References

Details

Attachments

(2 files)

  1. create a draft that contains news://news.mozilla.org/dtGdnTGtyeu7Z6z_nZ2dnUU7-VfNnZ2d@mozilla.org, save the draft and close the compose window
  2. click the news: url in the message pane

After a while, the message body is replaced by the fetched message, but the header is still the draft. Should open the news: url in a new tab, similar to clicking a mid: url, see bug 1762094 about using JSWindowActor to get clicked url.

Assignee: nobody → remotenonsense
Status: NEW → ASSIGNED

It is great that you decided to fix such confusing behavior. A couple of notes that may be discussed further in dedicated issues.

  1. Out of sync selected message in the message list, the headers pane, and the message pane is a long-standing bug. Due to some network delays body of earlier tried message may appear even after switching to another account or folder. In my opinion, it should be solved in a more generic way, e.g. currently displayed message is visually marked as stale one (but maybe displayed till the next message is fetched). When new headers are displayed, message body is cleared (or replaced with a clear text suggesting to wait) all further actions are performed through a proxy object that is "destroyed" when the user switches to another message.

  2. In many cases I do not like opening a message in a separate window. It applies to both command line arguments and in-message links (the latter is a rare use case for me). For in-message links I would consider behavior similar to Firefox: left click replaces current view, middle click opens the message in a new tab or a new window. It may be configurable and switched off by default. Separate tab for a message opened from external application (command line) is an extra step to invoke "show message in context" menu entry to view sibling messages in a mail list discussion. It may require additional command options --new-tab --new-window, --new-3pane-window. Unsure if extending mid: links is a good idea, ?target=... parameter may be added with tab, window, list. The problem is that I would prefer to ignore such parameter if the link is received from non-trusted source, so command line options selecting particular view may be better.

So by the fix you will mask an easily reproducible scenario for a bug having wider scope. My personal opinion, what are you going to do is not optimal user experience. However your change still will be an improvement, current behavior is really terrible.

Use aboutMessage.js to load external (news://) url.

The old way creates a channel first, and delegates to MessageDisplayContentHandler. This patch takes a shortcut to pass news url directly to messageWindow.xhtml.

Target Milestone: --- → 101 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/58309fd9796f
Open news url in new tab. r=mkmelin
https://hg.mozilla.org/comm-central/rev/b3b022043169
Fix opening news url from command line. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED

Comment on attachment 9270529 [details]
Bug 1762114 - Fix opening news url from command line. r=mkmelin

For both the patches.
[Approval Request Comment]
Regression caused by (bug #): The second patch is regressed by bug 1707550.
User impact if declined: 1. news url is loaded directly in messagepane 2. can't open news url from command line
Testing completed (on c-c, etc.): c-c
Risk to taking this patch (and alternatives if risky): low

Attachment #9270529 - Flags: approval-comm-beta?

Comment on attachment 9270529 [details]
Bug 1762114 - Fix opening news url from command line. r=mkmelin

[Triage Comment]
Approved for beta

Attachment #9270529 - Flags: approval-comm-beta? → approval-comm-beta+

I've just come across this. mailMessageTab is the new message tab and should not be used yet unless mail.useNewMailTabs is true.

Flags: needinfo?(remotenonsense)

I know it's the new one. I didn't want to implement it twice and I only needed to change aboutMessage.js a little to support this. If you see any problems, feel free to revert my changes.

Flags: needinfo?(remotenonsense)

Sorry, but I don't like it. As good as it is, the new mail tab is not ready to be used on the release channel yet, even in this relatively obscure case. And we should not have a mix of new tabs and old tabs, that makes an already messy situation worse.

You should open the message in messageWindow.xhtml for now.

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

Attachment

General

Created:
Updated:
Size: