Closed Bug 1454805 Opened 6 years ago Closed 6 years ago

Don't hard-code release note link in XUL files, use preference instead

Categories

(Thunderbird :: Mail Window Front End, enhancement)

enhancement
Not set
normal

Tracking

(thunderbird60 fixed, thunderbird61 fixed)

RESOLVED FIXED
Thunderbird 61.0
Tracking Status
thunderbird60 --- fixed
thunderbird61 --- fixed

People

(Reporter: sancus, Assigned: Paenglab)

Details

Attachments

(1 file)

In the Help->About Mozilla Thunderbird dialog there is a link to "Release Notes" that uses a direct url to mozilla.org.

https://dxr.mozilla.org/comm-central/search?q=releaseNotes.link&redirect=false

This should instead link to https://live.thunderbird.net/thunderbird/releasenotes?locale=en-US&version=__MOZ_APP_VERSION__

Also, if possible, we should add OS, and CHANNEL values for future use but I'm not sure what the variable names are for those, or if possible in this context.
Even better would be if it just used the app.releaseNotesURL pref honestly, so that we don't have a link to the same resource in two completely different places. I don't know if that's possible here.
I guess you can use these:
https://searchfox.org/mozilla-central/rev/f65d7528e34ef1a7665b4a1a7b7cdb1388fcd3aa/toolkit/modules/AppConstants.jsm#291

  MOZ_APP_NAME: "@MOZ_APP_NAME@",
  MOZ_APP_VERSION: "@MOZ_APP_VERSION@",
  MOZ_APP_VERSION_DISPLAY: "@MOZ_APP_VERSION_DISPLAY@",
  MOZ_BUILD_APP: "@MOZ_BUILD_APP@",
  MOZ_MACBUNDLE_NAME: "@MOZ_MACBUNDLE_NAME@",
  MOZ_UPDATE_CHANNEL: "@MOZ_UPDATE_CHANNEL@",
  INSTALL_LOCALE: "@AB_CD@",
  MOZ_WIDGET_TOOLKIT: "@MOZ_WIDGET_TOOLKIT@",
  ANDROID_PACKAGE_NAME: "@ANDROID_PACKAGE_NAME@",

You're after MOZ_UPDATE_CHANNEL and MOZ_WIDGET_TOOLKIT, no?

I don't think you have access to preferences in those XUL files.
Use the app.releaseNotesURL for the about dialog and the update tab in Prefs > Advanced. In Daily it isn't shown as we have no release notes.

Maybe we could update the links from mozillamessaging.com to thunderbird.net?
Assignee: nobody → richard.marti
Status: NEW → ASSIGNED
Attachment #8968772 - Flags: review?(jorgk)
Attachment #8968772 - Flags: approval-comm-beta?
There are a lot of prefs that point at mozillamessaging and other old URLs, I've been meaning to start working on a patch to fix them all, and now that the thunderbird.net rewrite stuff is over with, I'll start on that tomorrow. No need to change it in this bug.

Thank you for the quick patch on this!
Comment on attachment 8968772 [details] [diff] [review]
releaseNotes.patch

(In reply to Jorg K (GMT+1) from comment #2)
> I don't think you have access to preferences in those XUL files.
That still holds, but of course you can do stuff in JS, like Richard did, which is borrowed from FF:
https://searchfox.org/mozilla-central/rev/f65d7528e34ef1a7665b4a1a7b7cdb1388fcd3aa/browser/base/content/aboutDialog.js#61

I haven't tried it (hard to do in a Daily), but I'm sure Richard has and it looks like a straight port.

Just as a matter of interest, FF don't have the !AppConstants.NIGHTLY_BUILD check, so do they provide release notes for Nightly?

So there will be a follow-up to change the pref value. Fine.
Attachment #8968772 - Flags: review?(jorgk)
Attachment #8968772 - Flags: review+
Attachment #8968772 - Flags: approval-comm-beta?
Attachment #8968772 - Flags: approval-comm-beta+
As a good reviewer, I've tried it now by hacking the check. Since Daily doesn't have release notes, I'm being taken to the Welcome page, so that seems to be intentional.

Note: Commit message will change to:
  Change About dialog and advanced options to use app.releaseNotesURL pref
FX doesn't set app.releaseNotesURL for Nightly. For this is the |if (relNotesPrefType != Services.prefs.PREF_INVALID) {}| check. I thought, it's good to let it in when something fails. And instead of showing the link on Daily because the pref is set, I decided to use the AppConstant to hide it.
Keywords: checkin-needed
>  FF don't have the !AppConstants.NIGHTLY_BUILD check, so do they provide release notes for Nightly?

Yes, they have nightly release notes
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/f66f70c123ec
Change About dialog and advanced options to use app.releaseNotesURL pref. r=jorgk
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 61.0
Summary: releaseNotes.link needs to be changed → Don't hard-code release note link in XUL files, use preference instead
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: