-
Notifications
You must be signed in to change notification settings - Fork 17
Conversation
I agree that lots of pages omitting a thing is a strong signal that it should be optional. One question though is: in the recipes for CSS properties and for HTML elements we have mandatory "Overview" sections, that are supposed to follow the interactive example, if there is one. These sections are supposed to have special-case handling that omits the H2 (as for "short_description"). This is supposed to accommodate some text in between the interactive example and the named sections like "Attributes" (see for example https://developer.mozilla.org/en-US/docs/Web/HTML/Element/address). What's the difference between "Overview" and "Description" ? They seem to fulfill basically the same function. I think my suggestion would be:
|
Thanks for thinking outside of JS docs! I agree "overview" fulfills basically the same function.
I like this plan. To fully implement it, would there be follow-ups, or is any more work to be done in this PR? |
Why not, in this PR, update all the recipes that have |
Done that now, for some reason I thought this would be more complex but looks like it isn't. I hope it is reviewable. Some unrelated stuff seem to have made it into the commit. Wasn't there when I reviewed the diff. I guess it is this magic?
|
This is because the husky pre-commit command applies prettier in ways that the package scripts prettier commands don't—in this case, it's running on all files, including Markdown. I'm not sure when that got added or why, but that's what's doing it. |
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.
At least, I don't think these formatting changes break anything, and it would be good to have the substantive change in the recipes.
Makes "Description" sections optional throughout JS docs. When linting the whole JS tree:
Before:
After:
I believe we should make description sections optional. Of course, this raises the question to authors when to have a "Description" section and when not. Currently, I believe, it is there when the method or any language feature needs more explanations that doesn't fit into the short description. Not all pages need these longer texts, though. Sometimes what's in "Description" could probably be put into (multiple) examples, but sometimes it is really just text and not code. So, my feeling is that the "Description" section is a bit like a guide page as a section in the reference. The author can freely make use of it to go deeper and explain concepts etc. More thoughts on this welcome.
Follows up on the comment I made here #348 (comment)