Skip to content

Commit

Permalink
Move InserterButton from components package to block-editor package (#…
Browse files Browse the repository at this point in the history
…56494)

* Move mobile InserterButton from components package to block-editor package

* Add @wordpress/primitives to block-editor package dependencies

* Update react-native-editor CHANGELOG

* Move SVG and Path imports from @wordpress/primitives to @wordpress/components

* Update components package CHANGELOG

* Update InserterButton import paths
  • Loading branch information
derekblank committed Dec 7, 2023
1 parent 005d03b commit 77f89d2
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
* WordPress dependencies
*/
import { useState, useEffect } from '@wordpress/element';
import { BottomSheet, Gradient, InserterButton } from '@wordpress/components';
import { BottomSheet, Gradient } from '@wordpress/components';
import {
usePreferredColorScheme,
usePreferredColorSchemeStyle,
Expand All @@ -25,6 +25,7 @@ import {
* Internal dependencies
*/
import styles from './style.scss';
import InserterButton from '../inserter-button';

const MIN_COL_NUM = 3;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import {
PanelBody,
BottomSheet,
FooterMessageControl,
InserterButton,
} from '@wordpress/components';
import { Icon, close } from '@wordpress/icons';

Expand All @@ -29,6 +28,7 @@ import { Icon, close } from '@wordpress/icons';
*/
import styles from './style.scss';
import { store as blockEditorStore } from '../../store';
import InserterButton from '../inserter-button';

const hitSlop = { top: 22, bottom: 22, left: 22, right: 22 };

Expand Down
1 change: 1 addition & 0 deletions packages/block-editor/src/components/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export { default as BlockStyles } from './block-styles';
export { default as DefaultBlockAppender } from './default-block-appender';
export { default as __unstableEditorStyles } from './editor-styles';
export { default as Inserter } from './inserter';
export { default as InserterButton } from './inserter-button';
export { useBlockProps } from './block-list/use-block-props';
export { default as FloatingToolbar } from './floating-toolbar';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import { Component } from '@wordpress/element';
import { Icon } from '@wordpress/components';
import { withPreferredColorScheme } from '@wordpress/compose';
import { __, sprintf } from '@wordpress/i18n';
import { BlockIcon } from '@wordpress/block-editor';

/**
* Internal dependencies
*/
import { BlockIcon } from '../block-icon';
import styles from './style.scss';
import sparkles from './sparkles';
class MenuItem extends Component {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* WordPress dependencies
*/
import { SVG, Path } from '@wordpress/primitives';
import { SVG, Path } from '@wordpress/components';

const sparkles = (
<SVG viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
Expand Down
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

- `FormToggle`: refine animation and improve high contrast styles ([#56515](https://github.com/WordPress/gutenberg/pull/56515)).
- `Button`: Add focus rings to focusable disabled buttons ([#56383](https://github.com/WordPress/gutenberg/pull/56383)).
- `InserterButton`: Move mobile InserterButton from components package to block-editor package ([#56494](https://github.com/WordPress/gutenberg/pull/56494))

### Bug Fix

Expand Down
1 change: 0 additions & 1 deletion packages/components/src/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ export { default as ImageLinkDestinationsScreen } from './mobile/link-settings/i
export { default as SegmentedControl } from './mobile/segmented-control';
export { default as Image, IMAGE_DEFAULT_FOCAL_POINT } from './mobile/image';
export { default as ImageEditingButton } from './mobile/image/image-editing-button';
export { default as InserterButton } from './mobile/inserter-button';
export { setClipboard, getClipboard } from './mobile/clipboard';
export { default as AudioPlayer } from './mobile/audio-player';
export { default as Badge } from './mobile/badge';
Expand Down
1 change: 1 addition & 0 deletions packages/react-native-editor/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ For each user feature we should also add a importance categorization label to i
-->

## Unreleased
- [*] [internal] Move InserterButton from components package to block-editor package [#56494]
- [***] Fix issue when backspacing in an empty Paragraph block [#56496]
- [**] Editor displays user of network connection status when offline [#56627]

Expand Down

0 comments on commit 77f89d2

Please sign in to comment.