Skip to content

Conversation

@Josh-Cena
Copy link
Member

Many guide pages are not reachable from their parent page, which is a minus for discoverability and for consistent IA. This adds a "Guides" section to enforce consistent structure; afterwards I can send another PR to apply this structure to API pages.

@Josh-Cena Josh-Cena requested a review from a team as a code owner July 18, 2025 13:40
@Josh-Cena Josh-Cena requested review from chrisdavidmills and removed request for a team July 18, 2025 13:40
@github-actions github-actions bot added Content:Meta Content in the meta docs size/s [PR only] 6-50 LoC changed labels Jul 18, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Jul 18, 2025

Preview URLs

(comment last updated: 2025-07-21 14:12:02)

For a practical usage guide with code examples, you should include a "Usage…" article in your API docs (e.g., [Using the WebVR API](/en-US/docs/Web/API/WebVR_API/Using_the_WebVR_API)).
To help improve content discoverability and {{Glossary("SEO")}}, keep the following tips in mind:
## Guides
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW I like the idea but I don't think it makes much "difference". After all, if you're on this page you can see the guides on the sidebar.

What would actually make a difference for users is to make the sidebar work properly and include these guides in the sidebar when you aren't on a guide page.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My checker requires every parent page to link to all its children. The main goal is to detect missing members on interface pages and other landing pages, but I think it provides value for this to be a general rule. The sidebar doesn't provide short descriptions about the page's content.

Copy link
Collaborator

@hamishwillee hamishwillee Jul 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I agree it is good - in particular there is an opportunity to talk about the content. My whine is because the guide isn't in the sidebar at all if you're not in a guide.

I have no objection to this at all. But since I wasn't assigned this is just a fly by :-)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you look at https://developer.mozilla.org/en-US/docs/Web/API/URL for example, the sidebar does indeed contain guides. This was added last month: mdn/rari#224

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's awesome. Been complaining about it for years. Ignore me then.

Copy link
Collaborator

@hamishwillee hamishwillee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm approving. I think this is a good idea though ideally a guide should be well enough named that it would be hard to add useful extra information in just a paragraph.

Would be good to get another view - @chrisdavidmills ?

@chrisdavidmills
Copy link
Contributor

I'm approving. I think this is a good idea though ideally a guide should be well enough named that it would be hard to add useful extra information in just a paragraph.

Would be good to get another view - @chrisdavidmills ?

I don't agree with this change. I don't think structuring it like this is necessarily a bad idea, however, this isn't the way we've traditionally done it. The guides are clearly linked at the top of the sidebar for those who want to find them right away, and we tend to put a line at the bottom of the "Concepts and usage" section linking to the guide(s), for more information on usage.

We'd have to update every page listed at https://developer.mozilla.org/en-US/docs/Web/API#specifications, for very little gain.

I do love that we are now linking guides from the interface page sidebar <3

@Josh-Cena
Copy link
Member Author

Josh-Cena commented Jul 21, 2025

We'd have to update every page listed at https://developer.mozilla.org/en-US/docs/Web/API#specifications, for very little gain.

I already have automation to catch all such cases, so it won't be a pain. The gains OTOH:

  1. Every other page type has this requirement; it would be odd for API landing pages to not have this. Interface pages also list all their members despite the exact same information present in the sidebar.
  2. An extra paragraph of description for at-a-glance understanding of the guide landscape, which is especially useful for sequential guides such as WebXR, Web Audio, or Canvas.
  3. It makes the IA more apparent because currently the guides feel more like peripheral "stuff" that happen to be nested under the landing page, but there's no strong logical connection between them, unlike interface & its members. A "guides" section makes it clear that these guides belong to the API.

we tend to put a line at the bottom of the "Concepts and usage" section linking to the guide(s), for more information on usage.

Sure, we have some cases of doing this, but in other cases the guides are completely unlinked from the landing pages, which is the main case I'm trying to fix here. If there's already a link, then this section isn't necessary.

@chrisdavidmills
Copy link
Contributor

I already have automation to catch all such cases, so it won't be a pain. The gains OTOH:

OK, if we can fix these up automatically without too much hassle, I am less opposed to it.

Sure, we have some cases of doing this, but in other cases the guides are completely unlinked from the landing pages, which is the main case I'm trying to fix here. If there's already a link, then this section isn't necessary.

Right. I can see how this section would be more useful in cases where there are several sequential guides. In the (numerous) cases where there is only one guide, I think it is a bit pointless. Can we include it, but mark it as optional, saying when to use it and when not to, and saying what the alternative is in the "not" cases?

@Josh-Cena
Copy link
Member Author

Of course, happy to do that.

@Josh-Cena
Copy link
Member Author

@chrisdavidmills How does this look?

@chrisdavidmills
Copy link
Contributor

@chrisdavidmills How does this look?

Yup, that sounds fine. Merging!

@chrisdavidmills chrisdavidmills merged commit a6336fb into mdn:main Aug 2, 2025
8 checks passed
@Josh-Cena Josh-Cena deleted the interface-guides branch August 2, 2025 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:Meta Content in the meta docs size/s [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants