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

No checking for support info order #1996

Closed
connorshea opened this issue May 8, 2018 · 1 comment
Closed

No checking for support info order #1996

connorshea opened this issue May 8, 2018 · 1 comment
Labels
duplicate Duplicate issues or pull requests. This one is closed in favor of the other issue or pull request.

Comments

@connorshea
Copy link
Contributor

On the ServiceWorker page, this happens:

screen shot 2018-05-08 at 2 45 48 pm

The problem here is that the support array first has the information about Edge 16, where the feature is supported behind a flag, and then subsequently has information about Edge 17, where it's fully supported by default.

The ServiceWorker.json file has these lines:

"edge": [
{
"version_added": "16",
"flags": [
{
"type": "preference",
"name": "Enable service workers"
}
]
},
{
"version_added": "17"
}
],

The reason this is a problem is because Kumascript assumes that the support array will have the proper support info first, which in this case doesn't happen.

See these lines in kumascript:

// the first entry should be the most relevant/recent and will be treated as "the truth"
checkSupport(supportInfo[0].version_added, supportInfo[0].version_removed);

If we make this assumption, we should try to enforce it with the linter somehow, though I'm not sure how you'd go about doing that. 🤔

Here's an example where it works properly

From the flex page

screen shot 2018-05-08 at 2 53 00 pm

"firefox": [
{
"version_added": "20",
"notes": [
"Since Firefox 28, multi-line flexbox is supported.",
"Before Firefox 32, Firefox wasn't able to animate values starting or stopping at <code>0</code>."
]
},
{
"prefix": "-webkit-",
"version_added": "49"
},
{
"prefix": "-webkit-",
"version_added": "44",
"flags": [
{
"type": "preference",
"name": "layout.css.prefixes.webkit",
"value_to_set": "true"
}
]
},
{
"version_added": "18",
"version_removed": "28",
"flags": [
{
"type": "preference",
"name": "layout.css.flexbox.enabled",
"value_to_set": "true"
}
]
}
],

@connorshea
Copy link
Contributor Author

Duplicate of #1596.

@queengooborg queengooborg added duplicate Duplicate issues or pull requests. This one is closed in favor of the other issue or pull request. invalid Invalid issues or pull requests (wrong repo, spam, duplicates, etc.). This won't get merged. Sorry! labels Aug 18, 2019
@queengooborg queengooborg removed the invalid Invalid issues or pull requests (wrong repo, spam, duplicates, etc.). This won't get merged. Sorry! label Jun 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Duplicate issues or pull requests. This one is closed in favor of the other issue or pull request.
Projects
None yet
Development

No branches or pull requests

2 participants