Skip to content

Commit

Permalink
Pages: list layout as stable
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal committed Mar 14, 2024
1 parent c3a44c1 commit 8cb497f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
7 changes: 1 addition & 6 deletions packages/edit-site/src/components/layout/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 0 additions & 4 deletions packages/edit-site/src/components/page-pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -429,7 +426,6 @@ export default function PagePages() {
view={ view }
onChangeView={ onChangeView }
onSelectionChange={ onSelectionChange }
supportedLayouts={ SUPPORTED_LAYOUTS }
/>
</Page>
);
Expand Down

0 comments on commit 8cb497f

Please sign in to comment.