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 InputControl #61059

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

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

### Enhancements

- `InputControl`: Add a password visibility toggle story ([#60898](https://github.com/WordPress/gutenberg/pull/60898)).
Expand Down
8 changes: 7 additions & 1 deletion packages/components/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,13 @@ export {
ItemGroup as __experimentalItemGroup,
Item as __experimentalItem,
} from './item-group';
export { default as __experimentalInputControl } from './input-control';
export {
/**
* @deprecated Import `InputControl` instead.
*/
default as __experimentalInputControl,
InputControl,
} from './input-control';
export { default as __experimentalInputControlPrefixWrapper } from './input-control/input-prefix-wrapper';
export { default as __experimentalInputControlSuffixWrapper } from './input-control/input-suffix-wrapper';
export { default as KeyboardShortcuts } from './keyboard-shortcuts';
Expand Down
6 changes: 1 addition & 5 deletions packages/components/src/input-control/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
# InputControl

<div class="callout callout-alert">
This feature is still experimental. “Experimental” means this is an early implementation subject to drastic and breaking changes.
</div>

InputControl components let users enter and edit text. This is an experimental component intended to (in time) merge with or replace [TextControl](../text-control).

## Usage

```js
import { __experimentalInputControl as InputControl } from '@wordpress/components';
import { InputControl } from '@wordpress/components';
import { useState } from 'react';

const Example = () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/input-control/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export function UnforwardedInputControl(
* intended to (in time) merge with or replace `TextControl`.
*
* ```jsx
* import { __experimentalInputControl as InputControl } from '@wordpress/components';
* import { InputControl } from '@wordpress/components';
* import { useState } from 'react';
*
* const Example = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function UnconnectedInputControlPrefixWrapper(
*
* ```jsx
* import {
* __experimentalInputControl as InputControl,
* InputControl,
* __experimentalInputControlPrefixWrapper as InputControlPrefixWrapper,
* } from '@wordpress/components';
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function UnconnectedInputControlSuffixWrapper(
*
* ```jsx
* import {
* __experimentalInputControl as InputControl,
* InputControl,
* __experimentalInputControlSuffixWrapper as InputControlSuffixWrapper,
* } from '@wordpress/components';
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { InputControlSuffixWrapper } from '../input-suffix-wrapper';
import Button from '../../button';

const meta: Meta< typeof InputControl > = {
title: 'Components (Experimental)/InputControl',
title: 'Components/InputControl',
component: InputControl,
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
subcomponents: { InputControlPrefixWrapper, InputControlSuffixWrapper },
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/input-control/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export interface InputBaseProps extends BaseProps, FlexProps {
*
* @example
* import {
* __experimentalInputControl as InputControl,
* InputControl,
* __experimentalInputControlPrefixWrapper as InputControlPrefixWrapper,
* } from '@wordpress/components';
*
Expand All @@ -148,7 +148,7 @@ export interface InputBaseProps extends BaseProps, FlexProps {
*
* @example
* import {
* __experimentalInputControl as InputControl,
* InputControl,
* __experimentalInputControlSuffixWrapper as InputControlSuffixWrapper,
* } from '@wordpress/components';
*
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',
'inputcontrol',
];
const REDIRECTS = [
{
from: /\/components-deprecated-/,
Expand Down
Loading