-
Notifications
You must be signed in to change notification settings - Fork 513
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
fix(bcd): show previous version in range when feature was removed #7589
fix(bcd): show previous version in range when feature was removed #7589
Conversation
That looks much better! |
client/src/document/ingredients/browser-compatibility-table/utils.ts
Outdated
Show resolved
Hide resolved
5d1d34f
to
afda565
Compare
afda565
to
78ecb21
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just two nits (I think).
client/src/document/ingredients/browser-compatibility-table/utils.ts
Outdated
Show resolved
Hide resolved
client/src/document/ingredients/browser-compatibility-table/utils.ts
Outdated
Show resolved
Hide resolved
Thank you @danielhjacobs! 🎉 |
Hm, for some reason it doesn't work on prod (although deployed): https://developer.mozilla.org/en-US/docs/Web/API/DocumentType#browser_compatibility 🤔 |
It looks like That's because retired releases are not added to the Lines 199 to 211 in 9a46d54
edit: And the BCD data itself is extracted here: yari/build/document-extractor.ts Lines 424 to 507 in 837e5d0
|
Well that function seems useful, could avoid the I assume the right thing to do then would be to add yari/build/document-extractor.ts Lines 474 to 476 in 837e5d0
Also adding yari/build/document-extractor.ts Lines 14 to 17 in 837e5d0
At that part of the code, are all the browser releases available in If so, that would the right place for this function. I assume yari/client/src/document/ingredients/browser-compatibility-table/utils.ts Lines 197 to 212 in 9a46d54
Then switching this to yari/client/src/document/ingredients/browser-compatibility-table/feature-row.tsx Lines 139 to 142 in 9a46d54
|
I do notice you're currently editing that part of the codebase in #7612 |
Opened #7614 |
Summary
Fixes #6667
Problem
The version range showed the version where support was removed as well, which was confusing.
Solution
Get version before that version using a helper function, and show that version number instead.
Screenshots
Before
https://developer.mozilla.org/en-US/docs/Web/API/DocumentType#browser_compatibility
After
http://localhost:3000/en-US/docs/Web/API/DocumentType#browser_compatibility