From 9f3158b79c741d6aa29d989a7f8994f89f3dafea Mon Sep 17 00:00:00 2001 From: Marco Ciampini Date: Thu, 2 Feb 2023 09:31:54 +0100 Subject: [PATCH] Add __experimental prefix --- packages/block-editor/src/components/url-popover/index.js | 7 +++++-- packages/components/CHANGELOG.md | 2 +- packages/components/src/experiments.js | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/block-editor/src/components/url-popover/index.js b/packages/block-editor/src/components/url-popover/index.js index d56879fcf8a177..8c2bbec69c5de6 100644 --- a/packages/block-editor/src/components/url-popover/index.js +++ b/packages/block-editor/src/components/url-popover/index.js @@ -18,7 +18,9 @@ import LinkViewer from './link-viewer'; import LinkEditor from './link-editor'; import { unlock } from '../../lock-unlock'; -const { popoverLegacyPositionToPlacement } = unlock( componentsExperiments ); +const { __experimentalPopoverLegacyPositionToPlacement } = unlock( + componentsExperiments +); const DEFAULT_PLACEMENT = 'bottom'; @@ -49,7 +51,8 @@ function URLPopover( { if ( placement !== undefined ) { computedPlacement = placement; } else if ( position !== undefined ) { - computedPlacement = popoverLegacyPositionToPlacement( position ); + computedPlacement = + __experimentalPopoverLegacyPositionToPlacement( position ); } computedPlacement = computedPlacement || DEFAULT_PLACEMENT; diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 3c996e421df42f..69c4bff2115551 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -24,7 +24,7 @@ - `Button`: Convert to TypeScript ([#46997](https://github.com/WordPress/gutenberg/pull/46997)). - `QueryControls`: Convert to TypeScript ([#46721](https://github.com/WordPress/gutenberg/pull/46721)). - `Notice`: refactor to TypeScript ([47118](https://github.com/WordPress/gutenberg/pull/47118)). -- Lock the `__experimentalPopoverPositionToPlacement` function and rename it to `popoverLegacyPositionToPlacement` ([#47505](https://github.com/WordPress/gutenberg/pull/47505)). +- Lock the `__experimentalPopoverPositionToPlacement` function and rename it to `__experimentalPopoverLegacyPositionToPlacement` ([#47505](https://github.com/WordPress/gutenberg/pull/47505)). ### Bug Fix diff --git a/packages/components/src/experiments.js b/packages/components/src/experiments.js index b2688395ae2207..67506a853a928d 100644 --- a/packages/components/src/experiments.js +++ b/packages/components/src/experiments.js @@ -7,7 +7,7 @@ import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/exp * Internal dependencies */ import { default as CustomSelectControl } from './custom-select-control'; -import { positionToPlacement as popoverLegacyPositionToPlacement } from './popover/utils'; +import { positionToPlacement as __experimentalPopoverLegacyPositionToPlacement } from './popover/utils'; export const { lock, unlock } = __dangerousOptInToUnstableAPIsOnlyForCoreModules( @@ -18,5 +18,5 @@ export const { lock, unlock } = export const experiments = {}; lock( experiments, { CustomSelectControl, - popoverLegacyPositionToPlacement, + __experimentalPopoverLegacyPositionToPlacement, } );