Skip to content

Commit

Permalink
fix don’t deprecate internal link control components
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiankaegy committed Dec 10, 2024
1 parent fbeb16e commit 52ed606
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 54 deletions.
12 changes: 0 additions & 12 deletions packages/block-editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -667,18 +667,6 @@ _Parameters_

- _props_ `WPLinkControlProps`: Component props.

### LinkControlSearchInput

Undocumented declaration.

### LinkControlSearchItem

Undocumented declaration.

### LinkControlSearchResults

Undocumented declaration.

### MediaPlaceholder

_Related_
Expand Down
15 changes: 3 additions & 12 deletions packages/block-editor/src/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,9 @@ export {
default as LinkControl,
DeprecatedExperimentalLinkControl as __experimentalLinkControl,
} from './link-control';
export {
default as LinkControlSearchInput,
DeprecatedExperimentalLinkControlSearchInput as __experimentalLinkControlSearchInput,
} from './link-control/search-input';
export {
default as LinkControlSearchResults,
DeprecatedExperimentalLinkControlSearchResults as __experimentalLinkControlSearchResults,
} from './link-control/search-results';
export {
default as LinkControlSearchItem,
DeprecatedExperimentalLinkControlSearchItem as __experimentalLinkControlSearchItem,
} from './link-control/search-item';
export { default as __experimentalLinkControlSearchInput } from './link-control/search-input';
export { default as __experimentalLinkControlSearchResults } from './link-control/search-results';
export { default as __experimentalLinkControlSearchItem } from './link-control/search-item';
export { default as LineHeightControl } from './line-height-control';
export { default as __experimentalListView } from './list-view';
export { default as MediaReplaceFlow } from './media-replace-flow';
Expand Down
11 changes: 0 additions & 11 deletions packages/block-editor/src/components/link-control/search-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { URLInput } from '../';
import LinkControlSearchResults from './search-results';
import { CREATE_TYPE } from './constants';
import useSearchHandler from './use-search-handler';
import deprecated from '@wordpress/deprecated';

// Must be a function as otherwise URLInput will default
// to the fetchLinkSuggestions passed in block editor settings
Expand Down Expand Up @@ -156,14 +155,4 @@ const LinkControlSearchInput = forwardRef(
}
);

export const DeprecatedExperimentalLinkControlSearchInput = forwardRef(
( props, ref ) => {
deprecated( 'wp.blockEditor.__experimentalLinkControlSearchInput', {
since: '6.5',
alternative: 'wp.blockEditor.LinkControlSearchInput',
} );
return <LinkControlSearchInput { ...props } ref={ ref } />;
}
);

export default LinkControlSearchInput;
10 changes: 0 additions & 10 deletions packages/block-editor/src/components/link-control/search-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import {
import { __unstableStripHTML as stripHTML } from '@wordpress/dom';
import { safeDecodeURI, filterURLForDisplay, getPath } from '@wordpress/url';
import { pipe } from '@wordpress/compose';
import deprecated from '@wordpress/deprecated';

const ICONS_MAP = {
post: postList,
Expand Down Expand Up @@ -160,13 +159,4 @@ function getVisualTypeName( suggestion ) {
return suggestion.type === 'post_tag' ? 'tag' : suggestion.type;
}

export const DeprecatedExperimentalLinkControlSearchItem = ( props ) => {
deprecated( 'wp.blockEditor.__experimentalLinkControlSearchItem', {
since: '6.5',
alternative: 'wp.blockEditor.LinkControlSearchItem',
} );

return <LinkControlSearchItem { ...props } />;
};

export default LinkControlSearchItem;
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import clsx from 'clsx';
import LinkControlSearchCreate from './search-create-button';
import LinkControlSearchItem from './search-item';
import { CREATE_TYPE, LINK_ENTRY_TYPES } from './constants';
import deprecated from '@wordpress/deprecated';

export default function LinkControlSearchResults( {
withCreateSuggestion,
Expand Down Expand Up @@ -122,11 +121,3 @@ export default function LinkControlSearchResults( {
</div>
);
}

export const DeprecatedExperimentalLinkControlSearchResults = ( props ) => {
deprecated( 'wp.blockEditor.__experimentalLinkControlSearchResults', {
since: '6.5',
alternative: 'wp.blockEditor.LinkControlSearchResults',
} );
return <LinkControlSearchResults { ...props } />;
};

0 comments on commit 52ed606

Please sign in to comment.