-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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: Disable Settings/Styles buttons when Distruction Free Mode is enabled #53045
Conversation
|
Size Change: +31 B (0%) Total Size: 1.44 MB
ℹ️ View Unchanged
|
Flaky tests detected in b099fd2. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5681748086
|
Update: In #53993, if a command is not suitable for DFM mode, there is now an approach to turn off DFM mode. Therefore, tI would like to close this PR because it is better to take the same approach in the options menu instead of disabling the button. |
Fixes #52522
What?
This PR deactivates the Settings and Styles buttons in the Options menu when Distruction Free Mode is enabled in the Site Editor.
Why?
I think there are three approaches to solving the problem reported in #52522 of not being able to press the close button on the sidebar.
I think Distraction Free Mode should be explicitly toggled by the user. Also, in this mode, I think users should not inherently be expected to manipulate anything in the right sidebar.
For this reason, I chose the third approach.
How?
Get the status of Distruction Free Mode from the edit-site store and disable these two buttons if it is enabled; it should not affect buttons added by
PluginSidebarMoreMenuItem
.Testing Instructions
Open the Site Editor and execute the following code in the browser console. This code will add a custom button to the Plugins category.
Note - Other editor instances do not require this processing, for the following reasons:
Screenshots or screencast