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

Add spec URLs for all remaining subtrees #13273

Merged
merged 1 commit into from
May 14, 2022

Conversation

sideshowbarker
Copy link
Member

Part of #13126

@sideshowbarker sideshowbarker requested a review from a team as a code owner February 25, 2022 10:39
@sideshowbarker sideshowbarker requested review from ddbeck and removed request for a team February 25, 2022 10:39
@github-actions github-actions bot added Content:Learn Learning area docs Content:Other Any docs not covered by another "Content:" label Content:wasm WebAssembly docs labels Feb 25, 2022
@github-actions

This comment was marked as outdated.

@sideshowbarker sideshowbarker force-pushed the sideshowbarker/spec-urls-other branch 2 times, most recently from 4ca3851 to 8596935 Compare February 25, 2022 18:36
@sideshowbarker sideshowbarker requested a review from a team as a code owner February 25, 2022 18:36
@sideshowbarker sideshowbarker requested review from estelle and removed request for a team February 25, 2022 18:36
@github-actions github-actions bot added the Content:HTML Hypertext Markup Language docs label Feb 25, 2022
@wbamberg
Copy link
Collaborator

I would like us to think more about whether we should use the spec-urls front matter key for unstructured guide pages.

My conception of these front matter keys is that they are for reference pages that must follow a particular structure, which flows from the fact that they document a thing that has a number of attributes. So say, a CSS property always has BCD and a spec reference and a set of examples, and then front matter is a concise way to list references to some of those things.

But a page like https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts is a guide page: it has no structure and no mandatory elements. Which elements it contains is just a matter for the author to choose. So deciding to include a spec table seems like an ad hoc choice by the author, and it feels like a better fit would be an ad hoc mechanism for including it. This might be {{Specifications("https://my/spec.url")}}, or we might just say that spec tables (in the form that {{Specifications}} renders them) are not for guide pages at all, and spec URLs can just be referenced in prose: "Secure contexts are described in the https://my/spec.url specification" or something.

Maybe this just seems too theoretical a concern. A couple of ways it gets more concrete are:

  • because guide pages have no structure, an author might want to include multiple tables in different places in the doc. spec-urls can't handle this. So we would anyway need provision for real ad hoc spec tables, so (unless we effectively ban spec tables in guide pages) we would anyway need to support {{Specifications("https://my/spec.url")}}.

  • in some future it would be really nice to have a description of reference page structure that describes the elements a page must/may contain, and the order in which they come. If we did that we could get rid of {{Specifications}} and {{Compat}} entirely (at the moment their only purpose is to tell Yari where to put the thing). But this will never work for guide pages. So we will never be able to remove {{Specifications}} for guide pages.

So given that, if we want guide pages to contain spec tables:

  1. we will always need to support {{Specifications("https://my/spec.url")}}
  2. we will never be able to remove the argument-less {{Specifications}} macro for any guide pages

....it seems like we might as well have all guide pages use the {{Specifications("https://my/spec.url")}} form.

I know this probably feels like a very theoretical thing and I'm sorry to be bringing stop energy to this work :(. I'm just keen to ensure that it fits in with the overall direction we want to take.

@sideshowbarker

This comment was marked as outdated.

@sideshowbarker sideshowbarker force-pushed the sideshowbarker/spec-urls-other branch from 995e1da to 2b5ee6b Compare February 28, 2022 08:48
@queengooborg
Copy link
Collaborator

Is this still blocked? I assume this is ready for review?

@sideshowbarker sideshowbarker force-pushed the sideshowbarker/spec-urls-other branch from 2b5ee6b to 65e5344 Compare May 14, 2022 08:18
@sideshowbarker
Copy link
Member Author

Is this still blocked? I assume this is ready for review?

This had an add-Reference-tag change similar to some of the related PRs, but I’ve now removed that and rebased this and I have no further changes —

Copy link
Collaborator

@queengooborg queengooborg left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@queengooborg queengooborg merged commit 371ea22 into main May 14, 2022
@queengooborg queengooborg deleted the sideshowbarker/spec-urls-other branch May 14, 2022 09:13
hamishwillee pushed a commit to hamishwillee/content that referenced this pull request May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:HTML Hypertext Markup Language docs Content:Learn Learning area docs Content:Other Any docs not covered by another "Content:" label Content:wasm WebAssembly docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants