Provide a management.install command for themes only

RESOLVED WONTFIX

Status

()

Toolkit
WebExtensions: Untriaged
P3
normal
RESOLVED WONTFIX
3 months ago
11 days ago

People

(Reporter: andym, Assigned: aswan)

Tracking

(Blocks: 1 bug)

unspecified
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [themes], [outreach][awe:personas@christopher.beard], triaged)

(Reporter)

Description

3 months ago
We'd like to be to be allow personas plus to exist and we've gotten the ability to enable and disable themes (only) in WebExtensions through the management commands added in bug 1336908.

Currently personas plus also has an API which pulls the add-on from AMO and installs it locally. It would be nice to do the same. Presumably we don't need to do the pulling from AMO part and it would just be management.install(blob)... or something.

Needless to say, this should ONLY be for signed themes. Anything else throws an error.

Updated

3 months ago
Assignee: nobody → mixedpuppy
webextensions: --- → ?
Priority: -- → P3
Whiteboard: [themes, triaged], personas

Updated

2 months ago
Whiteboard: [themes, triaged], personas → [themes, triaged], [outreach personas]

Updated

2 months ago
Whiteboard: [themes, triaged], [outreach personas] → [themes], [outreach][awe:personas@christopher.beard], triaged
(Reporter)

Updated

20 days ago
Assignee: mixedpuppy → aswan
(Assignee)

Comment 1

20 days ago
We currently have both lightweight themes and the new webextension-packaged themes.  They are very different, if we need to handle both of them I think we should have separate bugs for the two formats.  But this will be a lot simpler if we can just do the webextension format and leave the old LWTs out.  So actually, I'll treat this bug as being just for webextensions and please file a separate bug if LWT support is needed.
(Reporter)

Comment 2

20 days ago
I'd like to invert that please. WebExtension static themes work, but without AMO support aren't much use. The much more useful one at this point is LWT.
(Assignee)

Comment 3

20 days ago
Well that's pretty simple then.  Do we want any safeguards beyond the "management" permission?  Like should this only be callable when handling user input so the theme doesn't suddnely change?  Should we put up the "do you want to revert" notification bar that we put up when you install a LWT from AMO?
(Assignee)

Comment 4

20 days ago
Wait, looking more closely at existing LWTs, this proposed API is going to be rather similar to browser.themes.update() with two significant differences:
- Different names for all the object properties (though the things settable through the themes api appear to be a superset of things settable through an LWT)
- LWTs appear in the "Appearance" section of about:addons, extensions that use browser.theme.update() do not

On general principles, can we agree on one way of doing this and not have two gratuitously different ways to do essentially the same thing?
Flags: needinfo?(amckay)
(Reporter)

Comment 5

19 days ago
I feel like this question goes beyond this API into the why do we have LWT, browser.themes.update and the new static themes. The answer is we are trying to remove LWT and just have new themes, but we haven't had the time to do convert everything other to the new theme API, remove LWT completely, change AMO and so on.

Landing this API would allow personas plus to work. But, I'm not sure I'm the right person to answer the in depth questions here, maybe Mike de Boer might be able to help?
Flags: needinfo?(amckay)
(Assignee)

Comment 6

18 days ago
If the need for this is limited to personas plus, then how about having personas plus do the conversion from the LWT format to the webextensions theme API?  That doesn't require any new code in central and specifically, it avoids having to land something that is intended to be ripped right back out.
(Assignee)

Updated

13 days ago
Flags: needinfo?(awagner)
I'm not sure I have all the information needed to provide meaningful feedback. What work would be necessary in PersonasPlus to do that?
Flags: needinfo?(awagner)
(Assignee)

Comment 8

13 days ago
Here is the documentation on the new theme format and API:
https://developer.mozilla.org/en-US/Add-ons/Themes/Theme_concepts

I don't know if the actual data format for lightweight themes is documented anywhere but my understanding is that it has all the same information but in a different format.  I think the biggest difference is that if personas plus applied theme updates directly, then they wouldn't also be visible in the "Appearance" section of about:addons (where associated information like author, version number, etc is also displayed).  If that's a deal-breaker for PP then we can implement something specifically for LWTs but if we're going to be ripping LWTs out soon, then PP needs to plan for this anyway...
Aha! Yes, technically, that should work.

Yes, the main issues I see with that approach are:
* No obvious way to 'remove' the theme other than using the Add-ons Manager to switch to a different theme. PP could provide a "reset" functionality as well (and probably has to anyway), but that won't be as intuitive as the AOM.
* No update capabilities, should the theme on AMO get updated. I'm not sure how often that happens though.
(Reporter)

Comment 10

12 days ago
Bug 1373850 provides a reset API. Bug 1373851 suggests that we should do something in about:addons when theme update gets called to provide that.

Agree the two things we lose here are the ability to manage themes in about:addons (showing what theme is enabled when) and updates.
(Assignee)

Comment 11

12 days ago
So what's the plan here?  I can implement browser.management.installLWT() if that's what we need, I just wanted to make sure we thought it through first...
Flags: needinfo?(awagner)
Since there is no dedicated PM for the AOM (that I know of), I talked to Jorge; he believes going forward with using `browser.theme.update()` is good enough, given that
1) theme update are quite rare, as mentioned,
2) installed themes using that method will show up in the AOM eventually (bug 1373851). Thanks Andy, I hadn't seen that bug before.

I believe there actually is nothing to do here, then?
Flags: needinfo?(awagner)
(Assignee)

Comment 13

11 days ago
(In reply to Andreas Wagner [:TheOne] [use NI] from comment #12)
> I believe there actually is nothing to do here, then?

I think so.  Please feel free to re-open or open new bugs if things come up as you work on PP.
Status: NEW → RESOLVED
Last Resolved: 11 days ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.