content icon indicating copy to clipboard operation
content copied to clipboard

Feature Policy Changed to Permissions Policy

Open jpmedley opened this issue 4 years ago • 11 comments

Per the explainer the name of Feature Policy was recently changed to Permissions Policy.

This ticket is to track needed changes to MDN and serve as a discussion channel for how and when to make those changes. Here are the needed changes:

  • [ ] Add the latest spec to SpecData.json
  • [ ] Rename feature-policy.json
  • [ ] List "alternative_name" value in same
  • [ ] Update SpecData.json
  • [ ] Change spec name in all permissions policy files
  • [ ] Update accelerometer/index.html
  • [ ] Update ambient-light-sensor/index.html
  • [ ] Update autoplay/index.html
  • [ ] Update battery/index.html
  • [ ] Update camera/index.html
  • [ ] Update display-capture/index.html
  • [ ] Update document-domain/index.html
  • [ ] Update encrypted-media/index.html
  • [ ] Update fullscreen/index.html
  • [ ] Update geolocation/index.html
  • [ ] Update gyroscope/index.html
  • [ ] Update index.html
  • [ ] Update layout-animations/index.html
  • [ ] Update legacy-image-formats/index.
  • [ ] Update magnetometer/index.html
  • [ ] Update microphone/index.html
  • [ ] Update midi/index.html
  • [ ] Update oversized-images/index.html
  • [ ] Update payment/index.html
  • [ ] Update picture-in-picture/index.html
  • [ ] Update publickey-credentials-get/index.html
  • [ ] Update screen-wake-lock/index.html
  • [ ] Update sync-xhr/index.html
  • [ ] Update unoptimized-images/index.html
  • [ ] Update unsized-media/index.html
  • [ ] Update usb/index.html
  • [ ] Update vibrate/index.html
  • [ ] Update vr/index.html
  • [ ] Update wake-lock/index.html
  • [ ] Update web-share/index.html
  • [ ] Update xr/index.html
  • [ ] Update xr-spatial-tracking/index.html
  • [ ] - [ ] Add battery/index.html
  • [ ] Add ch-device-memory/index.html
  • [ ] Add ch-downlink/index.html
  • [ ] Add ch-dpr/index.html
  • [ ] Add ch-ect/index.html
  • [ ] Add ch-lang/index.html
  • [ ] Add ch-rtt/index.html
  • [ ] Add ch-ua/index.html
  • [ ] Add ch-ua-arch/index.html
  • [ ] Add ch-ua-full-version/index.html
  • [ ] Add ch-ua-mobile/index.html
  • [ ] Add ch-ua-model/index.html
  • [ ] Add ch-ua-platform/index.html
  • [ ] Add ch-ua-platform-version/index.html
  • [ ] Add ch-viewport-width/index.html
  • [ ] Add ch-width/index.html
  • [ ] Add clipboard-read/index.html
  • [ ] Add clipboard-write/index.html
  • [ ] Add cross-origin-isolated/index.html
  • [ ] Add execution-while-not-rendered/index.html
  • [ ] Add execution-while-out-of-viewport/index.html
  • [ ] Add focus-without-user-activation/index.html
  • [ ] Add gamepad/index.html
  • [ ] Add hid/index.html
  • [ ] Add idle-detection/index.html
  • [ ] Add index.html/index.html
  • [ ] Add interest-cohort/index.html
  • [ ] Add layout-animations/index.html
  • [ ] Add legacy-image-formats/index.html
  • [ ] Add list.txt/index.html
  • [ ] Add otp-credentials/index.html
  • [ ] Add oversized-images/index.html
  • [ ] Add serial/index.html
  • [ ] Add storage-access-api/index.html
  • [ ] Add trust-token-redemption/index.html
  • [ ] Add unoptimized-images/index.html
  • [ ] Add unsized-media/index.html
  • [ ] Add vertical-scroll/index.html
  • [ ] Add vibrate/index.html
  • [ ] Add vr/index.html
  • [ ] Add wake-lock/index.html
  • [ ] Add web-share/index.html
  • [ ] Add xr/index.html

jpmedley avatar Jan 27 '21 21:01 jpmedley

I'm not able to understand what the issue is here, can someone help me?

AnandBIT avatar Feb 01 '21 15:02 AnandBIT

This is a „meta issue” which is used to keep check on all open issues with respect to a certain topic. Those will be then closed with several PRs.

Ryuno-Ki avatar Feb 01 '21 18:02 Ryuno-Ki

  1. What's the trigger/timing for this work? Firefox still uses Feature Policy.
  2. While I know that Feature Policy is entirely replaced (at least in FF) the APIs are different, and presumably some people might still need to understand the old version? Does this mean we have separate docs and deprecate/archive the Feature policy ones?

hamishwillee avatar Feb 01 '21 22:02 hamishwillee

We need to discuss how to handle these changes. Because the policy names are changing per the spec, FF and all the other browsers will eventually, need to follow. At that point, MDN should use the then current names instead of the old ones. That means redirects and notes in the BCD.

None of this is ideal, but it's the kind of thing that happens from time to time with cutting edge web features.

jpmedley avatar Feb 01 '21 22:02 jpmedley

Depends on https://github.com/mdn/browser-compat-data/issues/9556

jpmedley avatar Mar 22 '21 17:03 jpmedley

For this work, I would suggest immediately changing all the page content to talk about Permissions Policy and not Feature Policy, and then update the BCD to account for the change, marking browsers that still use the Feature Policy name with an alternative name field.

That's what we usually do in such cases, although I appreciate that the BCD changes will be a bit of a PITA.

chrisdavidmills avatar Apr 07 '21 14:04 chrisdavidmills

I'm going to submit a number of smaller PRs rather than one big one. I request that none of them be merged until all are approved.

jpmedley avatar Apr 07 '21 18:04 jpmedley

I've just been informed that API will not be directly replaced. A new API will be implemented along side the existing one. After that's deployed, the old one will be deprecated and removed.

jpmedley avatar May 11 '21 15:05 jpmedley

I believe that all occurrences of 'feature policy' have been change to 'permissions policy', where appropriate.

jpmedley avatar Jul 02 '21 02:07 jpmedley

I've just been informed that API will not be directly replaced. A new API will be implemented along side the existing one. After that's deployed, the old one will be deprecated and removed."

Probably a stupid set of questions but

  1. if the old API still exists doesn't that imply that the docs should live in parallel rather than being replaced as done above?
  2. In https://github.com/mdn/content/pull/6498 is this just a move/rename update - i.e. the files are largely the same? In that case might have been better as two commit process - one for the move and one for the content updates and then a non-squash merge. The reason being that the current approach will lose all blame history in the squash merge.

hamishwillee avatar Jul 19 '21 07:07 hamishwillee

  1. You're confusing the JavaScript API with the HTTP headers. The API is being replaced and the two APIs will exist side by side until the old one is removed. The HTTP headers were renamed outright.
  2. The proposed process will leave page content and slugs that don't match for an unknown period. Joe Medley | Technical Writer, Chrome DevRel | @.*** | 816-678-7195 If an API's not documented it doesn't exist.

On Mon, Jul 19, 2021 at 12:19 AM Hamish Willee @.***> wrote:

I've just been informed that API will not be directly replaced. A new API will be implemented along side the existing one. After that's deployed, the old one will be deprecated and removed."

Probably a stupid set of questions but

  1. if the old API still exists doesn't that imply that the docs should live in parallel rather than being replaced as done above?
  2. In #6498 https://github.com/mdn/content/pull/6498 is this just a move/rename update - i.e. the files are largely the same? In that case might have been better as two commit process - one for the move and one for the content updates and then a non-squash merge. The reason being that the current approach will lose all blame history in the squash merge.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mdn/content/issues/1831#issuecomment-882306006, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB6S7C7LJU76NJDY7INU4SLTYPGXVANCNFSM4WV623KA .

jpmedley avatar Jul 21 '21 15:07 jpmedley

Fixed via https://github.com/mdn/content/pull/22439; this should be closed.

chrisdavidmills avatar Dec 14 '22 09:12 chrisdavidmills

Closing per https://github.com/mdn/content/issues/1831#issuecomment-1350674757

Josh-Cena avatar Dec 22 '22 22:12 Josh-Cena