From ad119ad734ef2f6ec7807bbc93f873c1d635319c Mon Sep 17 00:00:00 2001 From: Kerry Liu Date: Fri, 11 Jun 2021 08:06:28 -0700 Subject: [PATCH] Performance: Remove `is-typing` root class (#32567) --- .../src/components/block-list/index.js | 34 ++++++++----------- .../src/components/block-list/style.scss | 2 +- .../use-block-props/use-block-class-names.js | 3 ++ 3 files changed, 18 insertions(+), 21 deletions(-) diff --git a/packages/block-editor/src/components/block-list/index.js b/packages/block-editor/src/components/block-list/index.js index 87784cef2fbf53..46e5d56f9f0317 100644 --- a/packages/block-editor/src/components/block-list/index.js +++ b/packages/block-editor/src/components/block-list/index.js @@ -27,25 +27,20 @@ export const IntersectionObserver = createContext(); function Root( { className, children } ) { const isLargeViewport = useViewportMatch( 'medium' ); - const { - isTyping, - isOutlineMode, - isFocusMode, - isNavigationMode, - } = useSelect( ( select ) => { - const { - isTyping: _isTyping, - getSettings, - isNavigationMode: _isNavigationMode, - } = select( blockEditorStore ); - const { outlineMode, focusMode } = getSettings(); - return { - isTyping: _isTyping(), - isOutlineMode: outlineMode, - isFocusMode: focusMode, - isNavigationMode: _isNavigationMode(), - }; - }, [] ); + const { isOutlineMode, isFocusMode, isNavigationMode } = useSelect( + ( select ) => { + const { getSettings, isNavigationMode: _isNavigationMode } = select( + blockEditorStore + ); + const { outlineMode, focusMode } = getSettings(); + return { + isOutlineMode: outlineMode, + isFocusMode: focusMode, + isNavigationMode: _isNavigationMode(), + }; + }, + [] + ); return (