Skip to content

Commit

Permalink
Merge branch 'patch-1' of github.com:szepeviktor/web-features into pa…
Browse files Browse the repository at this point in the history
…tch-1
  • Loading branch information
szepeviktor committed Nov 20, 2024
2 parents 46a333a + 034db56 commit 590b850
Show file tree
Hide file tree
Showing 1,503 changed files with 40,742 additions and 26,132 deletions.
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/new-feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ body:
description: Describe the feature in one or two sentences.
validations:
required: true
- type: textarea
attributes:
label: Documentation
description: Link to documentation and demos of the feature.
validations:
required: true
- type: textarea
attributes:
label: Browser support
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/bcd_upgrade_checklist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: BCD upgrade

on:
pull_request:
types: [opened]
permissions:
pull-requests: write
jobs:
post-comment:
name: "Post checklist"
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'dependabot[bot]'
steps:
- name: Fetch Dependabot metadata
id: dependabot-metadata
continue-on-error: true
uses: dependabot/fetch-metadata@dbb049abf0d677abbd7f7eee0375145b417fdd34 #v2.2.0

- if: ${{ contains(steps.dependabot-metadata.outputs.dependency-names, '@mdn/browser-compat-data') }}
continue-on-error: true
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 #v4.0.0
with:
issue-number: ${{ github.event.number }}
body: |
Complete this checklist for every `@mdn/browser-compat-data` upgrade PR.
- [ ] Check out this branch locally.
- [ ] If any keys were removed in the release, delete them from `.yml` files and commit your changes.
- [ ] Run `npm install && npm run dist && npm test && git commit --all --message="Refresh dist" && git push`.
- [ ] Review the diff. Watch out for Baseline regressions; if applicable, add a comment (see [#1971](/web-platform-dx/web-features/issues/1971)).
- [ ] Merge this PR.
After merging, do these steps:
- [ ] Start a PR to [publish the next web-features release](https://github.com/web-platform-dx/web-features/blob/main/docs/publishing.md#regular-releases).
- [ ] [Trigger a drafts update workflow run](https://github.com/web-platform-dx/web-features/actions/workflows/update_draft_features_weekly.yml).
36 changes: 36 additions & 0 deletions .github/workflows/prepare_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Prepare web-features release

on:
workflow_dispatch:
inputs:
semverLevel:
description: "Bump to semver level"
required: true
type: choice
default: "minor"
options:
- patch
- minor
- major

jobs:
open_pr:
name: Open PR
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
git config user.name github-actions
git config user.email [email protected]
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
- run: npm ci
- name: ./scripts/release.ts init
run: npx tsx ./scripts/release.ts init --target-repo=$REPO --reviewers=$ACTOR $SEMVER_LEVEL
env:
ACTOR: ${{ github.actor }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
SEMVER_LEVEL: ${{ inputs.semverLevel }}
33 changes: 28 additions & 5 deletions .github/workflows/publish_next_web-features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
- index.ts
- scripts/build.ts

permissions:
contents: write

env:
package: "web-features"
package_dir: "packages/web-features"
Expand All @@ -33,32 +36,52 @@ jobs:
runs-on: ubuntu-latest
needs: "test"
steps:
- name: Get timestamp
id: timestamp
run: echo "TIMESTAMP=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT
- uses: actions/checkout@v4
- name: Get timestamp and short hash
id: timestamp_and_hash
run: |
echo "TIMESTAMP=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT
echo "SHORT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
registry-url: "https://registry.npmjs.org"
- run: npm ci

- run: npm run build
- run: npm run build:extended

- name: Get package.json version
id: version
run: echo "VERSION=$(npm version --json | jq --raw-output '.["${{ env.package }}"]')" >> $GITHUB_OUTPUT
working-directory: ${{ env.package_dir }}
- run: npm install
working-directory: ${{ env.package_dir }}
- run: npm version --no-git-tag-version "$VERSION-dev-$TIMESTAMP-$(git rev-parse --short HEAD)"
- run: npm version --no-git-tag-version "$VERSION-dev-$TIMESTAMP-$SHORT_HASH"
# The version string template is: <package.json version>-dev-<timestamp>-<commit-hash>
# Why not use SemVer build metadata with a plus sign for some of this?
# Because npm completely ignores it. 😒
working-directory: ${{ env.package_dir }}
env:
VERSION: ${{ steps.version.outputs.VERSION }}
TIMESTAMP: ${{ steps.timestamp.outputs.TIMESTAMP }}
TIMESTAMP: ${{ steps.timestamp_and_hash.outputs.TIMESTAMP }}
SHORT_HASH: ${{ steps.timestamp_and_hash.outputs.SHORT_HASH }}
- run: npm publish --tag ${{ env.dist_tag }}
working-directory: ${{ env.package_dir }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish pre-release on GitHub
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 #v2.0.8
with:
files: |
schemas/data.schema.json
${{ env.package_dir }}/data.json
data.extended.json
prerelease: true
name: web-features@next
body: This is a continuously-updated prerelease generated from `main` (currently at ${{ steps.timestamp_and_hash.outputs.SHORT_HASH }}).
tag_name: ${{ env.dist_tag }}
fail_on_unmatched_files: true
16 changes: 15 additions & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: crate-ci/typos@master
- run: |
set -o pipefail
mkdir -p "${{ runner.temp }}/typos"
RELEASE_ASSET_URL="$(
gh api /repos/crate-ci/typos/releases/latest \
--jq '."assets"[] | select(."name" | test("^typos-.+-x86_64-unknown-linux-musl\\.tar\\.gz$")) | ."browser_download_url"'
)"
wget --quiet --output-document=- "${RELEASE_ASSET_URL}" \
| tar -xz -C "${{ runner.temp }}/typos" ./typos
git grep --files-with-matches --null -I -e '.' \
| xargs --null --verbose -- "${{ runner.temp }}/typos/typos" --format json \
| jq --raw-output '"::warning file=\(.path),line=\(.line_num),col=\(.byte_offset)::\"\(.typo)\" should be \"" + (.corrections // [] | join("\" or \"") + "\".")' \
|| true
env:
GH_TOKEN: ${{ github.token }}
env:
FORCE_COLOR: 3
9 changes: 6 additions & 3 deletions .github/workflows/update_draft_features_weekly.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
name: Update Draft Features

on:
# Runs at midnight on Mondays 05:30 UTC, or manually triggered
# Runs at midnight on Mondays and Thursdays 05:30 UTC, or manually triggered
schedule:
- cron: "30 5 * * 1"
- cron: "30 5 * * 1,4"
workflow_dispatch:

jobs:
update-drafts:
if: github.repository == 'web-platform-dx/web-features'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -24,10 +25,12 @@ jobs:
add-paths: |
features/draft/spec/
commit-message: Update draft features
title: "Update draft features weekly"
title: "Update draft features"
body: |
This is an auto-generated PR with draft features by spec updates.
To let the tests run, close this PR then immediately reopen it.
See https://github.com/web-platform-dx/web-features/blob/main/.github/workflows/update_draft_features_weekly.yml for details.
labels: |
generated
Expand Down
4 changes: 3 additions & 1 deletion GOVERNANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,11 @@ Inactive _Peers_ (no activity on the project for months or more) might be marked

- Adriana Jara ([@tropicadri](https://github.com/tropicadri))
- Brian Kardell ([@bkardell](https://github.com/bkardell))
- Dietrich Ayala ([@autonome](https://github.com/autonome/))
- James Stuckey Weber ([@jamesnw](https://github.com/jamesnw))
- Mariko Kosaka ([@kosamari](https://github.com/kosamari))
- Patrick Brosset ([@captainbrosset](https://github.com/captainbrosset))
- Pete LePage ([@petele](https://github.com/petele))
- Mariko Kosaka ([@kosamari](https://github.com/kosamari))

A _Peer_ who shows an above-average level of contribution to the project, particularly with respect to its strategic direction and long-term health, may be nominated to become an _Owner_, described below.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

By the [W3C WebDX Community Group](https://www.w3.org/community/webdx/) and contributors.

`web-features` is an effort to build a shared catalog of features of the web platform.
[`web-features`](https://web-platform-dx.github.io/web-features/web-features/) is an effort to build a shared catalog of features of the web platform.
By creating a common list of features and their definitions, `web-features` aims to improve understanding of what web developers get and want from the web.
`web-features` does this by:

Expand Down
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ There are multiple ways to contribute to the web-features repository, such as:
* Adding a missing feature to the repository, from scratch.
* Adding a missing feature to the repository, by updating a feature that was already drafted.
* Updating an existing feature, for example to change its name, description, support data, or other fields.
* Reviewing a pull request that was submitted by someone else, to check if the feature is correctly authored.
* [Reviewing a pull request](./reviewing.md) that was submitted by someone else, to check if the feature is correctly authored.

In any case, **thank you** for wanting to help. This document will guide you through the process of contributing to the web-features repository.

Expand Down
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

* To learn to contribute to the web-features project, see [Contributing to the web-features project](./CONTRIBUTING.md).
* For guidelines on writing features, see [Feature guidelines](./guidelines.md).
* For guidelines on reviewing and merging changes, see [Pull request and issue management](./reviewing.md).
* For information about what Baseline is and how Baseline status is calculated, see [Baseline](./baseline.md).
2 changes: 1 addition & 1 deletion docs/baseline.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ This is but one of several possible stories to help keep in mind the needs and c
The WebDX community group, through the [web-platform-dx/web-features-set owners group](../GOVERNANCE.md), maintains this document.
Based on WebDX community group research, the web-features owners group decides matters such as the core browser set, releases, editorial overrides, and so on.

The status definition is due for review by the governance group on 7 November 2024.
The status definition is due for review by the governance group on 1 June 2025.

## Status definition

Expand Down
40 changes: 33 additions & 7 deletions docs/guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ Feature authors should (in descending order of priority):
- 👍 Recommended: Grid
- 👎 Not recommended: `display: grid`

- Prefer sentence case.
Avoid capitalizing ordinary nouns, but preserve case when it's meaningful.

- 👍 Recommended: Typed arrays
- 👎 Not recommended: Typed Arrays
- 👍 Recommended: View transitions
- 👎 Not recommended: View Transitions
- 👍 Recommended: WebDriver BiDi
- 👎 Not recommended: Webdriver bidi

- Prefer frequently-used qualifiers in parentheses at the end of the name.

- 👍 Recommended: Arrays (initial support)
Expand Down Expand Up @@ -185,6 +195,18 @@ Omit "is used" where there's no loss in meaning.
For example, prefer "The feature reads…" over "The feature is used to read…"
([#727](https://github.com/web-platform-dx/web-features/pull/727#discussion_r1537635981))

#### longhands and shorthands

Use the terms "shorthand" and "longhand" to describe the relationship between CSS properties that combine multiple properties into a single declaration and the individual properties.

Avoid using "shorthand" and "longhand" without the word "property":

* Prefer "The `text-wrap` CSS property is a shorthand" over "The `text-wrap` CSS shorthand".
* Prefer "It is a longhand property of" over "It is a longhand of".

Avoid the phrase "constituent properties" for longhand properties, even though this is common on MDN Web Docs.
([#1764](https://github.com/web-platform-dx/web-features/pull/1764#discussion_r1777335770))

#### platform

"platform" is often vague.
Expand Down Expand Up @@ -250,17 +272,17 @@ Follow these guidelines when setting a `caniuse` value:
- Do not set a `caniuse` value if the Can I Use feature is merely related to the feature.
For example, in [`grid.yml`](../features/grid.yml), do not set `caniuse: css-subgrid`.

- Do not set a `caniuse` value if the top-level headline `status` would not be accurate with respect to the table on Can I Use.
For example, if Can I Use shows that a core browser set browser does not support a feature but web-features's status reports that the feature is Baseline high, then do not set the `caniuse` value for that feature.
- Do not set a `caniuse` value if the top-level headline `status` does not match Can I Use on whether each browser supports or does not support the feature.

- Do not set a `caniuse` value if the top-level headline status's first-supported release (for example, the value of `status.support.safari`) differs from Can I Use's first-supported release by:
For example, if Can I Use shows that one browser of the core browser set does not support a feature but web-features's status reports that the feature is supported across all of the browsers, then do one of these:

- More than one release for releases since 2020
- More than one year for releases before 2020
- Do not set the `caniuse` value for that feature.
- Submit a correction to Can I Use.
- Submit a correction to mdn/browser-compat-data.

This means there's a major disagreement—and a likely error—in mdn/browser-compat-data or Can I Use.
- Do not set a `caniuse` value if the top-level headline `status` would not accurately reflect when a feature was last introduced to core browser set (the [keystone release](./baseline.md#interoperable-low-status) version number).

If you see a discrepancy between Can I Use and a computed status that is less than one year for releases before 2020, please make a note of it in [#1499](https://github.com/web-platform-dx/web-features/issues/1499).
For example, if Can I Use shows that Edge 79 introduced a feature, then the headline status must also show that Edge 79 introduced the feature.

- Do use `compute_from` to improve the correspondence of a feature's top-level headline status with Can I Use data.
Use this in cases where later additions, such as the introduction of a minor property or method, brings the statuses out of alignment.
Expand All @@ -270,6 +292,10 @@ Follow these guidelines when setting a `caniuse` value:
Don't use `compute_from` in a way that would not make sense if the corresponding `caniuse` value didn't exist (for example, by pinning support before the introduction of an essential component of the feature).
In such situations, it's better to comment out the `caniuse` value, make a `TODO` comment, and open an issue about why you did it.

If you see a discrepancy between Can I Use and a computed status that is less than one year for releases before 2020, please make a note of it in [#1499](https://github.com/web-platform-dx/web-features/issues/1499).

See also: [#1880](https://github.com/web-platform-dx/web-features/issues/1880).

## Groups

The `group` field references one or more groups.
Expand Down
Loading

0 comments on commit 590b850

Please sign in to comment.