From b281bc275cab072722a0620da22bb3185fb773c9 Mon Sep 17 00:00:00 2001 From: Marko Andrijasevic Date: Tue, 6 Nov 2018 15:16:58 +0100 Subject: [PATCH] Gutenberg: remove remaining usages of wordpress/nux package (#28267) We don't use core guided tour in Calypso so we don't need the DotTip component from this package. Since this is the last remaining usage, I'm cleaning up the whole package so we don't have to worry about it in future renovate updates. --- .../edit-post/components/header/index.js | 8 +--- .../components/header/more-menu/index.js | 2 - .../components/header/tips-toggle/index.js | 45 ------------------- package.json | 1 - 4 files changed, 2 insertions(+), 54 deletions(-) delete mode 100644 client/gutenberg/editor/edit-post/components/header/tips-toggle/index.js diff --git a/client/gutenberg/editor/edit-post/components/header/index.js b/client/gutenberg/editor/edit-post/components/header/index.js index 9f82139d9600b8..16505af0321dfd 100644 --- a/client/gutenberg/editor/edit-post/components/header/index.js +++ b/client/gutenberg/editor/edit-post/components/header/index.js @@ -13,7 +13,6 @@ import { IconButton } from '@wordpress/components'; import { PostPreviewButton, PostSavedState } from '@wordpress/editor'; import { withDispatch, withSelect } from '@wordpress/data'; import { compose } from '@wordpress/compose'; -import { DotTip } from '@wordpress/nux'; /** * Internal dependencies @@ -32,6 +31,7 @@ function Header( { } ) { const toggleGeneralSidebar = isEditorSidebarOpened ? closeGeneralSidebar : openGeneralSidebar; + /* eslint-disable wpcalypso/jsx-classname-namespace */ return (
- - { __( - 'You’ll find more settings for your page and blocks in the sidebar. Click “Settings” to open it.' - ) } -
@@ -67,6 +62,7 @@ function Header( { ) } ); + /* eslint-enable wpcalypso/jsx-classname-namespace */ } export default compose( diff --git a/client/gutenberg/editor/edit-post/components/header/more-menu/index.js b/client/gutenberg/editor/edit-post/components/header/more-menu/index.js index 90c46e46fa051e..bad1370b656af9 100644 --- a/client/gutenberg/editor/edit-post/components/header/more-menu/index.js +++ b/client/gutenberg/editor/edit-post/components/header/more-menu/index.js @@ -15,7 +15,6 @@ import { IconButton, Dropdown, MenuGroup } from '@wordpress/components'; import ModeSwitcher from '../mode-switcher'; import FixedToolbarToggle from '../fixed-toolbar-toggle'; import PluginMoreMenuGroup from '../plugins-more-menu-group'; -import TipsToggle from '../tips-toggle'; /* eslint-disable wpcalypso/jsx-classname-namespace */ const MoreMenu = () => ( @@ -38,7 +37,6 @@ const MoreMenu = () => ( filterName="editPost.MoreMenu.settings" > - - { __( 'Show Tips' ) } - - ); -} - -export default compose( [ - withSelect( ( select ) => ( { - isActive: select( 'core/nux' ).areTipsEnabled(), - } ) ), - withDispatch( ( dispatch, ownProps ) => ( { - onToggle() { - const { disableTips, enableTips } = dispatch( 'core/nux' ); - if ( ownProps.isActive ) { - disableTips(); - } else { - enableTips(); - } - ownProps.onToggle(); - }, - } ) ), -] )( TipsToggle ); diff --git a/package.json b/package.json index 6089e137103b29..9f02ebe6ac47c9 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,6 @@ "@wordpress/hooks": "2.0.3", "@wordpress/i18n": "3.0.1", "@wordpress/keycodes": "2.0.3", - "@wordpress/nux": "2.0.9", "@wordpress/plugins": "2.0.6", "@wordpress/rich-text": "2.0.2", "@wordpress/url": "2.2.0",