Replies: 0 comments 27 replies
-
Sounds interesting to me. |
Beta Was this translation helpful? Give feedback.
-
What macro is that? |
Beta Was this translation helpful? Give feedback.
-
According to this document, the Examples
It is perhaps not necessary to create a class for each type of Also I was wondering if we can take the data from BCD in order to be consistent, we should analyze if they have it and redo a logic similar to the BCD table. const MDN = {
class Article {
static title = new String();
static content = new MDN.Content(); // 🤏
static slug = new MDN.Slug(); // 👎
},
class Element extend MDN.Article {
static deprecated = false;
}
}
const article = new MDN.Element();
article.deprecated = YALM.deprecated; Pseudo code ⬆️ (attempt to namespaces because the classes are pretty the same as the real Javascript classes documented 😑) But at the moment there is a component called |
Beta Was this translation helpful? Give feedback.
-
I think it is better to generate lists of things like this dynamically (as stated elsewhere).
I'm hoping the dev team can give us some kind of direction here on what is reasonable to achieve with the tooling. PS. Regarding "consensus" @peterbe - I presume you mean with the idea that dynamically generating a list like this is "a good idea"? Or do you mean with the precise approach? |
Beta Was this translation helpful? Give feedback.
-
FWIW I think we should use BCD for this. We already represent "deprecated" in BCD, representing it in two different places is a recipe for inconsistency. One possibility here (in some structured content paradise) is that pages include the BCD query (e.g. "api.Navigator.sendBeacon") in the front matter. When the page is built, we resolve that reference and use it to build the BCD table and to add whatever markup we want to use to indicate "deprecated" (and anything else we could derive from BCD, like spec URLs).
I'm not sure I understand this, can you give an example? |
Beta Was this translation helpful? Give feedback.
-
I'm sure I had a specific case when I wrote that but I can't think of what it was now. There are at least some APIs though where the feature docs don't cover all functions, so there is nowhere to mark that a particular function is deprecated. HTTP methods are commonly not in BCD if there is no clear meaning for "supported by a browser", so there would be nowhere to mark those if deprecated. There are probably other things BCD does not cover at all but we still need to mark deprecation in docs. Which is not to say I don't completely agree with at least attempting to do this. It's just that it might mean we have to document to greater breadth and depth in BCD than we have previously chosen to do. |
Beta Was this translation helpful? Give feedback.
-
This will resolve in mdn/yari#2903 as actionable summary.
From what I understand, at the moment, deprecation is done via macros, that render some EJS template.
Since we want to migrate to Markdown as main format for editing in the future, it's worth thinking about how we would deal with it in that world.
In my mind, that could be handled by a line in Frontmatter (
deprecated: true
ordeprecated: 2021-02-14
ordeprecated: ['Firefox 85', 'Chrome 90']
) and then handled by Yari when generating the markup.How would you approach it?
Beta Was this translation helpful? Give feedback.
All reactions