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

Augment Block.Edit filter docs with performance guidance #55252

Merged
merged 1 commit into from
Oct 16, 2023

Conversation

getdave
Copy link
Contributor

@getdave getdave commented Oct 11, 2023

What?

Adds some performance guidance/warnings to the docs around the Block.Edit filter.

Why?

It's easy to introduce performance regressions using these filters. See #55250. We should help folks to avoid this.

How?

Adds a note to remind consumers that the hook is expensive and can introduce perf regressions. It prompts consumers to conditionally render their custom output especially if it's not needed on all blocks.

Testing Instructions

Read words.

Testing Instructions for Keyboard

Screenshots or screencast

@getdave getdave added the [Type] Developer Documentation Documentation for developers label Oct 11, 2023
@getdave getdave requested a review from scruffian October 11, 2023 12:01
@getdave getdave self-assigned this Oct 11, 2023
@getdave
Copy link
Contributor Author

getdave commented Oct 11, 2023

Validity of this PR depends on whether fix in #55250 is 👌

@getdave getdave marked this pull request as ready for review October 12, 2023 10:52
Copy link
Member

@jorgefilipecosta jorgefilipecosta left a comment

Choose a reason for hiding this comment

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

It seems like a good enhancement to the docs as the filter should be used carefully. Adding a note makes sense.

@getdave getdave closed this Oct 16, 2023
@getdave getdave reopened this Oct 16, 2023
@getdave getdave enabled auto-merge (squash) October 16, 2023 08:10
@getdave getdave merged commit 3662bc4 into trunk Oct 16, 2023
@getdave getdave deleted the add/perf-guidance-for-block-edit-hook branch October 16, 2023 09:06
@github-actions github-actions bot added this to the Gutenberg 16.9 milestone Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants