-
Notifications
You must be signed in to change notification settings - Fork 524
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
feat(compat): migrate BCD table to Web Component #12580
base: main
Are you sure you want to change the base?
Conversation
c6e3fed
to
6f02696
Compare
Bundle StatsHey there, this message comes from a github action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
View detailed bundle breakdownAdded
Removed
Bigger No assets were bigger Smaller
Unchanged
|
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.
Some initial lit/jsdoc notes:
There's a few // @tsignore
s in here which don't fill me with joy
I'd also suggest adopting the convention I've taken with lit components which is to prefix all internal state/properties/methods/etc. with _
: it makes it super clear which are supposed to be used externally, which are lit-defined lifecycle methods, and which is "our stuff"
Used GPT-o3-mini-high and refined manually.
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.
Looks good! Limited my review to the code, rather than testing.
I pushed a commit to tighten up a few of the types and remove most of the @ts-ignore
s: to do this I had to move a few of the types back into a typescript file, jsdoc just doesn't provide the same ability to define types: perhaps we want to move all the @typedef
s back to typescript?
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.
Initial thought is that this is a big file/component, but I'm not sure if/where it really makes sense to split it up.
Summary
Migrates the Browser compatibility table to a Lit-powered Web Component, and applies some enhancements:
window.open()
(to avoid issue spam), and it is accompanied by a "View data on GitHub" link (fixes From the Browser compatibility tables, link to the actual JSON data in BCD #6596)..0
in version numbers (to save space in the Node.js column).Screenshots
Large
Before
After
Medium
Before
After
Small
How did you test this change?
yarn dev
and checked http://localhost:3000/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#browser_compatibility, among others.