-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Site Editor: Expose edit-site store #28722
Site Editor: Expose edit-site store #28722
Conversation
Size Change: +168 B (0%) Total Size: 1.37 MB
ℹ️ View Unchanged
|
54e36bf
to
938d27e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! I will wait with 👍🏻 until someone confirms the changes applied to Editor
are correct. Everything else looks good.
@@ -48,7 +48,7 @@ const interfaceLabels = { | |||
drawer: __( 'Navigation Sidebar' ), | |||
}; | |||
|
|||
function Editor() { | |||
function Editor( { initialSettings } ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would appreciate a sanity check from someone familiar with the edit site's editor initialization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 👍 - Thanks!
Description
In Gutenberg all the stores are exposed from the
store
file, except a few likecore/edit-site
. This PR aims to refactorcore/edit-site
store to work the same way as other stores.Rather than preloading the settings into the
store
, we are passing the initial state to the editor which takes care of updating the settings in the store.This change allows us to use the
store
object properly together withselect
etc. (No more hacky global variable)How has this been tested?
Make sure tests are passing, CI passing, and smoke test!
Screenshots
Types of changes
Code quality
Checklist: