Skip to content

Commit

Permalink
Feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka committed Feb 17, 2025
1 parent 67452d1 commit d9e990b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
21 changes: 8 additions & 13 deletions packages/editor/src/components/preferences-modal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import PageAttributesCheck from '../page-attributes/check';
import PostTypeSupportCheck from '../post-type-support-check';
import { store as editorStore } from '../../store';
import { unlock } from '../../lock-unlock';
import { useStartPatterns } from '../start-page-options';

const {
PreferencesModal,
Expand Down Expand Up @@ -73,7 +72,6 @@ function PreferencesModalContents( { extraSections = {} } ) {
const { setIsListViewOpened, setIsInserterOpened } =
useDispatch( editorStore );
const { set: setPreference } = useDispatch( preferencesStore );
const hasStarterPatterns = !! useStartPatterns().length;

const sections = useMemo(
() =>
Expand Down Expand Up @@ -114,16 +112,14 @@ function PreferencesModalContents( { extraSections = {} } ) {
'Allow right-click contextual menus'
) }
/>
{ hasStarterPatterns && (
<PreferenceToggleControl
scope="core"
featureName="enableChoosePatternModal"
help={ __(
'Shows starter patterns when creating a new page.'
) }
label={ __( 'Show starter patterns' ) }
/>
) }
<PreferenceToggleControl
scope="core"
featureName="enableChoosePatternModal"
help={ __(
'Shows starter patterns when creating a new page.'
) }
label={ __( 'Show starter patterns' ) }
/>
</PreferencesModalSection>
<PreferencesModalSection
title={ __( 'Document settings' ) }
Expand Down Expand Up @@ -341,7 +337,6 @@ function PreferencesModalContents( { extraSections = {} } ) {
setIsListViewOpened,
setPreference,
isLargeViewport,
hasStarterPatterns,
]
);

Expand Down
2 changes: 0 additions & 2 deletions packages/editor/src/components/start-page-options/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,6 @@ export default function StartPageOptions() {

// Open the modal after the initial render for a new page.
setIsOpen( true );

return () => setIsOpen( false );
}, [ enabled, postId, isEditedPostDirty, isEditedPostEmpty ] );

if ( ! isOpen ) {
Expand Down

0 comments on commit d9e990b

Please sign in to comment.