-
Notifications
You must be signed in to change notification settings - Fork 341
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
feat: introduce a --firefox-preview flag for 'web-ext run' #2436
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Will, as I anticipated you I think this is a actually a great idea and the PR looks great as is.
We should create a followup issue in the mozilla/extension-workshop repo to add a section for this option in the web-ext command reference here https://extensionworkshop.com/documentation/develop/web-ext-command-reference/
And I think that as part of that it may be worth also to consider calling this option out as part of documentation page providing guidance for transitioning or developing mv3 extensions in Firefox.
wdyt?
In the meantime I'll file the issue and I'll mention in its description that we coordinate merging the changes to the web-ext references with the releasing on npm of a new web-ext version that provides this new cli option.
Let's call it Side note: Firefox Preview is the name of the initial test version of the GeckoView-based Firefox for Android. |
There were a couple of reasons why we ended up settling on --firefox-preview:
I'm not sure I'd be worried that the new cli option may sound like a temporary code name assigned to old GeckView-based Firefox for Android versions, but given that we explicitly used the term "Developer Preview" to refer to to the experimental mv3 support locked behind a pref maybe we could tweak it a little bit into: @willdurand how |
too long :) |
Yeah, I agree |
@willdurand how about |
In Chrome, MV3 is not behind a flag, so something like --enable-mv3 doing nothing would not be an issue. Since conciseness is apparently desired, we could even go with This also leaves the option open to offer more specific mv3 flags in the future, e.g. --mv3=force (which could treat mv2 as mv3, to quickly allow devs to check whether the extension could work if they only change mv2 to mv3). |
I don't think an alias would work because if we refer to the alias instead of the full flag name, let's just not use an alias. I think this discussion means (FTR the initial flag name I had was
I would be OK with |
would In my opinion, this is shorter in its most common use cases, and it would still make it pretty clear if a This would also allow to extend the CLI option to more quickly enable experimental features in Chrome based browsers as well (just as an example, if the promises API in chrome was locked behind a CLI flag in Chrome then we could support a As a side note,
and so being able to extend a @willdurand @Rob--W how that sounds to you? |
Can we just stick to what we have in the current patch? |
This flag allows to enable the [Firefox Dev Preview for Manifest V3][get-involved] [get-involved]: https://blog.mozilla.org/addons/2022/06/08/manifest-v3-firefox-developer-preview-how-to-get-involved/
(rebase) |
Codecov Report
@@ Coverage Diff @@
## master #2436 +/- ##
=======================================
Coverage 99.74% 99.74%
=======================================
Files 31 31
Lines 1549 1552 +3
=======================================
+ Hits 1545 1548 +3
Misses 4 4
Continue to review full report at Codecov.
|
As per our Slack discussion, I am landing this patch as is now. |
I submitted a PR: mozilla/extension-workshop#1339 |
The customPrefs alias was introduced in mozilla#1039 as a direct alias, but changed to a shallow copy in mozilla#2436 because the object was modified. These changes have been dropped in mozilla#3136 but the swallow copy remained. This patch completes the cleanup by reverting to a direct alias.
This flag allows to enable the Firefox Dev Preview for Manifest V3 (at the moment, given that was my main use case). I've been light on testing but it covers enough. I don't think we need to be super fancy right now (personally).