Site Editor - prevent loading state from showing the admin menu.#36455
Site Editor - prevent loading state from showing the admin menu.#36455Addison-Stavlo merged 4 commits intotrunkfrom
Conversation
|
|
||
| // Default to is-fullscreen-mode to avoid rendering wp-admin navigation menu while loading and | ||
| // having jumps in the UI. | ||
| add_filter( |
There was a problem hiding this comment.
This is going to be executed for all pages, not just the site editor (because the php file is always loaded), should we instead move this into gutenberg_edit_site_init ?
There was a problem hiding this comment.
Ohh, that makes sense. I moved it into that function here c434238
There was a problem hiding this comment.
Do we need to also remove the filter as part of the ! gutenberg_is_edit_site_page( $hook ) conditional return?
There was a problem hiding this comment.
Also curious, does the function need to be static here? I didn't think so, but then I noticed your example in wordpress-develop was also static but didn't seem to be part of a class?
There was a problem hiding this comment.
they started using "static" for closures like that recently something about PHP 8 support, but I didn't fully follow the explanations tbh :) So I might think it's better if it's static here as well.
It doesn't seem like we need to remove the filter though as it's only applied if we're on this page so, so it looks good to me.
Mamaduka
left a comment
There was a problem hiding this comment.
Changes look good. Thanks, @Addison-Stavlo.
|
Would we be able to get this into a point release for 11.9 if one ends up happening? cc @noisysocks |
|
@Addison-Stavlo I'm not sure if there are plans for a point release, but I've cherry picked this PR into the |
|
Thanks @andrewserong ! |
Description
Resolves #36445 by ensuring the site editor is in fullscreen mode while loading.
How has this been tested?
Load the site editor and verify you do not see the wp-admin menu while it loads, as is described in the linked issue.
Screenshots
Types of changes
Checklist:
*.native.jsfiles for terms that need renaming or removal).