Closed
Bug 1328624
Opened 7 years ago
Closed 7 years ago
about:addons' "Install Add-on From File…" should support WebExtensions by default.
Categories
(Toolkit :: Add-ons Manager, defect, P5)
Toolkit
Add-ons Manager
Tracking
()
RESOLVED
FIXED
mozilla54
Tracking | Status | |
---|---|---|
firefox54 | --- | fixed |
People
(Reporter: bwinton, Assigned: jakehm)
Details
(Keywords: good-first-bug, Whiteboard: [qx:link:spec], triaged)
Attachments
(1 file)
I'm currently writing a WebExtension that does some things on browser start, which means that I can't use `web-ext run`, since that doesn't carry data across runs. So I use `web-ext build` to build the add-on, and then go to `about:addons` and choose `Install Add-on From File…` to install it, but the just-built add-on doesn't show up because the file filter is only looking for `*.xpi;*.jar`, and not the `*.zip` that gets built. It would be nice if we could add `*.zip` to https://dxr.mozilla.org/mozilla-central/source/toolkit/mozapps/extensions/content/extensions.js?q=%22%2A.xpi%3B%2A.jar%22&redirect_type=single#1341 to make it easier for people developing WebExtensions to test them… :) Thanks!
Reporter | ||
Updated•7 years ago
|
Whiteboard: [qx:link:spec]
Comment 1•7 years ago
|
||
How about having web-ext build create an xpi? There should also be a "Format" menu in the open file dialog (appearance is slightly different from platform to platform) where you can choose "all files"
Comment 2•7 years ago
|
||
whoops meant to ni? kumar for the first question in the previous comment
Flags: needinfo?(kumar.mcmillan)
Comment 3•7 years ago
|
||
(In reply to Andrew Swan [:aswan] from comment #1) > How about having web-ext build create an xpi? > There should also be a "Format" menu in the open file dialog (appearance is > slightly different from platform to platform) where you can choose "all > files" I had a PR where I was working on this which bitrotted and I haven't had a change to fix it up yet: https://github.com/mozilla/web-ext/pull/392
Comment 4•7 years ago
|
||
(In reply to Andrew Swan [:aswan] from comment #1) > How about having web-ext build create an xpi? > There should also be a "Format" menu in the open file dialog (appearance is > slightly different from platform to platform) where you can choose "all > files" I just tried and this does work for zip files, at least on Mac. Blake does that help in the meantime ^?
Flags: needinfo?(bwinton)
Reporter | ||
Comment 5•7 years ago
|
||
Andrew: I would be happy with web-ext building an XPI, if that's easier, but we've got code to load zip files in Firefox, so it might be easier to take advantage of that. Rob: I am currently working around the problem by moving my mouse down to the tiny dropdown box and changing the format _every_ time I try to load the extension. It's gotten tedious enough that I filed a bug, and would happily write the patch to make the change I suggested, if that gives you any indication how good of a workaround it is…
Flags: needinfo?(bwinton)
Comment 6•7 years ago
|
||
I don't object to adding .zip to the list of extensions but I worry that it would create some confusion as lots of zip files are not valid extensions. (Though I acknowledge that that concern is undermined by the fact that .jar is in the default list ... wtf?) Anyway, distinguishing non-extension zips from extensions is the point of using the .xpi extension. So ... is it deliberate that web-ext uses the .zip extension and if so, why?
Comment 7•7 years ago
|
||
It already does. WebExtensions should have a .xpi extension. This is a web-ext bug.
Comment 8•7 years ago
|
||
(In reply to Andrew Swan [:aswan] from comment #6) > I don't object to adding .zip to the list of extensions but I worry that it > would create some confusion as lots of zip files are not valid extensions. > (Though I acknowledge that that concern is undermined by the fact that .jar > is in the default list ... wtf?) Anyway, distinguishing non-extension zips > from extensions is the point of using the .xpi extension. So ... is it > deliberate that web-ext uses the .zip extension and if so, why? IIRC .zip is uploadable to both Chrome Store and AMO. I think allowing .zip is totally fine, especially if we already allow .jar ...
Comment 9•7 years ago
|
||
(In reply to Kris Maglione [:kmag] from comment #7) > It already does. WebExtensions should have a .xpi extension. This is a > web-ext bug. This is fine too - I had a working patch (comment 3) but a bunch of web-ext changes landed in the meantime, so it'd need to be rewritten. Blake - another option in the meantime (which is a bit annoying to set up, but just the first time) is to use proxy files: https://developer.mozilla.org/en-US/Add-ons/Setting_up_extension_development_environment#Firefox_extension_proxy_file
Comment 10•7 years ago
|
||
Can we please just allow .zip in the file picker? It looks like the way forward (and it's already supported anyway!) https://browserext.github.io/browserext/#packaging Web-ext chose .zip because it was compatible with both Firefox (besides this bug) and Chrome. If we change it to .xpi by default then we lose Chrome support. However, this really only applies to Chrome store submissions. I'd like to discourage web-ext developers from making extensions that only work in Firefox as much as possible.
Flags: needinfo?(kumar.mcmillan)
Updated•7 years ago
|
Component: WebExtensions: Untriaged → Add-ons Manager
Updated•7 years ago
|
Assignee | ||
Comment 11•7 years ago
|
||
Assign to me please.
Comment 12•7 years ago
|
||
Thanks for taking it on Jacob, please let us know if you need help on it.
Assignee: nobody → jacob.harrowmortelliti
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8837887 -
Flags: review?(amckay)
Updated•7 years ago
|
Attachment #8837887 -
Flags: review?(amckay) → review?(rhelmer)
Reporter | ||
Comment 14•7 years ago
|
||
(I'm not an official reviewer, but for what it's worth this looks great to me!
Comment 15•7 years ago
|
||
mozreview-review |
Comment on attachment 8837887 [details] Bug 1328624 - Added .zip to default extensions when installing an add-on from file. https://reviewboard.mozilla.org/r/112880/#review115624
Attachment #8837887 -
Flags: review?(rhelmer) → review+
Assignee | ||
Comment 16•7 years ago
|
||
mozreview-review |
Comment on attachment 8837887 [details] Bug 1328624 - Added .zip to default extensions when installing an add-on from file. https://reviewboard.mozilla.org/r/112880/#review116940
Assignee | ||
Comment 17•7 years ago
|
||
So no further action is required by me?
Comment 18•7 years ago
|
||
Sorry, now you have an r+ you just need to set checkin-needed as keyword and the sheriffs will come along and check it in for you. I've done that for you.
Keywords: checkin-needed
Comment 19•7 years ago
|
||
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/autoland/rev/f2c4369cac4f Added .zip to default extensions when installing an add-on from file. r=rhelmer
Keywords: checkin-needed
Comment 20•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f2c4369cac4f
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox54:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in
before you can comment on or make changes to this bug.
Description
•