-
Notifications
You must be signed in to change notification settings - Fork 199
Embellish discouraged data with more detail
#3193
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
base: main
Are you sure you want to change the base?
Conversation
| description: The `__defineGetter__()` and `__defineSetter__()` methods of objects bind a function to a property, which is called on setting or reading the property. | ||
| spec: https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.prototype-legacy-accessor-methods | ||
| discouraged: | ||
| reason: TC39 included accessor methods in Annex B of the ECMAScript specification, which covers JavaScript features with "one or more undesirable characteristics and in the absence of legacy usage would be removed." |
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.
I don't really know why this was stuffed into Annex B (the spec does not provide more specific text, unlike getYear(), so I just quote from the spec directly.
features/mutation-events.yml
Outdated
| spec: https://w3c.github.io/uievents/ | ||
| group: dom | ||
| discouraged: | ||
| pending_removal: true |
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.
Here's our one removal pending. All pending removal features are discouraged features, but not all discouraged features are pending removal, thus a subordinate key and value here.
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.
Have we talked about what happens once features are removed? Will we then delete the mutation-events.yml file and dist file? I suspect not, since we likely don't want to reuse the ID.
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.
We have not, though perhaps we should do so at the same time. My (very briefly considered) guess is that we ought to have some feature-level annotation that says, more or less, "this is historic and you should not show it to developers by default." It would cover both features removed (like this one) but also features that never shipped widely in the first place (import-assertions would be a good example) or got abandoned before making it into a stable release.
Maybe something like retired: true, but I'm reluctant to add a single-use boolean. Something "stringy" would be nice, so we have the option of introducing nuance later, if needed. Maybe a sort of summary field? condition: "normal" | "discouraged" | "pending-removal" | "historic". We'll need to think on this problem a little more.
|
I like the new |
8977dc2 to
c312a78
Compare
|
Thanks for making this buildable locally: it works nicely on MDN: mdn/fred#772
This works well for our needs. |
|
@ddbeck I've had a scan through of the reasons - I think these are all very good, I don't suggest we overthink these - the guidelines look good and they are already a huge improvement to what we have |
|
OK, I think this PR is ready for review, with an eye toward landing it soon. Here's what's changed recently:
|
LeoMcA
left a comment
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.
Checked out and built locally for testing against MDN: works well, thanks for the addition of the reason_html field too
Toward #3210.
In meetings with MDN, @atopal and I have been talking about how to make it possible for MDN to replace MDN-authored and managed deprecation banners with banners automatically presented based on data from web-features. This PR explores two possible additions to the data to satisfy MDN's use case. Those two changes are:
Apending_removalfield (to exaggerate warnings on mutation events and any future platform removals, if they arise). In my initial demonstration, this is a seldom-used boolean that shows active removal from the platform. Here, it applies to mutation events only.removal_datefield to exaggerate warnings on mutation events and any future platform removals, if they arise, or to indicate when a feature was removed, if it's gone already.reasonfield, which briefly explains to developers why the feature is deprecated. If we added this, it would become a required field.At this point, I'm looking for feedback on the schema. I expect that we'd eventually need guidelines for writing the messages and setting the
removal_datefield—if you need those guidelines to judge the schema here, please let me know.