-
Notifications
You must be signed in to change notification settings - Fork 2.3k
fix: #4558 Rename calendarIconClassname props to calendarIconClassName props #4643
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
Conversation
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.
✅ This pull request was sent to the PullRequest network.
@yuki0410-dev you can click here to see the review status or cancel the code review job.
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.
PullRequest Breakdown
Reviewable lines of change
+ 78
- 5
69% JavaScript (tests)
29% JavaScript
2% Markdown
Type of change
Fix - These changes are likely to be fixing a bug or issue.
This may be a breaking change, what's the benefit of doing this? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4643 +/- ##
=======================================
Coverage 97.34% 97.35%
=======================================
Files 23 23
Lines 2603 2606 +3
Branches 1109 1124 +15
=======================================
+ Hits 2534 2537 +3
Misses 69 69 ☔ View full report in Codecov by Sentry. |
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.
The change itself is good but this would break existing apps using react-datepicker
that are using the old prop name. So this would likely need to either be versioned correctly or perhaps add a deprecation period for the old calendarIconClassname
until users have migrated to calendarIconClassName
Ex: A quick look through github search shows some example apps that would break if they update their dependency:
https://github.com/search?q=%22react-datepicker%22+%22calendarIconClassname%22&type=code
Reviewed with ❤️ by PullRequest
@martijnrusschen
|
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 tried to make the old props apply if you are not using the new props. |
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 tried to make the old props apply if you are not using the new props.
I also tried to output console.warn if you are using the old properties, what do you think?
I'm not certain what the project's guidelines are around console statements since they are usually removed for production code. I think some sort of notice of deprecation in the README would be nice or even removing the calendarIconClassname
in the README and let it silently work for existing projects but ensure future projects only use calendarIconClassName
. These are likely decisions to be made by the project owner though since there are many different ways to accomplish deprecating fields.
Thanks for the review.
Agreed. However, since console.warn is often not deleted in development builds, I think it makes sense to leave the message in console.warn.
Agreed. @martijnrusschen |
There are currently 3 PRs in the list that contain breaking changes. Happy to make a major version upgrade if we can get all 3 merged. |
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.
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.
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.
Due to inactivity, PullRequest has cancelled this review job. You can reactivate the code review job from the PullRequest dashboard.
Hello This one will be major, so you can update your PR to include it in the release |
@yuki0410-dev Can you merge the latest main branch to make sure this PR is still compatible? |
@martijnrusschen |
Description
Linked issue: close #4558
Problem
See issue #4558
Changes
fix props : calendarIconClass
n
ame => calendarIconClassN
ameScreenshots
To reviewers
Contribution checklist