Skip to content

Add computed Baseline status #111

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

Merged
merged 11 commits into from
Mar 24, 2025
Merged

Conversation

rviscomi
Copy link
Contributor

@rviscomi rviscomi commented Mar 17, 2025

Progress on microsoft/vscode-css-languageservice#427

  • ran npm run update-sources
  • added compute-baseline dependency
  • added Baseline status for each feature
  • merged Baseline-supported browsers with the browsers field
  • ran npm run generate-data

I think this also fixes a bug where some pseudo-elements and pseudo-classes might have () suffixes that need to get stripped out to match the feature IDs in BCD.

See PR microsoft/vscode-css-languageservice#428 for the corresponding hovercard UI changes

@rviscomi
Copy link
Contributor Author

@microsoft-github-policy-service agree

@rviscomi rviscomi marked this pull request as ready for review March 19, 2025 20:30
@aeschli
Copy link
Contributor

aeschli commented Mar 20, 2025

We don't want to make any breaking changes to the custom data format, just additions.
The file is spec'ed and also used by other projects. So we want to keep the browsers as is.

So simply add a new 'baseline' (or `baseline-compatibility') property on the same level as browsers. The value set should be well defined, maybe an enum and a description. This can then go in the schema: https://github.com/microsoft/vscode-CSS-languageservice/blob/main/docs/customData.schema.json and also in the documentation.

@aeschli
Copy link
Contributor

aeschli commented Mar 20, 2025

@rviscomi
Copy link
Contributor Author

Thanks @aeschli. I've reverted the browsers change and added baseline to customData.schema.json. Is there a schema validator I can run to make sure it's correct?

@aeschli
Copy link
Contributor

aeschli commented Mar 20, 2025

If you open it in in VS Code you will get validation.
To validate an custom data file against your schema follow the steps here: https://code.visualstudio.com/docs/languages/json#_json-schemas-and-settings

@rviscomi
Copy link
Contributor Author

Ok great, I've added this to my local settings and I can confirm that there are no validation warnings in browsers.css-data.json:

    "json.schemas": [
        {
            "fileMatch": [
                "**/web-data/data/browsers.css-data.json"
            ],
            "url": "/Users/rviscomi/git/vscode-css-languageservice/docs/customData.schema.json"
        }
    ]

@aeschli
Copy link
Contributor

aeschli commented Mar 21, 2025

Thanks @rviscomi !

@vs-code-engineering vs-code-engineering bot added this to the March 2025 milestone Mar 21, 2025
@aeschli aeschli merged commit 298114f into microsoft:main Mar 24, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants