diff --git a/packages/edit-site/src/components/layout/router.js b/packages/edit-site/src/components/layout/router.js index 02f7e7b25594ae..5d8a4085c3a116 100644 --- a/packages/edit-site/src/components/layout/router.js +++ b/packages/edit-site/src/components/layout/router.js @@ -45,12 +45,7 @@ export default function useLayoutAreas() { }; } - // List layout is still experimental. - // Extracted it here out of the conditionals so it doesn't unintentionally becomes stable. - const isListLayout = - isCustom !== 'true' && - layout === 'list' && - window?.__experimentalAdminViews; + const isListLayout = isCustom !== 'true' && layout === 'list'; if ( path === '/pages' ) { return { diff --git a/packages/edit-site/src/components/page-pages/index.js b/packages/edit-site/src/components/page-pages/index.js index 143169107f3ffc..f7b1254f5ae2bc 100644 --- a/packages/edit-site/src/components/page-pages/index.js +++ b/packages/edit-site/src/components/page-pages/index.js @@ -49,9 +49,6 @@ import { unlock } from '../../lock-unlock'; const { useLocation, useHistory } = unlock( routerPrivateApis ); const EMPTY_ARRAY = []; -const SUPPORTED_LAYOUTS = window?.__experimentalAdminViews - ? [ LAYOUT_GRID, LAYOUT_TABLE, LAYOUT_LIST ] - : [ LAYOUT_GRID, LAYOUT_TABLE ]; function useView( postType ) { const { params } = useLocation(); @@ -429,7 +426,6 @@ export default function PagePages() { view={ view } onChangeView={ onChangeView } onSelectionChange={ onSelectionChange } - supportedLayouts={ SUPPORTED_LAYOUTS } /> ); diff --git a/packages/edit-site/src/components/page-templates-template-parts/index.js b/packages/edit-site/src/components/page-templates-template-parts/index.js index 0d8442948473c0..32e058cd86be38 100644 --- a/packages/edit-site/src/components/page-templates-template-parts/index.js +++ b/packages/edit-site/src/components/page-templates-template-parts/index.js @@ -63,10 +63,6 @@ const { useHistory, useLocation } = unlock( routerPrivateApis ); const EMPTY_ARRAY = []; -const SUPPORTED_LAYOUTS = window?.__experimentalAdminViews - ? [ LAYOUT_TABLE, LAYOUT_GRID, LAYOUT_LIST ] - : [ LAYOUT_TABLE, LAYOUT_GRID ]; - const defaultConfigPerViewType = { [ LAYOUT_TABLE ]: { primaryField: 'title', @@ -209,9 +205,7 @@ export default function PageTemplatesTemplateParts( { postType } ) { const { params } = useLocation(); const { activeView = 'all', layout } = params; const defaultView = useMemo( () => { - const usedType = window?.__experimentalAdminViews - ? layout ?? DEFAULT_VIEW.type - : DEFAULT_VIEW.type; + const usedType = layout ?? DEFAULT_VIEW.type; return { ...DEFAULT_VIEW, type: usedType, @@ -473,7 +467,6 @@ export default function PageTemplatesTemplateParts( { postType } ) { onChangeView={ onChangeView } onSelectionChange={ onSelectionChange } deferredRendering={ ! view.hiddenFields?.includes( 'preview' ) } - supportedLayouts={ SUPPORTED_LAYOUTS } /> ); diff --git a/packages/edit-site/src/components/sync-state-with-url/use-sync-path-with-url.js b/packages/edit-site/src/components/sync-state-with-url/use-sync-path-with-url.js index 3f57a62fba7287..00757955736476 100644 --- a/packages/edit-site/src/components/sync-state-with-url/use-sync-path-with-url.js +++ b/packages/edit-site/src/components/sync-state-with-url/use-sync-path-with-url.js @@ -101,28 +101,12 @@ export default function useSyncPathWithURL() { canvas: undefined, path: navigatorLocation.path, } ); - } else if ( - navigatorLocation.path === '/wp_template/all' && - ! window?.__experimentalAdminViews - ) { - // When the experiment is disabled, we only support table layout. - // Clear it out from the URL, so layouts other than table cannot be accessed. - updateUrlParams( { - postType: undefined, - categoryType: undefined, - categoryId: undefined, - path: navigatorLocation.path, - layout: undefined, - } ); } else if ( // These sidebar paths are special in the sense that the url in these pages may or may not have a postId and we need to retain it if it has. // The "type" property should be kept as well. - ( navigatorLocation.path === '/pages' && - window?.__experimentalAdminViews ) || - ( navigatorLocation.path === '/wp_template/all' && - window?.__experimentalAdminViews ) || - ( navigatorLocation.path === '/wp_template_part/all' && - window?.__experimentalAdminViews ) + navigatorLocation.path === '/pages' || + navigatorLocation.path === '/wp_template/all' || + navigatorLocation.path === '/wp_template_part/all' ) { updateUrlParams( { postType: undefined,