-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[Schema] ID proposal #113
Comments
You say that the ID will be stored within the JSON, though in the examples they are missing. Also, it's unclear to me, what you mean with "bottom of the ID". Sebastian |
This isn't the main reason WE has one massive file. The main reason is that I want to be able to generate pages like this: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Browser_support_for_JavaScript_APIs. It's not clear to me how I could do this if the compat data was split up into lots of individual files. I don't think I really understand this proposal either. At the moment WE JSON looks something like this:
So I guess the "ID" would be How would this differ under the current proposal, and how would I build these aggregate tables? |
@SebastianZ: sorry I've not been clear enough. The id of line-height would be css.properties.line-height. @wbamberg: the proposal is not fundamentally different than the one of WE. The main difference is that the ID will be unique through all the files, being one, or being multiple. This means that the id must be unique not only inside a file, but throughout all the files. This is enforces at review time, helped by a simple id scheme. The possibility to use one large file, or several small files, is left to the curator of each area. Ideally, in the future macros will use a DB and the notion of file will disappear. In the case of WebExtensions, there will still be one large file, with similar ids. The ids will be a bit longer. Instead of: i18.cookies, it will be webextensions.i18.cookies (or similar): That way we can easily merge different files, or separate them as the id scheme is universal throughout all browser compat data. |
Thanks for the clarification @teoli2003 ! I'm +1 on this proposal now. |
Ah, I see. You call the JSON path down to an entry the "ID". 😄 With your description I would have expected a key "id" containing "css.properties.line-height". So, yes, your proposal is fine for me. Sebastian |
I like the proposal. The If it is just
Alternatively, you compatibility data could appear under the
Update: Issue #114 specifies the second form, that data appears under the |
I think we've come to an agreement here and the new schema reflects that. Please open new issues if you have new feedback on identifiers. |
Hi all!
Our schema must be able to identify different features. We need to agree on the way to identify these.
We have a few constraints: we would like not to rely on the file structure we choose, as it is unclear how it will be in the future (1 large file, numerous small files, or even in a DB).
For the moment, the experiments showed 2 kind of file structures that we are using:
We don't know which of these file structures will be the best in the long term, so we need to have a identifier that works in both cases (without to much added complexity).
The proposal is the following: we put the id inside the json:
E.g. css.properties.line-height would be the id for the line-height properties and written:
{"css": {
"properties": {
"line-height" : {...}
}
E.g
{"WebGL2RenderingContext": {
"api": {
"WebGL2RenderingContext": {...},
"WebGL2RenderingContext.beginQuery": {...},
...
}
}
To indicate the bottom of the id, the idea would be to use a special keyword ("__compat" or similar) to indicates that what follows is the compat information.
What do you think of this idea?
The text was updated successfully, but these errors were encountered: