Closed Bug 1175379 Opened 6 years ago Closed 10 months ago

Ship about:config as an add-on instead of in the product

Categories

(Firefox for Android Graveyard :: General, defect)

35 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: Margaret, Unassigned)

References

Details

Attachments

(1 file)

I see a lot of image resources in our tree for about:config, and it's not a feature that the majority of our users use. It's really easy to build this as an add-on, so I think we should remove it from the tree and ship it as an add-on.

nalexander, would it be possible to configure our nightly builds to include this add-on by default? I feel like nightly users would be the people most likely to miss having this feature built-in.

I already started working on this here:
https://github.com/leibovic/about-config
Flags: needinfo?(nalexander)
Assignee: nobody → margaret.leibovic
(In reply to :Margaret Leibovic from comment #0)
> I see a lot of image resources in our tree for about:config, and it's not a
> feature that the majority of our users use. It's really easy to build this
> as an add-on, so I think we should remove it from the tree and ship it as an
> add-on.
> 
> nalexander, would it be possible to configure our nightly builds to include
> this add-on by default? I feel like nightly users would be the people most
> likely to miss having this feature built-in.

I'm rather unclear on the nuts and bolts of doing this, tbh.  I am not aware of prior art on mobile.  Bug 1071311 suggested one approach.

I did a little poking around in XPIProvider.jsm and observe that we can ship addons in /data/data/org.mozilla.firefox/extensions/ADDON.xpi right now.  It's irritating to get files into the APK root like this, but it is possible.  (I blogged a little about this.)  In future we could find a way to recognize addons from /assets/extensions, too, which would be much better for building with Gradle.

So in theory it would be easy to ship about:config as an XPI in extensions/.  That's a bit of the how.  That just leaves all the soft questions, like:
* is this addon enabled by default?
* does it make sense to allow it to be disabled?  
* does it get upgraded automatically?
* does it appear in about:addons?

I expect desktop to tackle exactly the same set of questions as they push to ship browser features and functionality as addons.  In fact, with experiments and some of the EME downloading stuff, the trail may be blazed.
Flags: needinfo?(nalexander)
Bug 1175379 - Remove about:config from the tree
Attachment #8626330 - Flags: review?(mark.finkle)
Comment on attachment 8626330 [details]
MozReview Request: Bug 1175379 - Remove about:config from the tree

https://reviewboard.mozilla.org/r/12061/#review10483

Ship It!

::: mobile/android/chrome/content/config.xhtml:19
(Diff revision 1)
> -<body dir="&locale.dir;" onload="NewPrefDialog.init(); AboutConfig.init();"
> +<body>

I'm sure Anthony will have ideas for making this look better, adding an "Install" button and some extra copy.
Attachment #8626330 - Flags: review?(mark.finkle) → review+
Note, this removes about 13kb from the APK size:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=c5d8b0a6cce0
https://treeherder.mozilla.org/#/jobs?repo=try&revision=ecbeacca95f0

I'm holding off on landing this because I'm still trying to figure out the best place for this about:config code to live. On the one hand, keeping it in a separate github repo is nice for contributions and it's a solution that already exists. On the other hand, finding a place for this in mozilla-central could probably help with localization, and it would ensure this is an "officially supported" add-on. I'm just not sure where in the tree would be a good place for this.
Can I ask why it is that about:config, which is a big list of text string extracted from Firefox's innards, has a lot of image resources associated with it?

about:config is a handy way for semi-advanced users to tweak their configs, and it would be a great shame if it were not universally available. (An advanced user may go up to someone else's Firefox with an "oh, I can fix that for you" and find that they can't.) I wonder if we might get the same kind of feedback to this move as when Asa mooted removing "View Source" some years ago...

Gerv
(In reply to Gervase Markham [:gerv] from comment #7)

> about:config is a handy way for semi-advanced users to tweak their configs,
> and it would be a great shame if it were not universally available. (An
> advanced user may go up to someone else's Firefox with an "oh, I can fix
> that for you" and find that they can't.) I wonder if we might get the same
> kind of feedback to this move as when Asa mooted removing "View Source" some
> years ago...

We would still make about:config available, but it would be a separate, restartless add-on that you could activate from the about:config placeholder page. We on the Mobile team, have started looking for ways to carve off independent pieces of functionality, as part of the micro-kernel approach to shipping. For more about this initiative see https://wiki.mozilla.org/Firefox/Go_Faster

We are also looking to move out move parts of the code. We are using about:config as a testbed for the concept.
(In reply to Gervase Markham [:gerv] from comment #7)
> Can I ask why it is that about:config, which is a big list of text string
> extracted from Firefox's innards, has a lot of image resources associated
> with it?
> 
> about:config is a handy way for semi-advanced users to tweak their configs,
> and it would be a great shame if it were not universally available. (An
> advanced user may go up to someone else's Firefox with an "oh, I can fix
> that for you" and find that they can't.) I wonder if we might get the same
> kind of feedback to this move as when Asa mooted removing "View Source" some
> years ago...
> 
> Gerv

AFAIK, the image resources associated with it are actually pretty miniscule. 2-3k at most (all of them are less than 1k and most are 100-300bytes). SVG versions would actually likely be larger and they're just not big enough to be worth ripping out. There's 6K of CSS and 20K of JS, which you would think would compress much better than 50%, so I am a little suspicious looking at those numbers. Makes me worried we're not properly compressing our JS or CSS in the APK/Omnijar? Or do we compress at all there?
The fact that you can install it from a placeholder page does seem better, I agree. But the original justification at the top of the bug was about size (presumably download/on-disk size). Does anyone have actual figures for how heavy about:config is?

Gerv
(In reply to Gervase Markham [:gerv] from comment #10)
> The fact that you can install it from a placeholder page does seem better, I
> agree. But the original justification at the top of the bug was about size
> (presumably download/on-disk size). Does anyone have actual figures for how
> heavy about:config is?

Wes replied with some numbers in comment 9, but even if the effect on the APK is tiny, we'll likely move ahead. We want to make this decoupling concept a reality.
The main reason I've held off on landing this is that I want to spend some more time figuring out exactly what this install flow should look like. One option is to create an add-on that automatically installs when you navigate to about:config, so the fact that this is an "add-on" would be an implementation detail.

Even though the space savings are small in this case, I see this as a simple testcase to use to start to experiment with a new way of developing features, to potentially save more space in the future.
Assignee: margaret.leibovic → nobody
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 10 months ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.