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 BoxControl #60921

Closed
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
5 changes: 5 additions & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@

## Unreleased

### Deprecation

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

## 27.4.0 (2024-04-19)

### Deprecation

- `Navigation`: Soft deprecate component ([#59182](https://github.com/WordPress/gutenberg/pull/59182)).
- `BoxControl`: Remove "experimental" designation ([#60921](https://github.com/WordPress/gutenberg/pull/60921)).

### Enhancements

Expand Down
6 changes: 1 addition & 5 deletions packages/components/src/box-control/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
# BoxControl

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

BoxControl components let users set values for Top, Right, Bottom, and Left. This can be used as an input control for values like `padding` or `margin`.

## Usage

```jsx
import { useState } from 'react';
import { __experimentalBoxControl as BoxControl } from '@wordpress/components';
import { BoxControl } from '@wordpress/components';

const Example = () => {
const [ values, setValues ] = useState( {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/box-control/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function useUniqueId( idProp?: string ) {
* This can be used as an input control for values like `padding` or `margin`.
*
* ```jsx
* import { __experimentalBoxControl as BoxControl } from '@wordpress/components';
* import { BoxControl } from '@wordpress/components';
* import { useState } from '@wordpress/element';
*
* const Example = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { useState } from '@wordpress/element';
import BoxControl from '../';

const meta: Meta< typeof BoxControl > = {
title: 'Components (Experimental)/BoxControl',
title: 'Components/BoxControl',
component: BoxControl,
argTypes: {
values: { control: { type: null } },
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 @@ -36,8 +36,12 @@ export {
} from './border-box-control';
export { BorderControl as __experimentalBorderControl } from './border-control';
export {
/**
* @deprecated Import `BoxControl` instead.
*/
default as __experimentalBoxControl,
applyValueToSides as __experimentalApplyValueToSides,
default as BoxControl,
} from './box-control';
export { default as Button } from './button';
export { default as ButtonGroup } from './button-group';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ import styled from '@emotion/styled';
* WordPress dependencies
*/
import {
__experimentalBoxControl as BoxControl,
BoxControl,
__experimentalToolsPanel as ToolsPanel,
__experimentalToolsPanelItem as ToolsPanelItem,
__experimentalUnitControl as UnitControl,
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',
'boxcontrol',
];
const REDIRECTS = [
{
from: /\/components-deprecated-/,
Expand Down
Loading