New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(svg attributes): Remove the element list and reorder sections (for attributes u-z ) #32965
Conversation
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.
I made a few suggestions to improve the docs as long as we're in her editing them.
Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>
Hi @estelle, thanks a lot for reviewing these pages! I've accepted your content additions/improvements (thank you for the suggestions). I believe we can address these concerns in a separate issue/PR. The focus of the current set is to fix the navigation and ordering of sections. Please see my response in #32965 (comment) for the reasoning behind some of the changes. You can preview them on the viewBox page. If these changes look okay to you, I'll replicate them to other pages. Thanks! |
I've removed my review request as it looks like @estelle has sorted this. You can add me back if further review is needed. |
Correct and I agree. I think we're saying the same thing :) Just to be sure: Current viewBox: What I'm proposing (viewBox preview): I am guessing that the only point where we differ is whether or not to have a hand-curated TOC to various element sub-sections. That is, I am not in favor of including this linked list: |
Hi @estelle, I've updated the files to remove the elements as H2s and also added code styling to element headers in 110ef88. As a sample, you can check the I hope this is looking good to land. Thanks for your review! |
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.
Some of the examples were duplicates, so made suggestions to create different yet useful ones.
Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>
Thanks for the suggestions, @estelle! I've applied them as is. It might be better to address the content concerns and updates in a separate PR. This one was specifically aimed at fixing only the navigation, and I was waiting to get this approved before making similar changes to other attribute pages. I hope we can land this soon. In similar subsequent PRs, I'll happy to take up content improvements separately. |
Thanks, @estelle 🎉 |
Description
I came across the SVG x attribute page while triaging #32081.
The element list under "You can use this attribute with the following SVG elements:" resembles a Table of Contents (TOC) but it is not. I found this list alongside the "In this article" sidebar links confusing.
The links in the element list take you to the respective element pages whereas I was expecting navigation to sections on the attribute page itself.
Given that the sidebar is meant for in-page navigation, and each element section already includes a link to its corresponding element page, the initial list of links appears to be redundant.
This PR:
Removes the element list from attribute pages that contain subsequent sections for those elements. Each section contains a link to the corresponding element page, so that navigation aid is not lost.
Renames "Example" to "Examples". This aligns with our use of the plural form for this section. For example, in the SVG element page template, the guideline is: "Note that we use the plural "Examples" even if the page only contains one example."
Changes the position of the "Examples" section so that it follows "Usage notes" or appears before "Specifications" (as in SVG element page template and various other templates).
(The appearance of examples before an explanation of the values was reported as a problem in SVG preserveAspectRatio documentation flow/ordering is confusing #31825.)
Uses the section name "Usage notes" when a description of values is included and the name "Usage context" when the section contains only a table. The section name "Context notes" appears only on SVG attribute pages; it has been updated to "Usage notes" or "Usage context" as appropriate.
Note: The improvements in this PR focus on attributes with names starting from U to Z.
Motivation
To help streamline navigation and improve consistency with other parts of MDN