Conversation
| } | ||
|
|
||
| .react-datepicker__week { | ||
| white-space: nowrap; |
There was a problem hiding this comment.
have you confirmed this works responsively?
|
@philipkocanda @iMartzen great initiative and excited to see this coming back. Once you mark the PR as ready for review it will be sent to the pullrequest network as well. |
|
Please check the CI output. The linter is failing because of unused imports. |
Codecov Report
@@ Coverage Diff @@
## main #4288 +/- ##
==========================================
- Coverage 96.67% 95.27% -1.40%
==========================================
Files 27 28 +1
Lines 2373 2478 +105
Branches 952 1003 +51
==========================================
+ Hits 2294 2361 +67
- Misses 79 117 +38
|
|
Overall the code coverage seems a bit low, and reduces the project coverage from 96% to 94%, it would be great to make sure we keep this stable and increase the coverage on this PR to the project levels. |
|
BTW: This MR would benefit from having I would also include @TiesWestendorp if some of their work is included in this MR. |
Co-authored-by: Ties Westendorp <ties.westendorp@nedap.com>
1e80817 to
12f192f
Compare
|
@Zarthus Great suggestion! I've added Ties Westendorp as the co-author on the first commit. |
There was a problem hiding this comment.
✅ This pull request was sent to the PullRequest network.
@philipkocanda you can click here to see the review status or cancel the code review job.
There was a problem hiding this comment.
This PR looks fantastic and is really well done. I am glad to see so much work put into unit testing. I only had a few comments about minor issues but that's all.
Reviewed with ❤️ by PullRequest
| <DatePicker onChange={onChangeSpy} showWeekPicker />, | ||
| ); | ||
| expect(onChangeSpy.called).to.be.false; | ||
| const input = ReactDOM.findDOMNode(weekPicker.input); |
There was a problem hiding this comment.
ISSUE: react/no-find-dom-node (Severity: Medium)
Do not use findDOMNode. It doesn’t work with function components and is deprecated in StrictMode. See https://reactjs.org/docs/react-dom.html#finddomnode
Remediation:
this probably doesn't matter because we're inside a test, not a component, right?
🤖 powered by PullRequest Automation 👋 verified by Andy W
There was a problem hiding this comment.
This is indeed deprecated behaviour and should not be used anymore.
|
Test coverage seems pretty decent, but |
There was a problem hiding this comment.
These changes look good and add the week picker that was described. I don't see any issues, and the changes overall look reasonable including good tests and examples.
Reviewed with ❤️ by PullRequest
There was a problem hiding this comment.
i see where you responded to my suggestion about a default in a switch statement but I have further comments on how you implemented my suggestion!
Reviewed with ❤️ by PullRequest
…factored week_number isSameDay() method and removed usage of findDOMNode in week_picker_test
…d year_picker_test
…_test and year_picker_test" This reverts commit f99f41a.
Zarthus
left a comment
There was a problem hiding this comment.
I've taken a quick look, I'll approve this now since Martijn and Pull Request seems sufficient :) My only note is that in the future I'd encourage splitting up changes (such as CONTRIBUTING) into a separate MR to reduce review overhead and increase focus, but since it's such a small change it's honestly OK.
Martijn and PR have got it from here I'm sure :)
| <WeekNumber weekNumber={1} onClick={onClick} />, | ||
| it("should handle onClick function", () => { | ||
| const onClickMock = jest.fn(); | ||
| const shallowWeekNumber = shallow( |
| event.preventDefault(); | ||
| event.key = "Enter"; | ||
| } | ||
| }); |
There was a problem hiding this comment.
Due to inactivity, PullRequest has cancelled this review job. You can reactivate the code review job from the PullRequest dashboard.
|
Hi @martijnrusschen. Thanks for taking this up. I'd like to know if the latest merge has been published to npm. I can see the the |
|
It's released now: https://github.com/Hacker0x01/react-datepicker/releases/tag/v4.23.0 |
📯 Hey everyone, big news
@philipkocanda and @iMartzen have helped get this Merge Request from 2021 over the finish line, so most of the credit goes to @TiesWestendorp 👏
⚙️ Implementation
📖 Resources:
🤝 We used our HackerOne Community Service Day to finalize this feature, and we're thrilled to share it today.
🚀 Enjoy the new week picker, and let's make a positive impact together