Skip to content

Clarify extension ID creation #38444

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

andrewbaxter
Copy link

Description

For manifest V3, the developer must come up with an ID on their own to submit the extension. I clarified it (I think in the best location) and provided details on the requirements and how to to choose one.

Motivation

AFAICT nowhere in the docs did it say that the developer can come up with the extension ID on their own, and in several places it's suggested that they don't come up with it on their own (ex: testing locally, uploading manifest V2 extensions with no ID).

This confused me for several hours until I joined the addons web chat and got an answer from someone official.

Additional details

Related issues and pull requests

AFAICT nowhere in the docs did it say that the developer can come up with the extension ID on their own, and in several places it's suggested that they _don't_ come up with it on their own (ex: testing locally, uploading manifest V2 extensions with no ID).

For manifest V3, the developer _must_ come up with an ID on their own to submit the extension. I clarified it (I think in the best location) and provided details on the requirements and how to to choose one.
@andrewbaxter andrewbaxter requested a review from a team as a code owner March 4, 2025 14:19
@andrewbaxter andrewbaxter requested review from willdurand and removed request for a team March 4, 2025 14:19
@github-actions github-actions bot added Content:WebExt WebExtensions docs size/xs [PR only] 0-5 LoC changed labels Mar 4, 2025
@andrewbaxter
Copy link
Author

I made a similar change for documents in extension workshop since there are different routes in the documentation: mozilla/extension-workshop#2022

A lot of documents are still heavily V2-oriented... I have no strong preference for V3 but I didn't want to have to make large changes to distribute an extension on multiple extension marketplaces, in case this is because V3 extensions aren't officially recommended.

@github-actions github-actions bot added size/m [PR only] 51-500 LoC changed and removed size/xs [PR only] 0-5 LoC changed labels Mar 9, 2025
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Contributor

github-actions bot commented Mar 9, 2025

Preview URLs

External URLs (2)

URL: /en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/browser_specific_settings
Title: browser_specific_settings

(comment last updated: 2025-04-30 03:01:02)

@rebloor
Copy link
Contributor

rebloor commented Mar 9, 2025

@andrewbaxter thanks for spotting this. I've made some additional changes as I'm not sure, for example, that the original statement that the key was usually not required was neither accurate or helpful.

@andrewbaxter
Copy link
Author

andrewbaxter commented Mar 10, 2025

Thanks! I agree, and your changes seem great - I was afraid to make sweeping changes but I think this is much better.

Would it be possible to clarify that the id is something the developer chooses, and not something assigned by ADO? That was the other thing that confused me, and since there are situations where the developer doesn't choose the id (local testing, manifest v2) it wasn't obvious to me in v3 that the roles had switched.

@rebloor
Copy link
Contributor

rebloor commented Mar 10, 2025

@andrewbaxter better?

@andrewbaxter
Copy link
Author

andrewbaxter commented Mar 11, 2025

Oh thanks! And sorry for my insistance here!

I think the new wording doesn't explicitly say that the developer chooses the ID. It makes it clear that AMO does not, but leaves a gap in identifying who does.

If you don't have any objection, I think it would be good to say something like, "In manifest V3, the developer chooses the ID." or something similarly direct.

Edit: Rereading it I think what you wrote works, I think my only hesitation is that provide can and often means "via some external system". Like if a bank says "provide your social security number", they don't mean "make up a number". I have a similar reservation about the word "define" and was why I went with "decide" originally which I think is unambiguous (same with "choose"), but I think if someone reads this carefully they'll get the intended meaning.

@github-actions github-actions bot added the merge conflicts 🚧 [PR only] label Apr 3, 2025
Copy link
Contributor

github-actions bot commented Apr 3, 2025

This pull request has merge conflicts that must be resolved before it can be merged.

@willdurand
Copy link
Member

I made a similar change for documents in extension workshop since there are different routes in the documentation: mozilla/extension-workshop#2022

let's align on this first

@github-actions github-actions bot removed the merge conflicts 🚧 [PR only] label Apr 30, 2025
@rebloor
Copy link
Contributor

rebloor commented Apr 30, 2025

@andrewbaxter any objections to merging?

@andrewbaxter
Copy link
Author

andrewbaxter commented May 5, 2025

Oh hey, sorry - I think the current state of this MR is fairly far from what I started with and I'm not on top of all of the discussions, so it might be better if you reach a conclusion with @willdurand

I think it'd be fine to merge whatever you two agree on.

@rebloor
Copy link
Contributor

rebloor commented May 6, 2025

Thanks @andrewbaxter
Any further comment @willdurand

@willdurand
Copy link
Member

@rebloor it's kind of OK. I guess I'll insist on recommending to always set an ID in the manifest no matter the manifest version, and also indicate that the important part in "email-like form" is "like", which means the developer doesn't necessarily have to own the email address because it is actually not necessarily an email address. The rest looks very reasonable. Since I am guessing I'll make the same comments in the EW PR, I'm wondering if this page should point to EW for the specifics, and do not try to explain what values are accepted, etc. idk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebExt WebExtensions docs size/m [PR only] 51-500 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants