Skip to content

Commit

Permalink
Added is-focus-mode class on all viewports. (#67377)
Browse files Browse the repository at this point in the history
Co-authored-by: yogeshbhutkar <[email protected]>
  • Loading branch information
yogeshbhutkar and yogeshbhutkar authored Dec 19, 2024
1 parent b226cee commit 030c680
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions packages/block-editor/src/components/block-list/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@ import {
useDispatch,
useRegistry,
} from '@wordpress/data';
import {
useViewportMatch,
useMergeRefs,
useDebounce,
} from '@wordpress/compose';
import { useMergeRefs, useDebounce } from '@wordpress/compose';
import {
createContext,
useMemo,
Expand Down Expand Up @@ -46,7 +42,6 @@ export const IntersectionObserver = createContext();
const pendingBlockVisibilityUpdatesPerRegistry = new WeakMap();

function Root( { className, ...settings } ) {
const isLargeViewport = useViewportMatch( 'medium' );
const { isOutlineMode, isFocusMode, temporarilyEditingAsBlocks } =
useSelect( ( select ) => {
const { getSettings, getTemporarilyEditingAsBlocks, isTyping } =
Expand Down Expand Up @@ -105,7 +100,7 @@ function Root( { className, ...settings } ) {
] ),
className: clsx( 'is-root-container', className, {
'is-outline-mode': isOutlineMode,
'is-focus-mode': isFocusMode && isLargeViewport,
'is-focus-mode': isFocusMode,
} ),
},
settings
Expand Down

1 comment on commit 030c680

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 030c680.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12407123178
📝 Reported issues:

Please sign in to comment.