Remove Page macro: Feature-Policy accelerometer et al#5240
Remove Page macro: Feature-Policy accelerometer et al#5240
Conversation
|
@wbamberg Could you please review this. While it looks like a lot, in fact it is mostly copy-paste. So if you are happy with the way allowlist looks for one of the docs you can be sure it will be fine for the rest. Other than that the fixes get compat from BCD, and the spec if present. That stuff also easy to review - and I have tested it. |
|
Sorry to be slow looking at this. I think in a case like this it's better to write the thing once in (in https://pr5240.content.dev.mdn.mozit.cloud/en-US/docs/Web/HTTP/Headers/Feature-Policy#syntax probably) and link to it from the directive pages. The reason is that this is really always the same thing in all the directives, so learning it for one directive means learning it for all of them. By linking to a single definition this is made obvious to the reader. By duplicating it, it's not: they might be similar but subtly different, and a reader has to have that possibility in mind. I don't feel terribly strongly about this though. I'm not sure what to do about the duplication in https://developer.mozilla.org/en-US/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy#allowlist. Probably keep it, since it's guide not reference content. |
…rent. Fix up feature-policy to use BCD data for compat (and spec where defined)
95e1fba to
220fb65
Compare
|
@wbamberg Thanks for the review - hard to fit everything in :-). Much as I hate to say it, I agree. Have fixed up as you suggested, leaving the "Using" Guide topic unchanged. Ready for re-review. |
files/en-us/web/http/headers/feature-policy/fullscreen/index.html
Outdated
Show resolved
Hide resolved
wbamberg
left a comment
There was a problem hiding this comment.
Thanks for making these updates @hamishwillee . I like it much better like this. There was one where you changed the default policy, and a few that still have the duplicated version.
files/en-us/web/http/headers/feature-policy/document-domain/index.html
Outdated
Show resolved
Hide resolved
files/en-us/web/http/headers/feature-policy/unoptimized-images/index.html
Outdated
Show resolved
Hide resolved
files/en-us/web/http/headers/feature-policy/unsized-media/index.html
Outdated
Show resolved
Hide resolved
|
Thanks @wbamberg - sorry about those. All fixed now I believe. |
wbamberg
left a comment
There was a problem hiding this comment.
Thanks @hamishwillee , this looks great. I'm happy the review's useful :)
@wbamberg Well, it does ruin my air of infallibility. Amazing how careful you can think you're being and still miss the bleedingly obvious :-( |
Partial fix for #3196
Feature policies like Feature-Policy: accelerometer previously imported the standard definition of
allowlistfrom Using Feature Policy.My take on this is that the
allowlistis important to have in each of the policies, and it should be duplicated rather than linked. This is partially based on the fact that Feature-Policy is "soon" to be replaced by Permission-Policy (on MDN) so there will be no further modification of the content - ie duplication creates no maintenance issue.This duplicates the same text for allowlist in each policy. This test is a minor modification of the original. In particular it does not mention the generic "all features have a default value" as that is not necessary to mention here.
Further this fixes up the tags for Experimental, and uses browser-compat for compatibility and specs, where supported by BCD.