-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
react-native-calendars: Add missing enableSwipeMonths prop #46376
react-native-calendars: Add missing enableSwipeMonths prop #46376
Conversation
@jdmunro Thank you for submitting this PR! This is a live comment which I will keep updated. Code ReviewsBecause you edited one package and updated the tests (👏), I can help you merge this PR once someone else signs off on it. Status
All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 46376,
"author": "jdmunro",
"owners": [
"Tyler-Zhang",
"DavidNorena",
"FabianMeul"
],
"dangerLevel": "ScopedAndTested",
"headCommitAbbrOid": "96d7063",
"headCommitOid": "96d7063b1b6df70a76194ea88d719639adb4ff65",
"mergeIsRequested": true,
"stalenessInDays": 0,
"lastPushDate": "2020-07-28T07:46:45.000Z",
"lastCommentDate": "2020-07-30T16:20:28.000Z",
"maintainerBlessed": false,
"reviewLink": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/46376/files",
"hasMergeConflict": false,
"authorIsOwner": false,
"isFirstContribution": false,
"popularityLevel": "Well-liked by everyone",
"anyPackageIsNew": false,
"packages": [
"react-native-calendars"
],
"files": [
{
"path": "types/react-native-calendars/index.d.ts",
"kind": "definition",
"package": "react-native-calendars"
},
{
"path": "types/react-native-calendars/react-native-calendars-tests.tsx",
"kind": "test",
"package": "react-native-calendars"
}
],
"hasDismissedReview": false,
"ciResult": "pass",
"lastReviewDate": "2020-07-30T16:18:00.000Z",
"reviewersWithStaleReviews": [],
"approvalFlags": 2,
"isChangesRequested": false
} |
🔔 @Tyler-Zhang @DavidNorena @FabianMeul — please review this PR in the next few days. Be sure to explicitly select |
👋 Hi there! I’ve run some quick measurements against master and your PR. These metrics should help the humans reviewing this PR gauge whether it might negatively affect compile times or editor responsiveness for users who install these typings. Let’s review the numbers, shall we? Comparison details 📊
It looks like nothing changed too much. I won’t post performance data again unless it gets worse. |
@jdmunro Perhaps it would be cleaner to extend the CalendarProps? I.e type CalendarProps = CalendarMarkingProps & CalendarBaseProps & {
enableSwipeMonths?: boolean;
}
export class Calendar extends React.Component<CalendarProps> { } |
941b00f
to
96d7063
Compare
Indeed that's much simpler @Tyler-Zhang - I've made the changes thanks! |
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
@jdmunro Everything looks good here. Great job! I am ready to merge this PR on your behalf. If you'd like that to happen, please post a comment saying:
and I'll merge this PR almost instantly. Thanks for helping out! ❤️ (@Tyler-Zhang, @DavidNorena, @FabianMeul: you can do this too.) |
Ready to merge |
…enableSwipeMonths prop by @jdmunro
…enableSwipeMonths prop by @jdmunro
Please fill in this template.
npm test
.)npm run lint package-name
(ortsc
if notslint.json
is present).A little more explanation for the changes:
CalendarBaseProps
forCalendarListBaseProps
directly anymore becauseenableSwipeMonths
is not compatible withCalendarList
. Therefore I opted to pick the properties we actually want, rather than trying to exclude only the one we don't - it's a bit safer this way for future versions. Happy to reimplement this if other's disagree though 😄