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
[@types/react] Add onResize
event to video elements
#63076
Conversation
@Semigradsky Thank you for submitting this PR! This is a live comment which I will keep updated. 1 package in this PR
@Semigradsky: I see that you have added yourself as an owner, are you sure you want to become an owner? Code ReviewsBecause this is a widely-used package, a DT maintainer will need to review it before it can be merged. You can test the changes of this PR in the Playground. Status
Once every item on this list is checked, I'll ask you for permission to merge and publish the changes. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 63076,
"author": "Semigradsky",
"headCommitOid": "c2c6a52b59ebdfc0fe847bf79c305c57acfb8235",
"mergeBaseOid": "17956ab1d255c6e739a2eed81f92e76bc60665b0",
"lastPushDate": "2022-11-04T10:11:26.000Z",
"lastActivityDate": "2022-11-04T10:37:00.000Z",
"hasMergeConflict": false,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": false,
"popularityLevel": "Critical",
"pkgInfo": [
{
"name": "react",
"kind": "edit",
"files": [
{
"path": "types/react/index.d.ts",
"kind": "definition"
},
{
"path": "types/react/test/elementAttributes.tsx",
"kind": "test"
}
],
"owners": [
"johnnyreilly",
"bbenezech",
"pzavolinsky",
"ericanderson",
"DovydasNavickas",
"theruther4d",
"guilhermehubner",
"ferdaber",
"jrakotoharisoa",
"pascaloliv",
"hotell",
"franklixuefei",
"Jessidhia",
"saranshkataria",
"lukyth",
"eps1lon",
"zieka",
"dancerphil",
"dimitropoulos",
"disjukr",
"vhfmag",
"hellatan",
"priyanshurav"
],
"addedOwners": [
"Semigradsky"
],
"deletedOwners": [],
"popularityLevel": "Critical"
}
],
"reviews": [],
"mainBotCommentID": 1303213708,
"ciResult": "pass"
} |
🔔 @johnnyreilly @bbenezech @pzavolinsky @ericanderson @DovydasNavickas @theruther4d @guilhermehubner @ferdaber @jrakotoharisoa @pascaloliv @Hotell @franklixuefei @Jessidhia @saranshkataria @lukyth @eps1lon @zieka @dancerphil @dimitropoulos @disjukr @vhfmag @hellatan @priyanshurav — please review this PR in the next few days. Be sure to explicitly select |
Inspecting the JavaScript source for this package found some properties that are not in the .d.ts files. react (unpkg)was missing the following properties:
|
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.
Thanks!
It looks like this breaks TS compatibility between our app on React 17 and a library on React 18. Can we make the same change to React 17 types? ☝️ I can fix this locally by adding the new lines from this PR to the React type defs in onRateChangeCapture?: ReactEventHandler<T> | undefined;
+ onResize?: ReactEventHandler<T> | undefined;
+ onResizeCapture?: ReactEventHandler<T> | undefined;
onSeeked?: ReactEventHandler<T> | undefined; (e.g. #62879 updates the attribute in types for React 16, 17 and 18 and didn't cause issues for us) |
Ah but the problem here is that |
Please fill in this template.
npm test <package to test>
.If changing an existing definition:
onResize
event to video elements facebook/react#21973 , https://html.spec.whatwg.org/multipage/media.html#mediaeventsCloses #63061