Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beta revision number not available for title #204

Open
benplumley opened this issue May 5, 2016 · 11 comments
Open

Beta revision number not available for title #204

benplumley opened this issue May 5, 2016 · 11 comments
Labels

Comments

@benplumley
Copy link

On the beta channel, the version number (as shown in About Firefox) is eg 47.0b2. However, none of NTT's variables for window name show the "b2" part. They only show "47.0".

@whimboo
Copy link
Contributor

whimboo commented May 6, 2016

Interesting. We are getting the version via this.appInfo.version. And that clearly has not the beta version suffix. An additional check for the about window source shows me the following:

http://mxr.mozilla.org/mozilla-central/source/browser/base/content/aboutDialog.xul#48

__MOZ_APP_VERSION_DISPLAY__ seems to be a placeholder which gets replaced during the build process of Firefox.

Because of that and no other instance of the beta revision in the application package, I'm not sure how to find out the beta index.

@benplumley
Copy link
Author

benplumley commented May 7, 2016

The General Data section of about:telemetry shows the variable application.displayVersion with value 47.0b3. I don't know if that's something that can be queried.

@xabolcs
Copy link
Collaborator

xabolcs commented May 9, 2016

Hi!

Telemetry's application.displayVersion traces into TelemetryController.jsm's Impl._getApplicationSection()#384:

379     return {
380       architecture: arch,
381       buildId: Services.appinfo.appBuildID,
382       name: Services.appinfo.name,
383       version: Services.appinfo.version,
384       displayVersion: AppConstants.MOZ_APP_VERSION_DISPLAY,
385       vendor: Services.appinfo.vendor,
386       platformVersion: Services.appinfo.platformVersion,
387       xpcomAbi: Services.appinfo.XPCOMABI,
388       channel: updateChannel,
389     };

... where Appconstants can be imported with a Cu.import:

Cu.import("resource://gre/modules/AppConstants.jsm");

AppConstants.jsm was brought to you by Bug 1124503 with milestone mozilla39.

It's OK to me to implement with AppConstants.jsm and fail silently if that isn't available.
Or put a "displayVersion is not available in this version" warning in the variable value.

@xabolcs
Copy link
Collaborator

xabolcs commented May 9, 2016

@benplumley, thanks for the Telemetry hint! 👍

@whimboo
Copy link
Contributor

whimboo commented May 17, 2016

Great to see that AppConstants.jsm module. It would indeed be great to get it added.

@xabolcs xabolcs added this to the 3.9 milestone Aug 18, 2016
UtiluMark added a commit to UtiluMark/nightlytt that referenced this issue Aug 26, 2016
* Increased the size of the Customize Title bar window
* Optimized the order of the Customize Title bar Variables
* Added Customize Title bar Variable Application Title and Version
* Added Customize Title bar Variable Application Display Version
* Added Customize Title bar Variable Application Version Pretty
* Added Customize Title bar Variable Application Update Channel
* Added Customize Title bar Variable Application Update Channel Pretty
(Release, ESR, beta, Aurora, Nighty, Default)
* Added Customize Title bar Variable Application Beta Revision (only
filled when applicable), fixing mozilla#204
* Added Customize Title bar Variable Application Version and Channel
* Removed Gecko Build Identifier, since it used PlatformBuildID, just
like XUL Platform Build Identifier
* Removed Gecko Version, since it used PlatformVersion, just like XUL
Platform Version
@whimboo
Copy link
Contributor

whimboo commented Aug 29, 2016

@xabolcs, this looks like an easy thing to get added now that we have experience with AppConstants.jsm. Do you think we could fold this into the 3.9 release?

@xabolcs
Copy link
Collaborator

xabolcs commented Aug 29, 2016

Sure we could, but please see the conversation in PR #212, starting with my comment!

UtiluMark added a commit to UtiluMark/nightlytt that referenced this issue Aug 31, 2016
* Increased the size of the Customize Title bar window
* Optimized the order of the Customize Title bar Variables
* Added Customize Title bar Variable Application Title and Version
* Added Customize Title bar Variable Application Display Version
* Added Customize Title bar Variable Application Version Pretty
* Added Customize Title bar Variable Application Update Channel
* Added Customize Title bar Variable Application Update Channel Pretty
(Release, ESR, beta, Aurora, Nighty, Default)
* Added Customize Title bar Variable Application Beta Revision (only
filled when applicable), fixing mozilla#204
* Added Customize Title bar Variable Application Version and Channel
* Removed Gecko Build Identifier, since it used PlatformBuildID, just
like XUL Platform Build Identifier
* Removed Gecko Version, since it used PlatformVersion, just like XUL
Platform Version
UtiluMark added a commit to UtiluMark/nightlytt that referenced this issue Aug 31, 2016
* Increased the size of the Customize Title bar window
* Optimized the order of the Customize Title bar Variables
* Added Customize Title bar Variable Application Title and Version
* Added Customize Title bar Variable Application Display Version
* Added Customize Title bar Variable Application Version Pretty
* Added Customize Title bar Variable Application Update Channel
* Added Customize Title bar Variable Application Update Channel Pretty
(Release, ESR, beta, Aurora, Nighty, Default)
* Added Customize Title bar Variable Application Beta Revision (only
filled when applicable), fixing mozilla#204
* Added Customize Title bar Variable Application Version and Channel
* Removed Gecko Build Identifier, since it used PlatformBuildID, just
like XUL Platform Build Identifier
* Removed Gecko Version, since it used PlatformVersion, just like XUL
Platform Version
@whimboo whimboo modified the milestones: 3.10, 3.9 Oct 7, 2016
@whimboo whimboo modified the milestone: 3.10 May 15, 2017
@UtiluMark
Copy link
Contributor

I'm currently implementing the added customize title bar options into the WebExtension.

In the XUL-based extension the beta version was retreived using:

Components.utils.import("resource://gre/modules/AppConstants.jsm");
AppConstants.MOZ_APP_VERSION_DISPLAY;

In Firefox 57
resource://gre/modules/AppConstants.jsm
still contains the beta version number, just like in earlier versions:
MOZ_APP_VERSION_DISPLAY: "57.0b7",
but retreiving this using the code from the XUL-based extension doesn't work in the WebExtension.

@kyoshino Do you know a way to retreive the beta version in the WebExtension?

@xabolcs
Copy link
Collaborator

xabolcs commented Oct 11, 2017

@UtiluMark, try with WebExtensions Experiments!

@ria-19
Copy link

ria-19 commented Oct 27, 2021

Is this bug still open?

@whimboo
Copy link
Contributor

whimboo commented Nov 3, 2021

Yes it is. And checking again it should basically be fixed at the WebExtension API level. There is https://bugzilla.mozilla.org/show_bug.cgi?id=1389751 open for exactly that problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants