Yeah, the potential for confusion is why I’m starting really to like the idea of a “nightly/preview only” flag, or something similar.
So, the browsers/browsername.json
files have records for each browser release that include a status
field that can have one of a number of values, including exclusive
, beta
, nightly
, etc.
How about we add an optional restriction
or availability
property to the version data in BCD that can take one of these values? This would let you indicate that a feature is only available in beta or later, nightly or later, or even that it’s only available in exclusive builds of some kind. Any special information beyond that can be included in a note.
That way, for these Payment Request items, I would then write it up in BCD like this:
"firefox": {
"version_added": "55",
"restriction": "nightly",
"flags": [
"type": "preference",
"name": "dom.payments.enabled",
"value_to_set": "true"
]
}
This describes a feature which is added in Firefox 55, but only for nightly builds, and that you also have to set dom.payments.enabled
to true
.
You can then similarly describe a feature added in Firefox 62 beta and nightly builds (the assumption being that beta
would imply nightly
as well; if we can’t make that assumption then we’d have to support an array here, which I think is probably overkill). The feature was then brought to general release in Firefox 64. No preference is required:
"firefox": [
{
"version_added": "64"
},
{
"version_added": "62",
"restriction": "beta"
}
}
Then we can just add logic to the table building to look at the value of restriction
and automatically add an appropriate annotation or note, or even to leave the table field empty except for a “see note” symbol that tells you it’s available only on nightly.
This lets us provide all the information in a clean way, and in a way that is easy to make fall back to pretending the feature doesn’t exist, just by looking for that restriction. If the restriction
property is present, then the feature is immediately recognizable as one which is not available in release builds.