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

Remove the Styles link in Site Editor #36637

Merged
merged 1 commit into from Nov 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 1 addition & 14 deletions packages/edit-site/src/components/editor/index.js
Expand Up @@ -104,7 +104,7 @@ function Editor( { initialSettings, onError } ) {
const { setPage, setIsInserterOpened, updateSettings } = useDispatch(
editSiteStore
);
const { enableComplementaryArea } = useDispatch( interfaceStore );

useEffect( () => {
updateSettings( initialSettings );
}, [] );
Expand Down Expand Up @@ -162,19 +162,6 @@ function Editor( { initialSettings, onError } ) {
}
}, [ isNavigationOpen ] );

useEffect(
function openGlobalStylesOnLoad() {
const searchParams = new URLSearchParams( window.location.search );
if ( searchParams.get( 'styles' ) === 'open' ) {
enableComplementaryArea(
'core/edit-site',
'edit-site/global-styles'
);
}
},
[ enableComplementaryArea ]
);

// Don't render the Editor until the settings are set and loaded
const isReady =
settings?.siteUrl &&
Expand Down
Expand Up @@ -86,13 +86,6 @@ const NavigationPanel = ( { isOpen, setIsOpen, activeTemplateType } ) => {
page: 'gutenberg-edit-site',
} ) }
/>
<NavigationItem
title={ __( 'Styles' ) }
href={ addQueryArgs( '', {
page: 'gutenberg-edit-site',
styles: 'open',
} ) }
/>
<NavigationItem
title={ __( 'Templates' ) }
item="wp_template"
Expand Down