Continue support for Dev Theme in stable firefox

RESOLVED FIXED

Status

()

defect
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: zlatkot, Unassigned)

Tracking

39 Branch
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Reporter

Description

4 years ago
User Agent: Mozilla/5.0 (X11; Linux i686; rv:39.0) Gecko/20100101 Firefox/39.0
Build ID: 20150630154324




Expected results:

I think there should be continued support for the Developer Edition in the stable firefox releases.  I read this bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1180163 And am aware of the reason to remove it from about:config. But I think there should be another way for users that want it, to be able to use it (via preferences option, checkbox when customizing the layout etc.)
Component: Untriaged → Theme
Depends on: 1148996
See Also: → 1180163
Copying in my comment from https://bugzilla.mozilla.org/show_bug.cgi?id=1180163#c13:

If we included the Dev Edition theme as a built in lw theme for release, then it would have broken the use case of syncing two profiles between the two channels (Dev Edition and release).  If lightweightThemes.selectedThemeID was synced to firefox-devedition@mozilla.org on Release then it would unintentionally apply dev edition theme to people who didn't want it.  So in order to have a better technical solution (having the theme implemented as a lightweight theme), we had to give up this hidden feature for release channels.

Now with sticky_prefs available (bug 1098343), this may not be a problem anymore and it may be possible to properly introduce the theme into release channels.  But we would have to decide if showing it as an available theme in the dropdown / about:addons may confuse non-developer users.
Technically, including the DE theme in release builds would be an easy change.  All we would need to do would be to remove the #ifndef RELEASE_BUILD preprocessor def from the place where the call to LightweightThemeManager.addBuiltInTheme happens: https://dxr.mozilla.org/mozilla-central/source/browser/components/nsBrowserGlue.js#718.

I believe that now that the lightweightThemes.selectedThemeID pref is now sticky the syncing problems shouldn't be an issue anymore.  It's probably more a question of if we want the DE theme to be visible in release builds.  Stephen, any opinions about this?  Does it make sense to expose "Developer Edition" as a theme available to release users?  If so, should it still be called Developer Edition or should we rename it to something else?
Flags: needinfo?(shorlander)
Status: UNCONFIRMED → NEW
Ever confirmed: true
One more change that'd be required is to remove the preprocessor bit from preloading the stylesheet: https://github.com/mozilla/gecko-dev/blob/60fd82095eb3c22e7bb42716849d0d48a30ee4d7/browser/base/content/browser-devedition.js#L123

Comment 4

4 years ago
A possible suggestion would be to put the Dev Theme in the Theme Repo so it's not carried by default but can be installed like all others?
Reporter

Comment 5

