-
Notifications
You must be signed in to change notification settings - Fork 832
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
Add missing prop types #1761
Add missing prop types #1761
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/mui-org/material-ui-pickers/ab57z1k72 |
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
@@ -183,3 +184,5 @@ export const DateRangePickerInput: React.FC<DateRangeInputProps> = ({ | |||
</div> | |||
); | |||
}; | |||
|
|||
DateRangePickerInput.propTypes = inputPropTypes; |
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.
Is the inputPropTypes
import pruned from the bundle?
What do you think of duplicating the information in the propTypes (no imports)? This could be one step closer to how we automatically generate the prop types from the typescript definitions in the main repository.
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.
process.env.NODE_ENV !== "production" ? PureDateInput.propTypes = inputPropTypes : void 0;
From build code. Do you think we should duplicate it?
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.
I'm asking because, in the core, we are from time to time using prop-types helpers:
- exactProp
- chainPropTypes
- elementAcceptingRef
- elementTypeAcceptingRef
- refType
- deprecatedPropType
- requiredPropFactory
- unsupportedProp
It seems that none of the imports are pruned in people bundle (removing X.propTypes = Y not being enough). But to be confirmed.
Codecov Report
@@ Coverage Diff @@
## next #1761 +/- ##
==========================================
+ Coverage 90.70% 90.74% +0.03%
==========================================
Files 77 77
Lines 2324 2333 +9
Branches 420 439 +19
==========================================
+ Hits 2108 2117 +9
Misses 174 174
Partials 42 42
Continue to review full report at Codecov.
|
This PR closes #1750