-
-
Notifications
You must be signed in to change notification settings - Fork 420
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 Windows date picker #157
Add Windows date picker #157
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.
Can you also update the README to include instructions about linking and running example app 😊?
@vonovak Also, are you the only one who can merge this PR? |
@rectified95 yes, the changelog is for now edited manually, I'd like to automate releases at some point soon but we're not there yet. I think you don't need to worry about the changelog, I'll put it in there. I'm not the only one who can merge PRs but I have been the most active one here recently it seems. Regarding maintenance, do you have an example somewhere of how this functionality can be tested? Preferably end-to-end; thank you! Would the author or someone from the reviewers be open to becoming a maintainer? (for the windows part at least, but for I'd be very open to improvements outside of windows too) Thank you! |
@vonovak Thanks for your comments. We'll get back to you about becoming maintainers; for now I can say that I'll fix bugs we spot after the merge. |
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.
hello guys, please ping me when this is done, just so I know explicitly that the review is done on your side, thank you! |
@@ -0,0 +1,68 @@ | |||
/** | |||
* Copyright (c) Microsoft Corporation. All rights reserved. | |||
* Licensed under the MIT License. |
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 came up in another repo. Not sure it's kosher to put msft copyright in a community repo we don't matinain.
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.
Alex/Kai told me in an earlier comment to add it to all these files. Can you link the discussion you're referencing?
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.
They'll likely know better on this. IIRC there was one community repo that asked that copyright headers be removed. @kaiguo do you remember the story there?
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.
Hmm, I guess that's a @chrisglein question, should we put Microsoft copyright info in a community repo we don't own?
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.
Where we landed for the first couple repos (camera, video, etc.) is to leave it off. We match the pattern of the target repo. I'll check offline, but for now assume that's the case.
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.
Sounds good, the Android/iOS files in this repo have the MIT license from Facebook, so I'll keep ours for now.
'RNDateTimePickerWindows', | ||
); | ||
|
||
export default class DateTimePickerWindows extends React.Component<WindowsNativeProps> { |
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 name WindowsNativeProps
causes a bit of confusion for me. I've previously seen "native component properties" refer to the props being passed to RNDateTimePickerWindows
instead of DateTimePickerWindows
, since the former is considered the native component.
Future versions of Flow + TS types parameterize requireNativeComponent
to take props as well which would likely take a NativeProps
type.
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.
Filed #161 to track the alignment of the props/API with Android/iOS as a follow up. There's also follow up work to expose the calendar identifier and the fact that globalization doesn't seem to quite work yet
Please see if we can make the min version 16299 to work on RS3.
@@ -11,6 +11,7 @@ | |||
"start": "react-native start", | |||
"start:android": "react-native run-android --no-jetifier", | |||
"start:ios": "react-native run-ios", | |||
"start:windows": "react-native start --use-react-native-windows", |
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.
Mentioned somthing in another comment, but can we share the metro config and use run-windows
?
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.
Not sure, but I think we still need to swap the metro config
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.
@acoates-ms did some work to allow a single metro config allowing multiple out of tree platforms for 0.62. Would you mind checking with him? Want to make sure we set the right patterns for future community modules based on 0.62.
@vonovak My colleagues have signed off on the PR. I've also tried to set up a build workflow, but it seems like I don't have the privileges, so I've reverted it (that's what the text says if you click the 'Actions' tab in this repo). We can coordinate this as a separate PR. |
Thanks so much for this!
that'd be nice to have. But for this repo, we're not using github actions but circleCI. Since circle runs for PRs too, I'm guessing you should be able to make changes to the config and see the results in a PR.
great, let me know if I can help |
@vonovak Thanks for being responsive and merging this! :) There have been issues with certificates for release builds on Windows VMs in CircleCI. A colleague ran into this when adding a CI loop for the WebView module, and ended up having to use Github actions - for WebView they run alongside the CircleCI steps; is there a reason we cannot add GitHub actions for this project? |
hi @rectified95
okay, I had no idea about that
I wanted to prefer using circle because we already use it so there is no entry barrier, but if there is a blocker there, I'm def not opposed to using actions too. I can give whoever wants to do this the necessary access rights. |
@vonovak You can give me the permissions, I'll try setting it up. |
Summary
Add Windows date picker. Closes microsoft/react-native-windows#4156
This PR extracts the DatePicker from React Native Windows in line with the lean core effort. It preserves the existing functionality available on Windows, rewriting the code using C++/WinRT to follow the latest recommended development practices.
Time picker will be added in a separate PR (tracked by microsoft/react-native-windows#4695)
Test Plan
What's required for testing (prerequisites)?
Run the example app:
0. Install system requirements: https://microsoft.github.io/react-native-windows/docs/next/rnw-dependencies
'npm run start:windows
Or create your own test app and link this module:
https://microsoft.github.io/react-native-windows/docs/next/native-modules-setup#option-1-create-a-new-test-app
Compatibility
Checklist
README.md
CHANGELOG.md
(doing)example/App.js
)