diff --git a/packages/edit-site/src/components/layout/router.js b/packages/edit-site/src/components/layout/router.js
index 3f9a8be7f82de..f91de7767f5bd 100644
--- a/packages/edit-site/src/components/layout/router.js
+++ b/packages/edit-site/src/components/layout/router.js
@@ -55,12 +55,11 @@ export default function useLayoutAreas() {
}
// Templates
- if (
- path === '/wp_template/all' ||
- ( path === '/wp_template' && window?.__experimentalAdminViews )
- ) {
+ if ( path === '/wp_template/all' ) {
const isListLayout =
- isCustom !== 'true' && ( ! layout || layout === 'list' );
+ isCustom !== 'true' &&
+ layout === 'list' &&
+ window?.__experimentalAdminViews;
return {
areas: {
content: ,
diff --git a/packages/edit-site/src/components/page-templates/index.js b/packages/edit-site/src/components/page-templates/index.js
index 7deec674f9b41..7995ebe376b57 100644
--- a/packages/edit-site/src/components/page-templates/index.js
+++ b/packages/edit-site/src/components/page-templates/index.js
@@ -75,7 +75,7 @@ const defaultConfigPerViewType = {
};
const DEFAULT_VIEW = {
- type: window?.__experimentalAdminViews ? LAYOUT_LIST : LAYOUT_TABLE,
+ type: LAYOUT_TABLE,
search: '',
page: 1,
perPage: 20,
@@ -180,18 +180,6 @@ export default function DataviewsTemplates() {
[ history, params, view?.type ]
);
- const onDetailsChange = useCallback(
- ( items ) => {
- if ( items?.length === 1 ) {
- history.push( {
- postId: items[ 0 ].id,
- postType: TEMPLATE_POST_TYPE,
- } );
- }
- },
- [ history ]
- );
-
const authors = useMemo( () => {
if ( ! allTemplates ) {
return EMPTY_ARRAY;
@@ -390,7 +378,6 @@ export default function DataviewsTemplates() {
view={ view }
onChangeView={ onChangeView }
onSelectionChange={ onSelectionChange }
- onDetailsChange={ onDetailsChange }
deferredRendering={ ! view.hiddenFields?.includes( 'preview' ) }
/>
diff --git a/packages/edit-site/src/components/sidebar/index.js b/packages/edit-site/src/components/sidebar/index.js
index 1d0be62982e87..73c6aea7e328c 100644
--- a/packages/edit-site/src/components/sidebar/index.js
+++ b/packages/edit-site/src/components/sidebar/index.js
@@ -76,11 +76,7 @@ function SidebarScreens() {
- { window?.__experimentalAdminViews ? (
-
- ) : (
-
- ) }
+
diff --git a/packages/edit-site/src/components/sync-state-with-url/use-init-edited-entity-from-url.js b/packages/edit-site/src/components/sync-state-with-url/use-init-edited-entity-from-url.js
index 11c065cf862db..4c2214b76abd3 100644
--- a/packages/edit-site/src/components/sync-state-with-url/use-init-edited-entity-from-url.js
+++ b/packages/edit-site/src/components/sync-state-with-url/use-init-edited-entity-from-url.js
@@ -207,11 +207,7 @@ function useResolveEditedEntityAndContext( { path, postId, postType } ) {
return {};
}, [ homepageId, postType, postId, path ] );
- if (
- ( path === '/wp_template/all' ||
- ( path === '/wp_template' && window?.__experimentalAdminViews ) ) &&
- postId
- ) {
+ if ( path === '/wp_template/all' && postId ) {
return { isReady: true, postType: 'wp_template', postId, context };
}
diff --git a/packages/edit-site/src/utils/get-is-list-page.js b/packages/edit-site/src/utils/get-is-list-page.js
index 3028b0e65d786..9530cd85bf04b 100644
--- a/packages/edit-site/src/utils/get-is-list-page.js
+++ b/packages/edit-site/src/utils/get-is-list-page.js
@@ -16,7 +16,6 @@ export default function getIsListPage(
return (
[ '/wp_template/all', '/wp_template_part/all' ].includes( path ) ||
( path === '/page' && window?.__experimentalAdminViews ) ||
- ( path === '/wp_template' && window?.__experimentalAdminViews ) ||
( path === '/patterns' &&
// Don't treat "/patterns" without categoryType and categoryId as a
// list page in mobile because the sidebar covers the whole page.
diff --git a/test/e2e/specs/site-editor/new-templates-list.spec.js b/test/e2e/specs/site-editor/new-templates-list.spec.js
index 272a3ffff80bf..13484abcb13ad 100644
--- a/test/e2e/specs/site-editor/new-templates-list.spec.js
+++ b/test/e2e/specs/site-editor/new-templates-list.spec.js
@@ -18,11 +18,7 @@ test.describe( 'Templates', () => {
] );
} );
test( 'Sorting', async ( { admin, page } ) => {
- await admin.visitSiteEditor( { path: '/wp_template' } );
- // Switch to table layout.
- await page.getByLabel( 'View options' ).click();
- await page.getByRole( 'menuitem', { name: 'Layout' } ).click();
- await page.getByRole( 'menuitemradio', { name: 'Table' } ).click();
+ await admin.visitSiteEditor( { path: '/wp_template/all' } );
// Descending by title.
await page
.getByRole( 'button', { name: 'Template', exact: true } )
@@ -52,13 +48,7 @@ test.describe( 'Templates', () => {
title: 'Date Archives',
content: 'hi',
} );
- await admin.visitSiteEditor( { path: '/wp_template' } );
-
- // Switch to table layout.
- await page.getByLabel( 'View options' ).click();
- await page.getByRole( 'menuitem', { name: 'Layout' } ).click();
- await page.getByRole( 'menuitemradio', { name: 'Table' } ).click();
-
+ await admin.visitSiteEditor( { path: '/wp_template/all' } );
// Global search.
await page.getByRole( 'searchbox', { name: 'Filter list' } ).click();
await page.keyboard.type( 'tag' );
@@ -94,13 +84,7 @@ test.describe( 'Templates', () => {
await expect( titles ).toHaveCount( 2 );
} );
test( 'Field visibility', async ( { admin, page } ) => {
- await admin.visitSiteEditor( { path: '/wp_template' } );
-
- // Switch to table layout.
- await page.getByLabel( 'View options' ).click();
- await page.getByRole( 'menuitem', { name: 'Layout' } ).click();
- await page.getByRole( 'menuitemradio', { name: 'Table' } ).click();
-
+ await admin.visitSiteEditor( { path: '/wp_template/all' } );
await page.getByRole( 'button', { name: 'Description' } ).click();
await page.getByRole( 'menuitem', { name: 'Hide' } ).click();
await expect(