Skip to content

Leverage React hooks in most areas of the stories editor#3412

Merged
swissspidy merged 3 commits intodevelopfrom
try/stories-editor-react-hooks
Oct 4, 2019
Merged

Leverage React hooks in most areas of the stories editor#3412
swissspidy merged 3 commits intodevelopfrom
try/stories-editor-react-hooks

Conversation

@swissspidy
Copy link
Copy Markdown
Collaborator

@swissspidy swissspidy commented Oct 2, 2019

Summary

Addresses issue #2538.

Split out from #3359 to focus on the stories editor only for now.

Hooks cannot be used pre-WordPress 5.3 unless Gutenberg is active, which means they're currently only guaranteed to work in the Stories editor.

Doing this migration was very helpful for better seeing side effects in components and to simplify logic in them.

Checklist

  • My pull request is addressing an open issue (please create one otherwise).
  • My code is tested and passes existing tests.
  • My code follows the Engineering Guidelines (updates are often made to the guidelines, check it out periodically).

@swissspidy swissspidy added AMP Stories Infrastructure Changes impacting testing infrastructure or build tooling Needs Testing Issues that need to be confirmed. labels Oct 2, 2019
@googlebot googlebot added the cla: yes Signed the Google CLA label Oct 2, 2019
@spacedmonkey
Copy link
Copy Markdown
Contributor

Let mark this as draft and only merge it a week or two after 5.3 goes out.

@swissspidy
Copy link
Copy Markdown
Collaborator Author

The Stories editor currently has a hard requirement to use latest version of the Gutenberg plugin (or soon WordPress 5.3), so I don't see a reason for waiting.

@spacedmonkey spacedmonkey mentioned this pull request Oct 3, 2019
6 tasks
Copy link
Copy Markdown
Contributor

@spacedmonkey spacedmonkey left a comment

Choose a reason for hiding this comment

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

This is a refactor of code and has no functional changes. All the existing tests pass both e2e / unit test. Functional breaks should be spotted by QA. Tentatively approving this.

@swissspidy swissspidy merged commit 4b597d8 into develop Oct 4, 2019
@swissspidy swissspidy deleted the try/stories-editor-react-hooks branch October 4, 2019 13:11
@swissspidy swissspidy added this to the v1.3.1 milestone Oct 4, 2019
@spacedmonkey spacedmonkey mentioned this pull request Oct 11, 2019
3 tasks
@swissspidy swissspidy modified the milestones: v1.3.1, v1.4 Oct 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Signed the Google CLA Infrastructure Changes impacting testing infrastructure or build tooling Needs Testing Issues that need to be confirmed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants