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

Refactor `PostSchedule` to make calendar/clock available as components #4180

Merged
merged 8 commits into from Dec 27, 2017

Conversation

Projects
None yet
2 participants
@travislopes
Contributor

travislopes commented Dec 27, 2017

This PR refactors the PostSchedule editor component to make the date and time picker available as components throughout Gutenberg. You can call the date and time picker together via DateTimePicker or individually via DatePicker and TimePicker respectively. As DatePicker utilizes the React DatePicker library, the spread operator is used to support passing arguments not directly defined by these components.

@youknowriad

Nice work here 👍

Show outdated Hide outdated components/date-time/date.js Outdated
Show outdated Hide outdated components/date-time/date.js Outdated
Show outdated Hide outdated components/date-time/index.js Outdated
Show outdated Hide outdated components/date-time/time.js Outdated
Show outdated Hide outdated components/date-time/index.js Outdated
Show outdated Hide outdated editor/components/post-schedule/index.js Outdated
@youknowriad

This comment has been minimized.

Show comment
Hide comment
@youknowriad

youknowriad Dec 27, 2017

Contributor

Thanks for the changes, just one last thing I forgot: we should add "moment" to the dependencies of the "wp-components" script in lib/client-assets.php.

Also, do you mind adding a README.md for these components (see other components for README examples)

Contributor

youknowriad commented Dec 27, 2017

Thanks for the changes, just one last thing I forgot: we should add "moment" to the dependencies of the "wp-components" script in lib/client-assets.php.

Also, do you mind adding a README.md for these components (see other components for README examples)

@travislopes

This comment has been minimized.

Show comment
Hide comment
@travislopes

travislopes Dec 27, 2017

Contributor

Added a README.md for the components; probably needs some adjustments but it's a start.

Contributor

travislopes commented Dec 27, 2017

Added a README.md for the components; probably needs some adjustments but it's a start.

@youknowriad

Thanks for the updates, this is ready for prime time

@youknowriad

This comment has been minimized.

Show comment
Hide comment
@youknowriad

youknowriad Dec 27, 2017

Contributor

@travislopes It looks like the unit tests are failing because of eslint. It might be a good idea to install an eslint plugin for your IDE of choice. This will help you catch those lint errors early.

You can still run npm run lint locally :)
Might be good to run the JS unit tests as well npm run test-unit

Contributor

youknowriad commented Dec 27, 2017

@travislopes It looks like the unit tests are failing because of eslint. It might be a good idea to install an eslint plugin for your IDE of choice. This will help you catch those lint errors early.

You can still run npm run lint locally :)
Might be good to run the JS unit tests as well npm run test-unit

@youknowriad youknowriad merged commit e3e849f into WordPress:master Dec 27, 2017

2 checks passed

codecov/project 39.01% (-0.08%) compared to c3be1b6
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@travislopes travislopes deleted the travislopes:add/datetime-picker branch Dec 27, 2017

getsource added a commit to getsource/gutenberg that referenced this pull request Jan 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment