Skip to content

Refactor <TimePicker> to function component - #24348

Merged
talldan merged 5 commits into
WordPress:masterfrom
kevin940726:update/time-picker-function-component
Aug 14, 2020
Merged

talldan merged 5 commits into
WordPress:masterfrom
kevin940726:update/time-picker-function-component

Conversation

@kevin940726

@kevin940726 kevin940726 commented Aug 4, 2020 •

Copy link
Copy Markdown
Member

Description

Refactor to function component following the latest best practices. Related to #22890. Notable changes are as follow.

How has this been tested?

Several ways to test this:

  1. Run the storybook and play with it in components/TimePicker.
  2. Run the dev environment and play with it in the <PostSchedule> component when editing a post and scheduling post time.
  3. Run the unit tests.

Types of changes

New feature

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR.

@kevin940726 kevin940726 added [Type] Code Quality Issues or PRs that relate to code quality [Package] Components /packages/components Storybook Storybook and its stories for components labels Aug 4, 2020
@kevin940726
kevin940726 force-pushed the update/time-picker-function-component branch from f0071c5 to ba0bdbf Compare August 4, 2020 08:38
@kevin940726 kevin940726 changed the title Update/time picker function component Refactor <TimePicker> to function component Aug 4, 2020

@talldan talldan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be working really nicely, appreciate all the effort into changing the tests over to react testing library, and adding the story.

I spotted one bug with the month select, though as far as I can tell it also seems to happen in master, so it may be worth taking a look at in a separate PR.

A few separate code quality things, but nothing major 😄

@talldan talldan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for all the work on this!

@talldan
talldan merged commit 23b5b8f into WordPress:master Aug 14, 2020
@github-actions github-actions Bot added this to the Gutenberg 8.8 milestone Aug 14, 2020
@kevin940726
kevin940726 deleted the update/time-picker-function-component branch August 14, 2020 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Components /packages/components Storybook Storybook and its stories for components [Type] Code Quality Issues or PRs that relate to code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants