Skip to content
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 API overview sidebars #22468

Merged
merged 1 commit into from
Nov 22, 2022
Merged

Fix API overview sidebars #22468

merged 1 commit into from
Nov 22, 2022

Conversation

wbamberg
Copy link
Collaborator

@wbamberg wbamberg commented Nov 22, 2022

This PR fixes all the "web-api-overview" pages under Web/API which erroneously use "APIRef" instead of "DefaultAPISidebar".

Except for https://developer.mozilla.org/en-US/docs/Web/API/Constraint_validation.

@wbamberg wbamberg requested review from a team as code owners November 22, 2022 00:49
@wbamberg wbamberg requested review from jpmedley and bsmth and removed request for a team November 22, 2022 00:49
@github-actions github-actions bot added the Content:WebAPI Web API docs label Nov 22, 2022
@github-actions
Copy link
Contributor

Preview URLs (6 pages)
Flaws (6)

Note! 5 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Web/API/Media_Capture_and_Streams_API
Title: Media Capture and Streams API (Media Stream)
Flaw count: 6

  • macros:
    • /en-US/docs/Web/API/MediaDeviceKind does not exist
    • /en-US/docs/Web/API/MediaTrackCapabilities does not exist
    • /en-US/docs/Web/API/NavigatorUserMedia does not exist
    • /en-US/docs/Web/API/NavigatorUserMediaError does not exist
  • bad_bcd_links:
    • no explanation!
    • no explanation!

@wbamberg
Copy link
Collaborator Author

I started mdn/mdn-community#291 for Constraint Validation.

@bsmth
Copy link
Member

bsmth commented Nov 22, 2022

Aside from the Push API page, the preview pages look better. I had to look up the macro to find out what it does, but I could still do with hints when to use this over other. Do we need to add anything to the sidebar docs for this?

The Prettier formatting looks good.

@wbamberg
Copy link
Collaborator Author

wbamberg commented Nov 22, 2022

Aside from the Push API page, the preview pages look better. I had to look up the macro to find out what it does, but I could still do with hints when to use this over other.

API overview pages (that is, pages with page-type: web-api-overview) should use {{DefaultAPISidebar}}, and all other pages should use {{APIRef}}.

A long time ago I wrote up a kind of guide to them: https://discourse.mozilla.org/t/defaultapisidebar-apiref-and-groupdata/40210 but I don't know if there is anything comparable on MDN.

Do we need to add anything to the sidebar docs for this?

Those docs are hopelessly inadequate, so probably. Sidebars for Web/API are ridiculously complicated. Ruth and I proposed a much simpler solution in openwebdocs/project#76 but it doesn't seem to be going anywhere at the moment.

(I suppose, rather than write more meta-docs, I'd like to put time into simplifying our sidebar system. Which sidebar to use for what page shouldn't even be an authorial choice.)

@bsmth
Copy link
Member

bsmth commented Nov 22, 2022

Thank you for the explanation!

Copy link
Member

@bsmth bsmth left a comment

Choose a reason for hiding this comment

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

Looks good, thank you! I'm happy to merge when you are.

@wbamberg wbamberg merged commit 3dbc1d7 into mdn:main Nov 22, 2022
hamishwillee pushed a commit to hamishwillee/content that referenced this pull request Dec 12, 2022
@wbamberg wbamberg deleted the fix-bad-apiref branch April 5, 2023 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants