Skip to content

Conversation

@nerrad
Copy link
Contributor

@nerrad 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 nerrad self-assigned this Jul 4, 2018
@nerrad nerrad added Framework Issues related to broader framework topics, especially as it relates to javascript [Type] Refactoring labels Jul 4, 2018
@nerrad nerrad requested review from aduth and gziolo July 4, 2018 17:50
Copy link
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

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

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

<IfBlockEditSelected(InspectorControlsFill)>
<PanelBody>
<_class
<WithInstanceId(ToggleControl)
Copy link
Member

Choose a reason for hiding this comment

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

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ya that's definitely useful :)

@gziolo gziolo added this to the 3.2 milestone Jul 5, 2018
@gziolo
Copy link
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
@gziolo gziolo deleted the update/all-hocs-use-create-higher-order-component branch July 5, 2018 07:30
@ellatrix ellatrix added [Type] Code Quality Issues or PRs that relate to code quality and removed [Type] Code Quality Issues or PRs that relate to code quality labels Nov 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Framework Issues related to broader framework topics, especially as it relates to javascript [Type] Code Quality Issues or PRs that relate to code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants