From 5dbf02d5b7b06e5d772f086cd5ce62392beb7c9c Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Fri, 2 Mar 2018 10:48:52 +0100 Subject: [PATCH] Block Toolbar: Do not hide the block toolbar on mobile --- edit-post/components/header/header-toolbar/index.js | 6 ++---- edit-post/components/visual-editor/index.js | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/edit-post/components/header/header-toolbar/index.js b/edit-post/components/header/header-toolbar/index.js index 452656debf362..8e6728a86d132 100644 --- a/edit-post/components/header/header-toolbar/index.js +++ b/edit-post/components/header/header-toolbar/index.js @@ -3,7 +3,6 @@ */ import { compose } from '@wordpress/element'; import { withSelect } from '@wordpress/data'; -import { withViewportMatch } from '@wordpress/viewport'; /** * WordPress dependencies @@ -24,7 +23,7 @@ import { */ import './style.scss'; -function HeaderToolbar( { hasFixedToolbar, isLargeViewport } ) { +function HeaderToolbar( { hasFixedToolbar } ) { return ( - { hasFixedToolbar && isLargeViewport && ( + { hasFixedToolbar && (
@@ -48,5 +47,4 @@ export default compose( [ withSelect( ( select ) => ( { hasFixedToolbar: select( 'core/edit-post' ).isFeatureActive( 'fixedToolbar' ), } ) ), - withViewportMatch( { isLargeViewport: 'medium' } ), ] )( HeaderToolbar ); diff --git a/edit-post/components/visual-editor/index.js b/edit-post/components/visual-editor/index.js index 1d621863aeb3c..c5308cda8f862 100644 --- a/edit-post/components/visual-editor/index.js +++ b/edit-post/components/visual-editor/index.js @@ -12,7 +12,6 @@ import { } from '@wordpress/editor'; import { Fragment, compose } from '@wordpress/element'; import { withSelect } from '@wordpress/data'; -import { withViewportMatch } from '@wordpress/viewport'; /** * Internal dependencies @@ -20,7 +19,7 @@ import { withViewportMatch } from '@wordpress/viewport'; import './style.scss'; import BlockInspectorButton from './block-inspector-button'; -function VisualEditor( { hasFixedToolbar, isLargeViewport } ) { +function VisualEditor( { hasFixedToolbar } ) { return ( @@ -29,7 +28,7 @@ function VisualEditor( { hasFixedToolbar, isLargeViewport } ) { ( @@ -46,5 +45,4 @@ export default compose( [ withSelect( ( select ) => ( { hasFixedToolbar: select( 'core/edit-post' ).isFeatureActive( 'fixedToolbar' ), } ) ), - withViewportMatch( { isLargeViewport: 'medium' } ), ] )( VisualEditor );