Skip to content

Commit

Permalink
Query Loop block: remove 'add new post' prompt in the sidebar (#67189)
Browse files Browse the repository at this point in the history
Co-authored-by: dhruvang21 <[email protected]>
Co-authored-by: ntsekouras <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: aaronrobertshaw <[email protected]>
Co-authored-by: annezazu <[email protected]>
  • Loading branch information
6 people authored Nov 26, 2024
1 parent ddd239a commit 514b670
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 75 deletions.
25 changes: 0 additions & 25 deletions packages/block-editor/src/components/block-info-slot-fill/index.js

This file was deleted.

2 changes: 0 additions & 2 deletions packages/block-editor/src/components/block-inspector/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import useInspectorControlsTabs from '../inspector-controls-tabs/use-inspector-c
import AdvancedControls from '../inspector-controls-tabs/advanced-controls-panel';
import PositionControls from '../inspector-controls-tabs/position-controls-panel';
import useBlockInspectorAnimationSettings from './useBlockInspectorAnimationSettings';
import BlockInfo from '../block-info-slot-fill';
import BlockQuickNavigation from '../block-quick-navigation';
import { useBorderPanelLabel } from '../../hooks/border';

Expand Down Expand Up @@ -253,7 +252,6 @@ const BlockInspectorSingleBlock = ( {
className={ blockInformation.isSynced && 'is-synced' }
/>
<BlockVariationTransforms blockClientId={ clientId } />
<BlockInfo.Slot />
{ showTabs && (
<InspectorControlsTabs
hasBlockStyles={ hasBlockStyles }
Expand Down
2 changes: 0 additions & 2 deletions packages/block-editor/src/private-apis.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
normalizeString,
} from './components/inserter/search-items';
import { PrivateListView } from './components/list-view';
import BlockInfo from './components/block-info-slot-fill';
import { useHasBlockToolbar } from './components/block-toolbar/use-has-block-toolbar';
import { cleanEmptyObject } from './hooks/utils';
import BlockQuickNavigation from './components/block-quick-navigation';
Expand Down Expand Up @@ -67,7 +66,6 @@ lock( privateApis, {
normalizeString,
PrivateListView,
ResizableBoxPopover,
BlockInfo,
useHasBlockToolbar,
cleanEmptyObject,
BlockQuickNavigation,
Expand Down

This file was deleted.

10 changes: 0 additions & 10 deletions packages/block-library/src/query/edit/inspector-controls/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
import { useSelect } from '@wordpress/data';
import { store as coreStore } from '@wordpress/core-data';
import { __ } from '@wordpress/i18n';
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
import { debounce } from '@wordpress/compose';
import { useEffect, useState, useCallback } from '@wordpress/element';

Expand All @@ -28,11 +27,9 @@ import ParentControl from './parent-control';
import { TaxonomyControls } from './taxonomy-controls';
import FormatControls from './format-controls';
import StickyControl from './sticky-control';
import CreateNewPostLink from './create-new-post-link';
import PerPageControl from './per-page-control';
import OffsetControl from './offset-controls';
import PagesControl from './pages-control';
import { unlock } from '../../../lock-unlock';
import {
usePostTypes,
useIsPostTypeHierarchical,
Expand All @@ -42,8 +39,6 @@ import {
} from '../../utils';
import { useToolsPanelDropdownMenuProps } from '../../../utils/hooks';

const { BlockInfo } = unlock( blockEditorPrivateApis );

export default function QueryInspectorControls( props ) {
const { attributes, setQuery, setDisplayLayout, isSingular } = props;
const { query, displayLayout } = attributes;
Expand Down Expand Up @@ -191,11 +186,6 @@ export default function QueryInspectorControls( props ) {

return (
<>
{ !! postType && (
<BlockInfo>
<CreateNewPostLink postType={ postType } />
</BlockInfo>
) }
{ showSettingsPanel && (
<PanelBody title={ __( 'Settings' ) }>
{ showInheritControl && (
Expand Down
4 changes: 0 additions & 4 deletions packages/block-library/src/query/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
}
}

.wp-block-query__create-new-link {
padding: 0 $grid-unit-20 $grid-unit-20 52px;
}

.block-library-query__pattern-selection-content .block-editor-block-patterns-list {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
Expand Down

1 comment on commit 514b670

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 514b670.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12028638271
📝 Reported issues:

Please sign in to comment.