-
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
Choose a guideline for descendant flag data #6509
Comments
Some reviewers, such as myself, have been supposing that a feature behind a flag implicitly puts every descendant feature behind the flag. I described my thinking on this in more detail in this comment #6465 (comment). I concede this might be a source of confusion in some consumer use-cases (e.g., an MDN page for some subfeature may not show that the parent feature is gated by a flag because that's on another page), but it great simplifies maintenance. When a feature is no longer behind a flag, only the parent feature data needs to change. Other reviewers have been doing something else, but I can't say what their thinking is. Possible solutions that have occurred to me:
I prefer the second and third options over the first, though I think all are acceptable. The status quo (which appears to be anything goes) is not working for me. |
I would like to amend things so that most fields in a record can be set to "inherit" to inherit the parent node's value. This would be permitted for things like Then, by default, values would not be inherited, but they could be configured to do so when appropriate. |
I ran into this when working on #6679. Personally, I feel that subfeatures should never inherit flags, as I feel that it's just duplicating data over and over again, where we only need the data to be in one location: the parent feature. @foolip made a good argument about how the tables render on the MDN web docs, of how the parent feature will display the version when the flag is no longer needed but its subfeatures display an earlier version -- however, I feel that's more of a table display issue (not to mention that it's the same case for prefixes and alt. names). |
Thanks for pointing this out, @vinyldarkscratch. I had always assumed a certain interpretation of flag data and never stopped to wonder how other people interpret it. My interpretation was: if you traverse all of BCD and delete any entries with a Although I don't enjoy dealing with flag data when just trying to make the shipping-by-default data accurate, the always inherit is the one that matches my assumed interpretation. For any of the other options, what are the rules that data consumers must apply to discard flag data and be left with shipping-by-default data? Aside: I don't think is very similar to prefixes and alternative names. Those modify the name of that specific entry, making it possible to represent both, |
To spell out the problem of applying flag data to subfeatures, take this situation:
What is the correct interpretation of this? Is the data impossible (failing the lint) because there's a contradiction, does the child support statement plainly override the parent feature, or should statements be merged? I fear the answer will be that some merging has to happen, and that this is not at all trivial in the face of multiple support statements at both levels. I might suggest this framework for resolving this issue:
My guess is that some rules would require larger changes than others, and we might find that one assumption is more common than another in the data. |
Prompted by #6465 and #6433 (comment), we do not have a consistent way of considering flag data for features which are descendants of a feature also behind a flag.
Or, more visually, consider a structure like this:
SomeObject
SomeObject()
someMethod()
If
SomeObject
is behind a flag, shouldSomeObject()
andsomeMethod()
duplicate the flag data ofSomeObject
? If the data should be duplicated, by what mechanism?Blocks: #8947
The text was updated successfully, but these errors were encountered: