Skip to content
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

Edit Post: Improve perf for PublishPanel and extenstions #6938

Merged
merged 1 commit into from May 25, 2018

Conversation

gziolo
Copy link
Member

@gziolo gziolo commented May 24, 2018

Addresses the comment from @aduth:

This will cause render reconciliation more than necessary because it's creating a new function each render.

Why not hoist to a top-level variable? Or could renderPrePublishExtension be interpreted as a component, so we could pass the PluginPrePublishPanel.Slot reference directly instead of a function?

How has this been tested?

Code to paste into your browser: https://gist.github.com/gziolo/fd8141f2cde7fcb1b513c09eea45d27f.

Screenshots

Pre-publish

screen shot 2018-05-17 at 13 39 03

Post-publish

Desktop:
screen shot 2018-05-17 at 13 37 15

Mobile:
screen shot 2018-05-17 at 13 37 41

Types of changes

Refactoring.

Checklist:

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

@gziolo gziolo added [Feature] Extensibility The ability to extend blocks or the editing experience [Type] Performance Related to performance efforts labels May 24, 2018
@gziolo gziolo added this to the 3.0 milestone May 24, 2018
@gziolo gziolo self-assigned this May 24, 2018
Copy link
Member

@aduth aduth left a comment

Choose a reason for hiding this comment

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

Thanks. Looks great 👍

@aduth aduth merged commit 1e689af into master May 25, 2018
@aduth aduth deleted the update/publish-panel-perf branch May 25, 2018 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Extensibility The ability to extend blocks or the editing experience [Type] Performance Related to performance efforts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants