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

Update HOCs to use createHigherOrderComponent #7714

Merged
merged 2 commits into from Jul 5, 2018

Conversation

Projects
None yet
2 participants
@nerrad
Contributor

nerrad commented Jul 4, 2018

Description

This pull ensures that all HOCs are consistently using createHigherOrderComponent. This is prep work for doing global HOC behaviour changes for all HOCs (such as implementing forwardRef)

How has this been tested?

  • This should be covered by all existing tests, so testing just involves ensuring that existing unit and e2e tests pass.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

nerrad added some commits Jul 4, 2018

@gziolo

gziolo approved these changes Jul 5, 2018

Code wise it is a very simple change when you turn on diff without whitespace changes 💯

@@ -4,7 +4,7 @@ exports[`core/more/edit should match snapshot when noTeaser is false 1`] = `
<React.Fragment>
<IfBlockEditSelected(InspectorControlsFill)>
<PanelBody>
<_class
<WithInstanceId(ToggleControl)

This comment has been minimized.

@gziolo

gziolo Jul 5, 2018

Member

The nice part about this helper is that we no longer see those cryptic component names 👍

This comment has been minimized.

@nerrad

nerrad Jul 5, 2018

Contributor

Ya that's definitely useful :)

@gziolo gziolo added this to the 3.2 milestone Jul 5, 2018

@gziolo

This comment has been minimized.

Member

gziolo commented Jul 5, 2018

Everything works properly in my tests. Thanks for working on this one. It should make testing #7557 much easier 👍

@gziolo gziolo merged commit a4075da into master Jul 5, 2018

2 checks passed

codecov/project 46.44% (+0%) compared to 6bf9832
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@gziolo gziolo deleted the update/all-hocs-use-create-higher-order-component branch Jul 5, 2018

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