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

If possible, untoggle the inspector by default. #52

Open
StevenDufresne opened this issue Mar 27, 2023 · 3 comments
Open

If possible, untoggle the inspector by default. #52

StevenDufresne opened this issue Mar 27, 2023 · 3 comments

Comments

@StevenDufresne
Copy link
Collaborator

The sidebar should be close on page load.

@StevenDufresne
Copy link
Collaborator Author

Just circling back, because of how plugins.registerPlugin is called, a caller later can override any changes we make in our plugin. I'm not certain how to persist our plugin changes without being part of Gutenberg core logic.

@jasmussen
Copy link

I could be misremembering, but @youknowriad do you recall if there is a prop to start the block editor with the inspector closed?

@youknowriad
Copy link

I'm not sure what "prop" is that. But I think you should be able to do so by calling:

wp.data.dispatch( wp.editPost.store ).closeGeneralSidebar();

there might be some timing considerations though as mentioned above. (have to run after the editor loads or something)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants