Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Components: Assess stabilization of UnitControl #61071

Draft
wants to merge 2 commits into
base: trunk
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

- `UnitControl`: Remove "experimental" designation ([#61071](https://github.com/WordPress/gutenberg/pull/61071)).

### Enhancements

- `InputControl`: Add a password visibility toggle story ([#60898](https://github.com/WordPress/gutenberg/pull/60898)).
Expand Down
4 changes: 4 additions & 0 deletions packages/components/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,13 @@ export {
export { default as TreeSelect } from './tree-select';
export { Truncate as __experimentalTruncate } from './truncate';
export {
/**
* @deprecated Import `UnitControl` instead.
*/
default as __experimentalUnitControl,
useCustomUnits as __experimentalUseCustomUnits,
parseQuantityAndUnitFromRawValue as __experimentalParseQuantityAndUnitFromRawValue,
UnitControl,
} from './unit-control';
export { View as __experimentalView } from './view';
export { VisuallyHidden } from './visually-hidden';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ import {
__experimentalBoxControl as BoxControl,
__experimentalToolsPanel as ToolsPanel,
__experimentalToolsPanelItem as ToolsPanelItem,
__experimentalUnitControl as UnitControl,
UnitControl,
} from '@wordpress/components';
import { __ } from '@wordpress/i18n';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const UnconnectedToolsPanel = (
* import {
* __experimentalToolsPanel as ToolsPanel,
* __experimentalToolsPanelItem as ToolsPanelItem,
* __experimentalUnitControl as UnitControl
* UnitControl
* } from '@wordpress/components';
*
* function Example() {
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/unit-control/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This feature is still experimental. “Experimental” means this is an early im

```jsx
import { useState } from 'react';
import { __experimentalUnitControl as UnitControl } from '@wordpress/components';
import { UnitControl } from '@wordpress/components';

const Example = () => {
const [ value, setValue ] = useState( '10px' );
Expand Down Expand Up @@ -116,7 +116,7 @@ Example:

```jsx
import { useState } from 'react';
import { __experimentalUnitControl as UnitControl } from '@wordpress/components';
import { UnitControl } from '@wordpress/components';

const Example = () => {
const [ value, setValue ] = useState( '10px' );
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/unit-control/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ function UnforwardedUnitControl(
*
*
* ```jsx
* import { __experimentalUnitControl as UnitControl } from '@wordpress/components';
* import { UnitControl } from '@wordpress/components';
* import { useState } from '@wordpress/element';
*
* const Example = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { CSS_UNITS } from '../utils';

const meta: Meta< typeof UnitControl > = {
component: UnitControl,
title: 'Components (Experimental)/UnitControl',
title: 'Components/UnitControl',
argTypes: {
__unstableInputWidth: { control: { type: 'text' } },
__unstableStateReducer: { control: { type: null } },
Expand Down
5 changes: 4 additions & 1 deletion storybook/manager-head.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<script>
( function redirectIfStoryMoved() {
const PREVIOUSLY_EXPERIMENTAL_COMPONENTS = [ 'navigation' ];
const PREVIOUSLY_EXPERIMENTAL_COMPONENTS = [
'navigation',
'unitcontrol',
];
const REDIRECTS = [
{
from: /\/components-deprecated-/,
Expand Down
Loading