Support banners/headers
See original GitHub issueThere’s a class of KS macros that we call “banners” or “headers”.
They create a block element across the page warning that the item is (for example) deprecated. See e.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Expression_closures for a nice pile of these things.
At the moment, in Kuma, the fact that a method is deprecated is maintained in two (or more) places: the BCD for the item (under the status
key) and the macro call itself. This makes our content hard to maintain.
We would like to maintain this info only in BCD, and have the stumptown-renderer automatically add the relevant banner(s) based on the BCD.
Since stumptown-renderer already gets BCD for each item, it can do this with no changes to stumptown-content. We might anyway choose to represent status more explicitly in the built JSON, via a top-level status
property, say. Then there would be a small change to stumptown-content to add this.
Acceptance criteria
- stumptown-renderer automatically adds “Deprecated”, “Non-standard”, or “Experimental” banners to pages, based on the information from BCD.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
I think it’s still up for discussion exactly how this will look in the JSON (see https://github.com/mdn/stumptown-content/issues/306, where this would get sorted out) but a couple of things:
Now moot.