-
Notifications
You must be signed in to change notification settings - Fork 143
E - Fix CSS linter errors #3139
Comments
I ran the linter over the CSS tree today. A major caveat is that we don't have all the recipes defined yet, and we haven't set all the document tags yet. So we're not yet linting all the pages - in fact we see 478 "Recipe missing" errors out of 1007 pages. But even so, this is enough data to tell us some things about the CSS errors we have. Below I've taken the error summaries and just grouped them by ingredient handler, and ordered them roughly by the number of errors, excluding "Recipe missing":
I think we can classify them by the amount of effort to fix like:
data.examplesThe good news here is that although there are hundreds of errors, the linter seems to be over-sensitive here, sometimes generating dozens of errors for only a couple of underlying problems. For example, the The bad news is that there are still a lot of errors and some of them will require careful thought and significant reworking to resolve. prose.see_alsoThis is mostly about missing "See also" sections, and involves real work thinking of good "See also" links and adding them. As discussed before, if it starts to look like we are artificially adding links just to satisfy the linter, we could make this ingredient optional. But I think adding cross-linking like this adds real benefits to users. data.formal_definitionThis seems like a lot because there are lots of errors. We want to add a new H2 section to every property page (and some other pages too). But the new sections are very simple and consistent, so it should be quite quick, predictable, and parallelizable. data.formal_syntaxSame as data.specificationsThis looks like a lot but I think a lot is coming from misnamed "Specifications" sections. For example it looks like all the padding-block-*, padding-inline-*, and scroll-margin-* pages use "Specification". data.browser_compatibilityAgain it looks like lots of these are subtly misnamed sections, often where the ID is "Browser_Compatibility". ingredient-out-of-orderThis is a hard one to predict, and we could dig into it more. data.constituent_propertiesThis is another brand-new section, only applies to a few pages, and is pretty mechanical. data.syntaxThere are only 9 of these errors in all 500-odd pages, so it can't be that bad. data.interactive_example?There are only 13 of these errors in all 500-odd pages, so it can't be that bad. prose.short_descriptionOnly one of these. Probably quicker to fix than to write this sentence. |
I ran the linter over the CSS tree again today. It now recognizes all except 4 pages (the 4 "keyword" pages). I've split the output by ingredients, to mirror the user stories under this epic, and dumped them in a spreadsheet: https://docs.google.com/spreadsheets/d/1JQIgRB978bEKHFmQoAjY4stddDdbaFAULj_TOK2jYwc/edit?usp=sharing. This has one sheet per ingredient, and each sheet has one row per page that contains at least one error about that ingredient. Some pages have multiple errors per page. |
@wbamberg two questions about fixing CSS page errors, hopefully uncomplicated:
|
I'm not really sure about the general role of the spreadsheet here tbh, and I don't have a fully-baked process for how people can coordinate their efforts to fix errors. I guess you could say, this spreadsheet is a tool people might find useful, not a process they have to follow. But, I think people should mark them as done and leave them in the spreadsheet. The main reason being that otherwise we can't easily distinguish between a page not appearing because it was missed in the analysis, and a page not appearing because it was fixed.
Good question! The linter is actually fairly relaxed about examples, isn't it. A good consistent format might be:
But it's intentional in the linter specification that it allows people to interleave prose and code. We discussed this back in mdn/stumptown-content#350. |
So https://wiki.developer.mozilla.org/en-US/docs/Web/CSS/box-shadow#Examples could be a good example of a page with good examples :). (also, a magnificent quote in the first of them). |
I've filed #3491 for deciding what to do about prefixed features. |
On a similar note to #3491, what about properties associated with the old flexbox draft specification? https://wiki.developer.mozilla.org/en-US/docs/Web/CSS/box-direction ? Do we provide any value by documenting these properties? Does anyone use them? @rachelandrew , would you mind venturing an opinion? |
@wbamberg I finished up the fixable
|
I've finished the expected-heading Syntax items. |
Epic
Fix linting errors in the pages
Acceptance criteria
The text was updated successfully, but these errors were encountered: