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

Refactor gutenberg_initialize_editor function and remove block_editor_preload_data filter #35803

Closed
anton-vlasenko opened this issue Oct 20, 2021 · 0 comments · Fixed by #35838
Assignees
Labels
[Type] Enhancement A suggestion for improvement.

Comments

@anton-vlasenko
Copy link
Contributor

anton-vlasenko commented Oct 20, 2021

What problem does this address?

This issue is a follow-up to #24642.
We've added block_editor_preload_data filter to the gutenberg_initialize_editor function.
This filter is only needed to provide data for the createMenuPreloadingMiddleware.
It's not the best solution because we don't want to add filters whose only task is to solve a specific (single) issue.
We can do better.
We need to refactor gutenberg_initialize_editor to not use that filter.

What is your proposed solution?

Load the data needed for the createMenuPreloadingMiddleware sideways, somewhere inside the gutenberg_navigation_init function and remove the block_editor_preload_data filter.

@anton-vlasenko anton-vlasenko added this to the Gutenberg 11.8 milestone Oct 20, 2021
@anton-vlasenko anton-vlasenko changed the title Refactor gutenberg_initialize_editor function and remove block_editor_preload_data filter Refactor gutenberg_initialize_editor function and remove block_editor_preload_data filter Oct 20, 2021
@anton-vlasenko anton-vlasenko self-assigned this Oct 20, 2021
@gziolo gziolo removed this from the Gutenberg 11.8 milestone Oct 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Enhancement A suggestion for improvement.
Projects
None yet
2 participants