Skip to content

Commit

Permalink
Add __experimental prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
ciampo committed Feb 2, 2023
1 parent 61bb5f8 commit 9f3158b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions packages/block-editor/src/components/url-popover/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/experiments.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -18,5 +18,5 @@ export const { lock, unlock } =
export const experiments = {};
lock( experiments, {
CustomSelectControl,
popoverLegacyPositionToPlacement,
__experimentalPopoverLegacyPositionToPlacement,
} );

0 comments on commit 9f3158b

Please sign in to comment.