Skip to content

Commit

Permalink
Remove 4.3 deprecated APIs (#11679)
Browse files Browse the repository at this point in the history
* Remove 4.3 deprecated APIs

* Update changelogs

* Remove useless package dependency

* Remove useless snapshot and mock

* Update docs
  • Loading branch information
youknowriad authored Nov 9, 2018
1 parent 4338dcf commit 004d731
Show file tree
Hide file tree
Showing 16 changed files with 19 additions and 201 deletions.
22 changes: 0 additions & 22 deletions docs/data/data-core-edit-post.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,20 +103,6 @@ enabled by default.

Whether or not the panel is enabled.

### isEditorSidebarPanelOpened

Returns true if the given panel is enabled, or false otherwise. Panels are
enabled by default.

*Parameters*

* state: Global application state.
* panel: A string that identifies the panel.

*Returns*

Whether or not the panel is enabled.

### isEditorPanelOpened

Returns true if the given panel is open, or false otherwise. Panels are
Expand Down Expand Up @@ -311,14 +297,6 @@ Returns an action object used to enable or disable a panel in the editor.

Returns an action object used to open or close a panel in the editor.

*Parameters*

* panelName: A string that identifies the panel to open or close.

### toggleGeneralSidebarEditorPanel

Returns an action object used to open or close a panel in the editor.

*Parameters*

* panelName: A string that identifies the panel to open or close.
Expand Down
1 change: 0 additions & 1 deletion lib/client-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,6 @@ function gutenberg_register_scripts_and_styles() {
'wp-compose',
'wp-core-data',
'wp-data',
'wp-deprecated',
'wp-dom-ready',
'wp-editor',
'wp-element',
Expand Down
1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 6.0.0 (Unreleased)

### Breaking Changes

- The `PanelColor` component has been removed.

## 5.1.1 (2018-11-09)

## 5.1.0 (2018-11-09)
Expand Down
1 change: 0 additions & 1 deletion packages/components/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export { default as Notice } from './notice';
export { default as NoticeList } from './notice/list';
export { default as Panel } from './panel';
export { default as PanelBody } from './panel/body';
export { default as PanelColor } from './panel/color';
export { default as PanelHeader } from './panel/header';
export { default as PanelRow } from './panel/row';
export { default as Placeholder } from './placeholder';
Expand Down
40 changes: 0 additions & 40 deletions packages/components/src/panel/color.js

This file was deleted.

16 changes: 0 additions & 16 deletions packages/components/src/panel/test/__snapshots__/color.js.snap

This file was deleted.

21 changes: 0 additions & 21 deletions packages/components/src/panel/test/color.js

This file was deleted.

7 changes: 7 additions & 0 deletions packages/edit-post/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 3.0.0 (Unreleased)

### Breaking Changes

- `isEditorSidebarPanelOpened` selector (`core/edit-post`) has been removed. Please use `isEditorPanelEnabled` instead.
- `toggleGeneralSidebarEditorPanel` action (`core/edit-post`) has been removed. Please use `toggleEditorPanelOpened` instead.

## 2.1.1 (2018-11-09)

## 2.1.0 (2018-11-09)
Expand Down
1 change: 0 additions & 1 deletion packages/edit-post/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"@wordpress/compose": "file:../compose",
"@wordpress/core-data": "file:../core-data",
"@wordpress/data": "file:../data",
"@wordpress/deprecated": "file:../deprecated",
"@wordpress/editor": "file:../editor",
"@wordpress/element": "file:../element",
"@wordpress/format-library": "file:../format-library",
Expand Down
21 changes: 0 additions & 21 deletions packages/edit-post/src/store/actions.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* WordPress dependencies
*/
import deprecated from '@wordpress/deprecated';

/**
* Returns an action object used in signalling that the user opened an editor sidebar.
*
Expand Down Expand Up @@ -116,22 +111,6 @@ export function toggleEditorPanelOpened( panelName ) {
};
}

/**
* Returns an action object used to open or close a panel in the editor.
*
* @param {string} panelName A string that identifies the panel to open or close.
*
* @return {Object} Action object.
*/
export function toggleGeneralSidebarEditorPanel( panelName ) {
deprecated( 'toggleGeneralSidebarEditorPanel', {
alternative: 'toggleEditorPanelOpened',
plugin: 'Gutenberg',
version: '4.3.0',
} );
return toggleEditorPanelOpened( panelName );
}

/**
* Returns an action object used to toggle a feature flag.
*
Expand Down
23 changes: 0 additions & 23 deletions packages/edit-post/src/store/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
import createSelector from 'rememo';
import { get, includes, some, flatten, values } from 'lodash';

/**
* WordPress dependencies
*/
import deprecated from '@wordpress/deprecated';

/**
* Returns the current editing mode.
*
Expand Down Expand Up @@ -118,24 +113,6 @@ export function isEditorPanelEnabled( state, panelName ) {
return get( panels, [ panelName, 'enabled' ], true );
}

/**
* Returns true if the given panel is enabled, or false otherwise. Panels are
* enabled by default.
*
* @param {Object} state Global application state.
* @param {string} panel A string that identifies the panel.
*
* @return {boolean} Whether or not the panel is enabled.
*/
export function isEditorSidebarPanelOpened( state, panel ) {
deprecated( 'isEditorSidebarPanelOpened', {
alternative: 'isEditorPanelEnabled',
plugin: 'Gutenberg',
version: '4.3',
} );
return isEditorPanelEnabled( state, panel );
}

/**
* Returns true if the given panel is open, or false otherwise. Panels are
* closed by default.
Expand Down
11 changes: 0 additions & 11 deletions packages/edit-post/src/store/test/selectors.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* WordPress dependencies
*/
import deprecated from '@wordpress/deprecated';

/**
* Internal dependencies
*/
Expand All @@ -23,13 +18,7 @@ import {
isEditorPanelEnabled,
} from '../selectors';

jest.mock( '@wordpress/deprecated', () => jest.fn() );

describe( 'selectors', () => {
beforeEach( () => {
deprecated.mockClear();
} );

describe( 'getEditorMode', () => {
it( 'should return the selected editor mode', () => {
const state = {
Expand Down
6 changes: 6 additions & 0 deletions packages/editor/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 7.0.0 (Unreleased)

### Breaking Changes

- The `PanelColor` component has been removed.

## 6.2.1 (2018-11-09)

### Polish
Expand Down
1 change: 0 additions & 1 deletion packages/editor/src/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export * from './font-sizes';
export { default as InnerBlocks } from './inner-blocks';
export { default as InspectorAdvancedControls } from './inspector-advanced-controls';
export { default as InspectorControls } from './inspector-controls';
export { default as PanelColor } from './panel-color';
export { default as PanelColorSettings } from './panel-color-settings';
export { default as PlainText } from './plain-text';
export {
Expand Down
42 changes: 0 additions & 42 deletions packages/editor/src/components/panel-color/index.js

This file was deleted.

0 comments on commit 004d731

Please sign in to comment.