Closed bershanskiy closed 5 years ago
We are not supposed to be using "obsolete" on MDN any more — we came to the conclusion of just using "deprecated" a while ago, as the difference in meaning was confusing people, and just "deprecated" is good enough for most web developers. Any instances of "obsolete" that you find on MDN are not still there intentionally.
Hence BCD also just using "deprecated".
In terms of automating the display of "deprecated" notices from BCD, yes, this would be a good idea, and I think this has also been talked about before. @Elchi3 , I believe this is part of the "browser compat ribbon" project? (I can never remember the official name!)
Yep, the term "obsolete" is deprecated on the MDN site :laughing:
@Elchi3 , I believe this is part of the "browser compat ribbon" project? (I can never remember the official name!)
I'm not sure if it is included, but you can provide your feedback in the issue that is determining our warning algorithm https://github.com/mdn/sprints/issues/1668
Any instances of "obsolete" that you find on MDN are not still there intentionally.
Good to know. So I'll try to replace "obsolete" with "deprecated" where appropriate while doing other tasks.
@Elchi3
I'm not sure if it is included, but you can provide your feedback in the issue that is determining our warning algorithm mdn/sprints#1668
Thanks for the link, it is definitely relevant here. However, it's about the table colors and browser support (so probably mostly browser version numbers) and I wanted to just make the text inline icons consistent with the BCD tables by automatically generating the icons based on the BCD status
values. let me clarify with examples:
Disclaimer: obviously, I draw error examples from the lesser-used parts of MDN that contain more errors; however, these examples are still valid because the automatic status icon insertion would remove this class of errors altogether.
Let's look at BatteryManager I linked earlier.
The api.BattryManager.__compat.mdn_url
is https://developer.mozilla.org/docs/Web/API/BatteryManager
, which means all articles at URLs like https://developer.mozilla.org/[locale]/docs/Web/API/BatteryManager
are about BatteryManager
. Also, api.BattryManager.__compat.status.deprecated
is true
, so the page should have a "deprecated" plaque at the top. Similar logic applies to experimental
and standards_track
.
Note that this can be done by either:
Let's look at Navigator:
Currently, MDN links to other parts of MDN with macro links, e.g. like {{domxref("Navigator.battery")}}
. Sometimes (but not always), editors insert inline status icons, but they do it inconsistently. In the screenshot we see:
{{experimental_inline}}
icon.true
, so it should have a "deprecated" icon.This can be done in two ways as well:
{{domxref("thing")}}
and {{domxref("thing", false)}}
would behave as they do now (for use in text), but {{domxref("thing", true)}}
would also insert the status warning icons (for use in lists like on the second screenshot).My proposal has a different goal than the linked issue. The linked issue proposes a change in how the tables are displayed, while I want to just automate the insertion of deprecation warnings. What I propose might eventually come in handy with that issue down the line, but it is not blocked by it. If anything, the linked issue would be blocked by this.
Thanks for all your work @bershanskiy ! :100:
The MDN site uses two words "deprecated" and "obsolete", while this data repository uses only "deprecated". I would like to make BCD and the site articles consistent (either remove word "obsolete" from the site or add
status.obsolete
to BCD).Example: BatteryManager and its elements are marked "deprecated" in BCD and "obsolete" on the site. So which one is it: deprecated or obsolete? One would have to look at the BCD table values to decide: it's perfectly usable in Chrome while not accessible in Firefox.
I believe this distinction is unnecessary and site should use only "deprecated" (replace all "obsolete" with "deprecated") because:
Benefits of standardization
I would like to change a few macros to automatically insert experimental/deprecated/non-standard indicators based on data from BCD repo. For example:
DOMxRef("thing", true)
will insert the reference and the status icons, whileDOMxRef("thing", false)
andDOMxRef("thing")
would not to maintain backward compatibility.Compat("api.thing")
hasstatus.deprecated
set totrue
, then the page linked to atmdn_url
should have a{{deprecated_header}}
on top.