4 years ago
(In reply to Stephen M [ste] from comment #4)
> A possible suggestion would be to put the Dev Theme in the Theme Repo so
> it's not carried by default but can be installed like all others?

Do you mean installing it via about:addons? By that I mean, just getting it from the add-on/theme marketplace? I suggested this in the original bug where we discussed it. I hope, seeing as it is not too difficult, to have the theme available. I for one, wasn't happy with Australis, and without this theme, it would take a lot of "hacking" with CSS to make something that resembles it.
I think we should WONTFIX this. The DevTheme is intended as a visually distinct theme for devtools, and that's where development focus is. If someone wants to spin it off into a separate heavyweight / lightweight theme on AMO, that's fine. (Or just use one of the existing darkish themes there)

Otherwise, this effectively becomes "add and support a dark and light theme to stock Firefox", and I don't think that's something we want to do given current priorities.
Also: given the recent (and ongoing) work around Windows 10 has exposed a number of resulting bugs when the devtools theme is enabled, this clearly isn't something we get for free.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
Reporter

Comment 8

4 years ago
>The DevTheme is intended as a visually distinct theme for devtools, and that's where development focus is

Well it just so happens that this theme is better than what is currently shipped with firefox as default. Why was this theme included in stable firefox releases in the first place? The reason I would want this to stay is because I am using it, and contrary to what seems to be the prevalent mode of thinking at Firefox, removing existing options only to have the user install 3rd party add-ons isn't to everyone's liking. 

I certainly don't want to imply that I am entitled to anything, and that I must have the theme at all costs. I merely made a suggestion that I think should be included, especially since one developer said (in this thread) that it shouldn't be too hard to implement in a different fashion. Like Stephen M pointed out adding it to the theme REPO as a viable option? 

It is a fact that a lot of people weren't happy with the Australis redesign, and this theme made things better, without making people go and install add-ons to revert things to the way they were.
Duplicate of this bug: 1193544
More requests for this here: https://www.reddit.com/r/firefox/comments/3gm945/is_it_possible_to_activate_devedition_theme_in/.

I wonder if we can continue to support this somehow by publishing a lightweight theme on AMO with a custom ID (something like firefox-devedition-amo@mozilla.org) then we could look for that ID along with "firefox-devedition@mozilla.org" when applying the theme here: https://dxr.mozilla.org/mozilla-central/source/browser/base/content/browser-devedition.js.

By being a separate theme to install maybe any breakage would be more tolerated, because we aren't currently uplifting fixes to beta if Australis changes there (since it can't currently be used there).  Hopefully theme fixes don't get uplifted to beta too frequently though (besides Win10 work which had to be done obviously).
It looks like users can work around this as follows:

1. Enable Browser Chrome debugging in the DevTools prefs or by setting `devtools.chrome.enabled` in about:config.
2. Open up the Browser Console (Menu -> Developer -> Browser Console)
3. Paste the following code and hit return:

        LightweightThemeManager.addBuiltInTheme({
          id: "firefox-devedition@mozilla.org",
          name: "Developer Edition",
          headerURL: "resource:///chrome/browser/content/browser/defaultthemes/devedition.header.png",
          iconURL: "resource:///chrome/browser/content/browser/defaultthemes/devedition.icon.png",
          author: "Mozilla"
        });

4. Open up the theme picker and choose "Developer Edition"
5. To uninstall the Developer Edition theme, run `LightweightThemeManager.clearBuiltInThemes()` in the Browser Console.
Huh, calling addBuiltInTheme works for the session, but doesn't persist across browser restarts. Any ideas?
(In reply to Dan Callahan [:callahad] from comment #12)
> Huh, calling addBuiltInTheme works for the session, but doesn't persist
> across browser restarts. Any ideas?

A lightweight extension could add the built-in lightweight theme each restart.
(In reply to David [:auscompgeek] from comment #13)
> (In reply to Dan Callahan [:callahad] from comment #12)
> > Huh, calling addBuiltInTheme works for the session, but doesn't persist
> > across browser restarts. Any ideas?
> 
> A lightweight extension could add the built-in lightweight theme each
> restart.

Yeah, that would work.  Would just want to try/catch the call to addBuiltInTheme so that it doesn't throw an exception in Nightly / DevEd when the theme is already registered
Discussed this in #devtools.  The current plan is that ntim is going to write a simple addon as outlined in Comment 11-14.  Once this is hosted on AMO we will have a way for people to continue using the theme, by installing this addon.

Comment 16

4 years ago
(In reply to Brian Grinstead [:bgrins] from comment #15)
> Discussed this in #devtools.  The current plan is that ntim is going to
> write a simple addon as outlined in Comment 11-14.  Once this is hosted on
> AMO we will have a way for people to continue using the theme, by installing
> this addon.

Here it is : https://addons.mozilla.org/en-US/firefox/addon/devedition-theme-enabler/
Thanks :ntim!
Resolution: WONTFIX → FIXED
See Also: → 1195346

Updated

4 years ago
Flags: needinfo?(shorlander)

Updated

4 years ago
Duplicate of this bug: 1194688
You need to log in before you can comment on or make changes to this bug.