Conversation
| // has ever understood has to keep working. Evolve the format by adding a branch in | ||
| // `hydrate`, never by redefining a version that has already shipped. | ||
|
|
||
| const MDN_URL = 'https://developer.mozilla.org/en-US/docs/Web/'; |
There was a problem hiding this comment.
This file needs to be updated to include latest changes in whatwg/whatwg.org#506, see comments in whatwg/wattsi#170
| // comes from CSS, keyed off the browser id in the row's class. | ||
| function browserRow(slot, cell) { | ||
| const { state, version, title } = readCell(cell, slot); | ||
| return element('span', { class: `${slot.id} ${state}` }, |
There was a problem hiding this comment.
bikeshed/mdn/mdn-anno.css is missing a rule for .unknown.
| # feature = slug "|" level "|" cells ["|" caniuse-feature "," caniuse-title] | ||
| code = cleanCodeText(feature["slug"]) + "|" |
There was a problem hiding this comment.
This needs a change similar to whatwg/wattsi@efcb210 to fix the broken links issue.
| if "prefix" in support or "alternative_name" in support: | ||
| caveat = "$" | ||
| elif "partial_implementation" in support: | ||
| caveat = "*" | ||
| elif "flags" in support: | ||
| caveat = "^" |
There was a problem hiding this comment.
I think flag > prefix > partial is better. Some features have 2 applied (partial + prefix, flag + prefix or flag + partial).
| if "prefix" in support or "alternative_name" in support: | |
| caveat = "$" | |
| elif "partial_implementation" in support: | |
| caveat = "*" | |
| elif "flags" in support: | |
| caveat = "^" | |
| if "flags" in support: | |
| caveat = "^" | |
| elif "prefix" in support or "alternative_name" in support: | |
| caveat = "$" | |
| elif "partial_implementation" in support: | |
| caveat = "*" |
There was a problem hiding this comment.
I'm fine with that order. Wrt your last sentence, do you mean that a cell can have multiple caveats? Or just that a support entry can have multiple caveat-causing things, and you prefer this particular order of processing?
| def encodeFeatureData(features: list[MdnFeatureT]) -> str: | ||
| fullCode = "v1|" + ("~".join(codeFromFeature(x) for x in features)) | ||
| return fullCode |
There was a problem hiding this comment.
Distinct BCD features can share an MDN page and identical support data. This could deduplicate identical records. (whatwg/wattsi#170 now does.)
| def encodeFeatureData(features: list[MdnFeatureT]) -> str: | |
| fullCode = "v1|" + ("~".join(codeFromFeature(x) for x in features)) | |
| return fullCode | |
| def encodeFeatureData(features: list[MdnFeatureT]) -> str: | |
| # Deduplicate | |
| codes = dict.fromkeys(codeFromFeature(x) for x in features) | |
| return "v1|" + "~".join(codes) |
|
Comment by Claude:
|
Bikeshed uses 6px too as of speced/bikeshed#3324. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Regression: some features had a small description previously, but that seems to no longer be part of the code format.